Hacking Cheat Sheet
Hacking Cheat Sheet
Maximize/minimize editor Ctrl + Shift + F12 Show parameters for selected method Ctrl + P
Safe delete Alt + Delete Select successively increasing code blocks Ctrl + W
Extract method Ctrl + Alt + M Select to the code block start Ctrl + Shift + [
Extract variable Ctrl + Alt + V Select to the code block end Ctrl + Shift + ]
Project quick fix (show intention actions and quick Alt + Enter
Writing Code fixes)
Generate code (getters, setters, etc) Alt + Insert Reformat code Ctrl + Alt + L
Surround with (if...else / try...catch / etc.) Ctrl + Alt + T Smart line join Ctrl + Shift + J
Collapse/expand current code block Ctrl + Start new line Shift + Enter
minus/plus Next/previous highlighted error F2 / Shift + F2
Collapse/expand all code blocks Ctrl + Shift +
minus/plus Build and Run
Resume program F9
Find Ctrl + F
Find next F3
Replace Ctrl + R
Go to line Ctrl + G
TCP SYN SCAN (-sS) TCP connect() SCAN (-sT) TCP FIN SCAN (-sF)
TCP XMAS TREE SCAN (-sX) TCP NULL SCAN (-sN) TCP PING SCAN (-sP)
VERSION DETECTION SCAN (-sV) UDP SCAN (-sU) IP PROTOCOL SCAN (-sO)
Version scan identifies open pots with a TCP SYN scan…
…and then queries the port with a customized signature. TCP ACK SCAN (-sA) TCP WINDOW SCAN (-sW)
www.stationx.net/nmap-cheat-sheet/
5
IDLESCAN (-sI <zombie host: [probeport]>)
Step 3: Nmap repeats the original SYN/ACK probe of the
Step 1: Nmap sends a SYN/ACK to the zombie workstation Step 2: Nmap sends a SYN frame to the destination
zombie station. If the IPID has incremented, then the port
to induce a RST in return. This RST frame contains the address, but nmap spoofs the IP address to make it seem
that was spoofed in the original SYN frame is open on the
initial IPID that nmap will remember for later. as if the SYN frame was sent from the zombie workstation.
destination device.
www.stationx.net/nmap-cheat-sheet/
6
Top 30 linux shell tricks Cheat Sheet
by TME520 (TME520) via cheatography.com/20978/cs/17483/
Top 30
^Morld^World
Place the argument of the most recent command on the shell 'ALT+.' or '<ESC> .'
Output your microphone to a remote computer's speaker dd if=/dev/dsp | ssh -c arcfour -C username@host dd
of=/dev/dsp
ls -lisa /etc/ssh/
[ctrl+y] vi /etc/ssh/ssh_config
Compare a remote file with a local file ssh user@host cat /path/to/remotefile | diff /path/to/‐
localfile -
Update twitter via curl curl -u user:pass -d status="Tweeting from the shell"
http://twitter.com/statuses/update.xml`
SSH connection through host in the middle ssh -t reachable_host ssh unreachable_host
Put a console clock in top right corner while sleep 1;do tput sc;tput cup 0 $(($(tput cols)-‐
29));date;tput rc;done &
Shutdown a Windows machine from Linux net rpc shutdown -I ipAddressOfWindowsPC -U username%‐
password
List of commands you use most often history | awk '{a[$2]++}END{for(i in a){print a[i] " "
i}}' | sort -rn | head
Reboot machine when everything is hanging <alt> + <print screen/sys rq> + <R> - <S> - <E> - <I> -
<U> - <B>
Top 30 (cont)
Simulate typing echo "You can simulate on-screen typing just like in
the movies" | pv -qL 10
Delete all files in a folder that don't match a certain file extension rm !(.foo|.bar|*.baz)
Type a string, hit [ctrl+d] and see the ASCII codes od -cx