Skip to content

Instantly share code, notes, and snippets.

@c4ri0c4
c4ri0c4 / ntlmdecoder.py
Created January 12, 2024 10:03 — forked from aseering/ntlmdecoder.py
NTLM auth-string decoder
#!/usr/bin/env python
## Decodes NTLM "Authenticate" HTTP-Header blobs.
## Reads the raw blob from stdin; prints out the contained metadata.
## Supports (auto-detects) Type 1, Type 2, and Type 3 messages.
## Based on the excellent protocol description from:
## <http://davenport.sourceforge.net/ntlm.html>
## with additional detail subsequently added from the official protocol spec:
## <http://msdn.microsoft.com/en-us/library/cc236621.aspx>
##
"""
Extract Rapid 2.0 ransomware config from encrypter or decrypter
Author: @demonslay335
"""
import os, sys, string, re, binascii, base64, argparse
# https://stackoverflow.com/a/17197027/1301139
def strings(filename, min=4, max=10000):
with open(filename, "rb") as f: # Python 2.x
@c4ri0c4
c4ri0c4 / msgrpc_ssh_version.py
Created June 18, 2018 02:05 — forked from carnal0wnage/msgrpc_ssh_version.py
python script to connect to a metasploit msgrpc instance, setup and run an auxilary module.
#!/usr/bin/env python
import sys
import msfrpc
import time
if __name__ == '__main__':
# Create a new instance of the Msfrpc client with the default options
client = msfrpc.Msfrpc({})
# Login to the msf server using the password "abc123"
@c4ri0c4
c4ri0c4 / vpn.sh
Created January 3, 2018 02:12 — forked from kawaxi/vpn.sh
Small script to Initiate session on a VPN
#!/usr/bin/expect -f
cd "lab-connection"
spawn openvpn OS-213**-OSCP.ovpn
expect "Enter Auth Username:" {
send "OS-213**\n"
}
expect "Enter Auth Password:" {
send "mypass\n"
@c4ri0c4
c4ri0c4 / oscp_recon.sh
Created January 3, 2018 00:22 — forked from r00tpgp/oscp_recon.sh
Some script I found on the web for preparation of my OSCP exam, I modified it to include more functions for enumeration.
#!/bin/bash
###################################################
# Recon Script
#
# Version: v2_08102016
# Created By: Seclyn
# Description: For initial recon of network/hosts.
# Mod by: r00t.pgp
#
###################################################
@c4ri0c4
c4ri0c4 / OSCP note A'
Created January 3, 2018 00:21
OSCP notes A & B may have some commons
OSCP Handy Commands
Nmap Full Web Vulnerable Scan:
mkdir /usr/share/nmap/scripts/vulscan
cd /usr/share/nmap/scrripts/vulscan
wget http://www.computec.ch/projekte/vulscan/download/nmap_nse_vulscan-2.0.tar.gz && tar xzf nmap_nse_vulscan-2.0.tar.gz
@c4ri0c4
c4ri0c4 / OSCP note A'
Created January 3, 2018 00:21
OSCP notes A & B may have some commons
OSCP Handy Commands
Nmap Full Web Vulnerable Scan:
mkdir /usr/share/nmap/scripts/vulscan
cd /usr/share/nmap/scrripts/vulscan
wget http://www.computec.ch/projekte/vulscan/download/nmap_nse_vulscan-2.0.tar.gz && tar xzf nmap_nse_vulscan-2.0.tar.gz

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Document it

Recon

Unicornscans in cli, nmap in msfconsole to help store loot in database.

#!/usr/bin/env python
import sys
import msfrpc
import time
if __name__ == '__main__':
# Create a new instance of the Msfrpc client with the default options
client = msfrpc.Msfrpc({})
# Login to the msf server using the password "abc123"