Learning for OSCP: Notes

July 5, 2020

  1. In Microsoft SQL Server you can create a shell.
  2. SMB Samba server on 139 or 445.
  3. openvpn exists. Haven't used it before. HtB
  4. Check what priv you have in Microsoft SQL Server
  5. cut -d '/' -f 1 is like awk

July 6, 2020

  1. The switch -T4 in nmap relates to speed. T1 is slow while T5 is fast. -T4 is commonly used.
  2. The switch -p- in nmap means scan all ports from 0-65535.
  3. dirbuster is pretty cool. Find wordlists at /usr/share/wordlists/dirbuster/
  4. nikto will give you basic hints and vulnerabilities
  5. sudo arp-scan -l is faster than nmap 192.168.0.*.
  6. RHosts stand for Remote Hosts. LHosts stand for Local host

July, 7 2020

  1. Rapid7 makes metasploit
  2. massscan alternative to nmap. It was made to scan the entire internet.
  3. /etc/init.d/nessusd start
  4. Can install deb packages with dpkg -i example.deb
  5. Seeing "Remote Code Execution" is good. That means we can sit at our home and exploit.
  6. 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
  7. set payload linux/x86// . Try different payloads if its not working.
  8. Users start at 500 in Linux.

July, 8, 2020

  1. sudo hydra -l root -P /usr/share/wordlists/metasploit/unix_passwords.txt -t 5 ssh://192.168.0.18 -V
  2. FoxyProxy is a nice Firefox plugin.
  3. HtB does not like NordVPN... which wasted a few hours.
  4. auxiliary can also be considered pre-exploit, scanning, enumeration and version detection
  5. Try using port 53 or 443 for reverse-shells. It can help getting past FW.

July, 9, 2020

  1. unshadow passwd shadow : Combines a file ready for hashcat.
  2. nmap --script vuln 192.168.0.18 | Runs all scripts from vuln category
  3. name -D 192.168.0.90 | You can have a decoy.

July 10, 2020

  1. metasploit also uses workspaces like recon-ng

July 14, 2020

  1. Did a writeup on HtB Legacy
  2. Use 10.x openvpn for LHOST

July 15, 2020

  1. Did Blue HtB writeup
  2. Samba continues to be vulnerable

July 16, 2020

  1. Use ftp (put and get). Downloads and uploads from your current directory.
  2. Change to ftp binary if you have issues uploading a file.
  3. You can background a metasploit process.
  4. Use msfvenom cheatsheets to generate a shell
  5. Use the module exploit/multi/handler for netcat functionality in metasploit
  6. search suggester will find multi/recon/local_exploit_suggester. Once your in a box, this will help with privilege escalation.

July 16, 2020

  1. Tomcat is based off Java.
  2. Tomcat uses WAR files.
  3. It is still a thing.

July 17, 2020

  1. Cheat Sheet for msfvenom https://netsec.ws/?p=331

July 21, 2020

  1. Worked on HTB Nibbles.
  2. sudo -l will show what files a user can run as sudo.
  3. If you put "bash -i" in a file and run as sudo, that can be priv esclation
  4. If you type "shell" in meterpreter, that will give you a shell
  5. /root can exist instead of /home/root.

Comments

Popular posts from this blog

HTB - Jarvis MySQL

Palo Alto for GNS3 CCDC Tutorial

Trace Labs Global Missing Persons CTF V