Practice
  • 🛤️TryHackMe Rooms
    • HackersVsHackers
    • Vulnnet - The End Game
    • Surfer
    • Corridor
    • Mustacchio
    • Wordpress: CVE-2021-29447
    • Bounty Hacker
    • Simple CTF
    • Agent Sudo
    • Lazy Admin
    • Ignite
    • Brooklynn 99
    • c4ptur3th3fl4g
    • Lian_Yu
    • Rabbit
    • Gallery
    • Overpass
    • Team
    • Easy Peasy
    • CmesS
    • Ultratech
    • Wonderland
    • Anonymous
    • GamingServer
    • Tomghost
    • ConvertMyVideo
    • DogCat
    • Blog
    • Git Happens
    • 0day
    • Road
    • Inferno
    • Opacity
    • Market Place
    • Valley CTF
    • Weasel
    • SafeZone
    • Blueprint
    • Fusion Corp
    • Quotient
    • Unbaked Pie
    • Kenobi
    • Steel Mountain
    • Alfred
    • Hack Park
    • Game Zone
    • Daily Bugle
    • Retro
    • Corp
    • Attacktive Directory
    • Vulnnet - Roasted
    • Vulnnet - Active
    • Vulnnet - Internal
    • Enterprise - Hard
    • Iron Corp - Hard
    • Ra - Hard
    • For Business Reasons
  • 📦HackTheBox
    • Linux Boxes
      • Lame
      • Shocker
      • Nibbles
      • Beep
      • Cronos
      • Nineveh
      • Sense
      • Solidstate
      • Node
      • Valentine
      • Poison
      • Sunday
      • Irked
      • FriendZone
      • Networked
      • Jarvis
      • Tabby
      • Mirai
      • Popcorn
    • Windows Boxes
      • Active
      • Forest
      • ChatterBox
      • Resolute
      • Intelligence
  • 🤖CTF's
    • CloudSEK CTFs
    • ACM Cyber - UCLA
  • ¯\_(ツ)_/¯
    • Interview Topics
  • 🪣BOF - OSCP
    • Basics
    • Spiking
    • FUZZing
    • Finding the Offset
    • Overwriting the EIP
    • Finding BAD Characters
    • Finding RIGHT Module
    • Generating Shellcode
  • 📛Active Directory
    • Basics
      • Managing AD Users
      • Managing AD Computers
      • Group Policies
      • Authentication Methods
      • Trees, Forests and Trusts
    • Enumeration Techniques
    • Initial Attack Vectors
    • Post Compromise Enumeration
    • Post Compromise Attacks
      • Token Impersonation - LM
      • Kerberoasting
      • cPassword / GPP Attack
      • URL File Attacks
      • PrintNightmare
      • Golden Ticket Attacks
      • ZeroLogon Attacks
    • Lateral Movement and Pivoting
      • File Transfers
      • Spawning Processes Remotely
      • Moving Laterally with WMI
      • Alternate Authentication Material
      • Abusing User's Behaviour
      • Port Forwarding
      • Maintaing Access
      • Pivoting
      • Cleaning Up
    • Other Resources
  • 🛡️Powershell Basics
    • Getting Started
      • Functions
  • 😁Others
    • API Security
    • Cloud Security
  • Enumeration
    • Local PrivEsc
    • Remoting
    • Persistence
    • Kerberos
Powered by GitBook
On this page
  1. BOF - OSCP

Spiking

PRACTICE ! PRACTICE ! PRACTICE !

PreviousBasicsNextFUZZing

Last updated 1 year ago

Don't Forget to . . . . .

  • Disable all your antivirus applications

  • Disable Microsoft Windows Defender's Real Time Protection etc - So, that we don't have any issues while developing our exploit :)

Firstly, first let's start the vulnserver.exe and our Immunity Debugger as an Administrator User !

Now, Let's attach the vulnserver's process to the debugger and run the program, Meanwhile let's connect to the vulnserver from our attacker's machine and check the available options :)

nc -nv 192.168.0.104 9999

By default, the vulnserver runs on port 9999 - If we want a different port we can simply assign the port number while running it

Once we connect to the server, we find many available options but how do we know which command in this server is vulnerable ?

  • This is where Spiking comes into picture, we write a simple spike (.spk) script which iterates through the option and crashes the program which can be seen via the Debugger

  • These are the available commands in this vulnerable server, so lets start Spikinnnnn'

  • The tool which is going to automate the iteration part, considering our spike script is called generic_send_tcp

The syntax is very simple :)

./generic_send_tcp host port spike_script SKIPVAR SKIPSTR
  • Let's write a script for a non-vulnerable command such as STATS

s_readline();
s_string("STATS ");
s_string_variable("0");
  • And a vulnerable command such as TRUN

s_readline();
s_string("TRUN ");
s_string_variable("0");

This confirms that the TRUN command is vulnerable - So let's start developing our EXPLOIT :)

🪣