All Projects → fdiskyou → Hunter

fdiskyou / Hunter

Licence: bsd-3-clause
(l)user hunter using WinAPI calls only

Projects that are alternatives of or similar to Hunter

Gitjacker
🔪 Leak git repositories from misconfigured websites
Stars: ✭ 1,249 (+247.91%)
Mutual labels:  penetration-testing, red-team
Hrshell
HRShell is an HTTPS/HTTP reverse shell built with flask. It is an advanced C2 server with many features & capabilities.
Stars: ✭ 193 (-46.24%)
Mutual labels:  penetration-testing, red-team
Thecollective
The Collective. A repo for a collection of red-team projects found mostly on Github.
Stars: ✭ 85 (-76.32%)
Mutual labels:  penetration-testing, red-team
Dsinternals
Directory Services Internals (DSInternals) PowerShell Module and Framework
Stars: ✭ 776 (+116.16%)
Mutual labels:  penetration-testing, active-directory
pwn-pulse
Exploit for Pulse Connect Secure SSL VPN arbitrary file read vulnerability (CVE-2019-11510)
Stars: ✭ 126 (-64.9%)
Mutual labels:  penetration-testing, red-team
Active Directory Exploitation Cheat Sheet
A cheat sheet that contains common enumeration and attack methods for Windows Active Directory.
Stars: ✭ 870 (+142.34%)
Mutual labels:  penetration-testing, active-directory
Minimalistic Offensive Security Tools
A repository of tools for pentesting of restricted and isolated environments.
Stars: ✭ 135 (-62.4%)
Mutual labels:  penetration-testing, active-directory
Ghostwriter
The SpecterOps project management and reporting engine
Stars: ✭ 394 (+9.75%)
Mutual labels:  penetration-testing, red-team
Rubyfu
Rubyfu, where Ruby goes evil!
Stars: ✭ 228 (-36.49%)
Mutual labels:  penetration-testing, red-team
Dart
DART is a test documentation tool created by the Lockheed Martin Red Team to document and report on penetration tests, especially in isolated network environments.
Stars: ✭ 207 (-42.34%)
Mutual labels:  penetration-testing, red-team
Tactical Exploitation
Modern tactical exploitation toolkit.
Stars: ✭ 585 (+62.95%)
Mutual labels:  penetration-testing, active-directory
ReversePowerShell
Functions that can be used to gain Reverse Shells with PowerShell
Stars: ✭ 48 (-86.63%)
Mutual labels:  penetration-testing, red-team
Nishang
Nishang - Offensive PowerShell for red team, penetration testing and offensive security.
Stars: ✭ 5,943 (+1555.43%)
Mutual labels:  penetration-testing, red-team
Mssqli Duet
SQL injection script for MSSQL that extracts domain users from an Active Directory environment based on RID bruteforcing
Stars: ✭ 82 (-77.16%)
Mutual labels:  penetration-testing, active-directory
Whonow
A "malicious" DNS server for executing DNS Rebinding attacks on the fly (public instance running on rebind.network:53)
Stars: ✭ 533 (+48.47%)
Mutual labels:  penetration-testing, red-team
Active Directory Exploitation Cheat Sheet
A cheat sheet that contains common enumeration and attack methods for Windows Active Directory.
Stars: ✭ 1,392 (+287.74%)
Mutual labels:  penetration-testing, active-directory
A Red Teamer Diaries
RedTeam/Pentest notes and experiments tested on several infrastructures related to professional engagements.
Stars: ✭ 382 (+6.41%)
Mutual labels:  penetration-testing, active-directory
Slackor
A Golang implant that uses Slack as a command and control server
Stars: ✭ 392 (+9.19%)
Mutual labels:  penetration-testing, red-team
Discover
Custom bash scripts used to automate various penetration testing tasks including recon, scanning, parsing, and creating malicious payloads and listeners with Metasploit.
Stars: ✭ 2,548 (+609.75%)
Mutual labels:  penetration-testing, red-team
link
link is a command and control framework written in rust
Stars: ✭ 345 (-3.9%)
Mutual labels:  penetration-testing, red-team

hunter

(l)user hunter using WinAPI calls only

Introduction:

During Red Team engagements it is common to track/hunt specific users. Assuming we already have access to a desktop as a normal user (no matter how, always "assume compromise") in a Windows Domain and we want to spread laterally. We want to know where the user is logged on, if he is a local administrator in any box, to which groups he belongs, if he has access to file shares, and so on. Enumerating hosts, users, and groups will also help to get a better understanding of the Domain layout.

You might be thinking, "use Powerview". Lately, one of the most common problems I encounter during Red Team exercises is the fact that PowerShell is heavily monitored. If you use it, you'll get caught, sooner or later. By now everyone is well aware how powerful PowerShell is, including Blue Teams and Security Vendors.

There are multiple ways to work around this. To avoid using multiple old school tools (psloggedon.exe, netsess.exe, nltest, netview, among others) and to reduce the amount of tools uploaded to compromised systems I created a simple tool that doesn't require Administrative privileges to run and collect the information listed below, and relies only on the Windows API.

You might end up dealing with white list bypass and process evasion, but I'll leave that for another day.

What is it:

The (l)user hunter tool is a small program written in C/C++ that uses WinAPI calls only to:

  • Retrieves current configuration information for the specified server (via list of hosts or domain enumeration).
    • OS Version
    • Server Type (DC, Backup DC, Workstation or Server, Terminal Server, MSSQL Server)
  • Lists information about all users currently logged on to the workstation.
    • interactive, service and batch logons.
  • Lists information about sessions established on a server.
  • Retrieves information about each shared resource on a server.
    • checks if current user as read access.
  • Returns results for the NS_DNS namespace, IPv4 protocol.
  • Checks if current user is an Administrator on a server.
  • Retrieves information about all user accounts on a server or DC.
  • Retrieves a list of global groups to which a specified user belongs on a server or DC.
  • Retrieves information about each global group in the security database, SAM database or Active Directory.
  • Retrieves a list of the members in a particular global group in the security database, SAM database or Active Directory.
  • Retrieves information about a particular user account on a server or DC.
  • Enumerate the domain controllers in the local domain.

Additionally, for hosts enumeration there's a minimum and maximum delay value in seconds you can add to avoid detection/noise.

How to Compile it:

Grab a copy of Visual Studio, it's free. It won't build on Linux, maybe later.

How to use it:

See below some usage examples.

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

Alt text

TODO:

  • Improve Error handling
  • Improve output
  • Identify IPv6 interfaces
  • Improve arg parsing
  • Create command line flags to specify what queries to run
  • Rewrite the random delay counter between queries

Issues:

This is a beta version, use at your own risk.

  • When Windows 10 is identified via network discovery some queries fail. If you query it via an IP address it works.
  • Error handling is far from awesome.

Credits:

Credits where they are due. MSDN is awesome and I grabbed a big part of the code from the examples provided. Just look for the API calls used for more informaton.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].