Skip to content

Instantly share code, notes, and snippets.

@leveled
leveled / sc run a backdoor as system .txt
Created December 29, 2016 17:31
Using sc to create a backdoor service
sc create RunCMDAsLSA binpath= "shell.exe" type=own
@leveled
leveled / encoding for password in passwd file.txt
Created December 29, 2016 17:32
The password 'password' encoded for direct inclusion in /etc/passwd file
Npge08pfz4wuk
@leveled
leveled / Setting system-wide proxy on Windows 7 .sh
Created December 29, 2016 17:33
Setting a system wide proxy on Windows 7
netsh winhttp import proxy source=ie
netsh winhttp show proxy
netsh winhttp reset proxy
@leveled
leveled / curl from socks5 proxy.sh
Created December 29, 2016 17:34
Curl using a socks proxy
curl --socks5-hostname 1.2.3.4:8000 http://superuser.com/q/262956/66003 > superuser.html
@leveled
leveled / edit read only filesystem on android.txt
Created December 29, 2016 19:15
Mounts the system with read/write privileges in order to change the read only filesystem on Android
adb devices -l # make sure your gadget is listed
adb shell # run a shell there
su # become the root (don't miss confirmation request!)
mount -o remount,rw /system # allow to write
vi /system/etc/hosts ## edit the file in place - do what you whant, then <ESC>:wq ##
mount -o remount,ro /system # get things back to normal
exit # unroot
nslookup YourBlockedAdSite.Net # check if it works
exit # good bye
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
#Newer versions of MacOS
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all -clientopts -setmenuextra -menuextra yes
@leveled
leveled / disable ftp service on os x from cli
Created December 29, 2016 23:05
Enable or disable the ftp service on mac os x from the command line
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist
sudo -s launchctl unload -w /System/Library/LaunchDaemons/ftp.plist
@leveled
leveled / port forwarding from the command line on mac os x using pf
Created December 29, 2016 23:06
Forward ports from the commadn line using pf firewall
echo "
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
" | sudo pfctl -ef -
@leveled
leveled / flush pf rules
Created December 29, 2016 23:07
Flush pf rules on mac os x command line
sudo pfctl -F all -f /etc/pf.conf
@leveled
leveled / display pf rules
Created December 29, 2016 23:14
Display pf rules on mac os x command line
sudo pfctl -s nat