Learning for OSCP: Notes
July 5, 2020
- In Microsoft SQL Server you can create a shell.
- SMB Samba server on 139 or 445.
- openvpn exists. Haven't used it before. HtB
- Check what priv you have in Microsoft SQL Server
- cut -d '/' -f 1 is like awk
July 6, 2020
- The switch -T4 in nmap relates to speed. T1 is slow while T5 is fast. -T4 is commonly used.
- The switch -p- in nmap means scan all ports from 0-65535.
- dirbuster is pretty cool. Find wordlists at /usr/share/wordlists/dirbuster/
- nikto will give you basic hints and vulnerabilities
- sudo arp-scan -l is faster than nmap 192.168.0.*.
- RHosts stand for Remote Hosts. LHosts stand for Local host
July, 7 2020
- Rapid7 makes metasploit
- massscan alternative to nmap. It was made to scan the entire internet.
- /etc/init.d/nessusd start
- Can install deb packages with dpkg -i example.deb
- Seeing "Remote Code Execution" is good. That means we can sit at our home and exploit.
- Staged vs Non-Staged payloads. Staged is sending exploit code all at once. It will show as windows/meterpreter_reverse_tcp and non-staged will show as windows/meterpreter/reverse_tcp
- set payload linux/x86// . Try different payloads if its not working.
- Users start at 500 in Linux.
July, 8, 2020
- sudo hydra -l root -P /usr/share/wordlists/metasploit/unix_passwords.txt -t 5 ssh://192.168.0.18 -V
- FoxyProxy is a nice Firefox plugin.
- HtB does not like NordVPN... which wasted a few hours.
- auxiliary can also be considered pre-exploit, scanning, enumeration and version detection
- Try using port 53 or 443 for reverse-shells. It can help getting past FW.
July, 9, 2020
- unshadow passwd shadow : Combines a file ready for hashcat.
- nmap --script vuln 192.168.0.18 | Runs all scripts from vuln category
- name -D 192.168.0.90 | You can have a decoy.
July 10, 2020
- metasploit also uses workspaces like recon-ng
July 14, 2020
- Did a writeup on HtB Legacy
- Use 10.x openvpn for LHOST
July 15, 2020
- Did Blue HtB writeup
- Samba continues to be vulnerable
July 16, 2020
- Use ftp (put and get). Downloads and uploads from your current directory.
- Change to ftp binary if you have issues uploading a file.
- You can background a metasploit process.
- Use msfvenom cheatsheets to generate a shell
- Use the module exploit/multi/handler for netcat functionality in metasploit
- search suggester will find multi/recon/local_exploit_suggester. Once your in a box, this will help with privilege escalation.
July 16, 2020
- Tomcat is based off Java.
- Tomcat uses WAR files.
- It is still a thing.
July 17, 2020
- Cheat Sheet for msfvenom https://netsec.ws/?p=331
July 21, 2020
- Worked on HTB Nibbles.
- sudo -l will show what files a user can run as sudo.
- If you put "bash -i" in a file and run as sudo, that can be priv esclation
- If you type "shell" in meterpreter, that will give you a shell
- /root can exist instead of /home/root.
Comments
Post a Comment