All Projects → EncodeGroup → Aggressiveproxy

EncodeGroup / Aggressiveproxy

Project to enumerate proxy configurations and generate shellcode from CobaltStrike

Labels

Projects that are alternatives of or similar to Aggressiveproxy

Phpsploit
Full-featured C2 framework which silently persists on webserver with a single-line PHP backdoor
Stars: ✭ 1,188 (+989.91%)
Mutual labels:  redteam
Redteam vul
红队作战中比较常遇到的一些重点系统漏洞整理。
Stars: ✭ 1,271 (+1066.06%)
Mutual labels:  redteam
Arsenal
Extensible Red Team Framework
Stars: ✭ 99 (-9.17%)
Mutual labels:  redteam
Nac bypass
Script collection to bypass Network Access Control (NAC, 802.1x)
Stars: ✭ 79 (-27.52%)
Mutual labels:  redteam
Bof Regsave
Dumping SAM / SECURITY / SYSTEM registry hives with a Beacon Object File
Stars: ✭ 85 (-22.02%)
Mutual labels:  redteam
Resource files
mosquito - Automating reconnaissance and brute force attacks
Stars: ✭ 95 (-12.84%)
Mutual labels:  redteam
Hacker ezines
A collection of electronic hacker magazines carefully curated over the years from multiple sources
Stars: ✭ 72 (-33.94%)
Mutual labels:  redteam
Malwarepersistencescripts
A collection of scripts I've written to help red and blue teams with malware persistence techniques.
Stars: ✭ 103 (-5.5%)
Mutual labels:  redteam
Atomic Red Team Intelligence C2
ARTi-C2 is a post-exploitation framework used to execute Atomic Red Team test cases with rapid payload deployment and execution capabilities via .NET's DLR.
Stars: ✭ 87 (-20.18%)
Mutual labels:  redteam
Wsmanager
Webshell Manager
Stars: ✭ 99 (-9.17%)
Mutual labels:  redteam
Venom
Venom - A Multi-hop Proxy for Penetration Testers
Stars: ✭ 1,228 (+1026.61%)
Mutual labels:  redteam
Thecollective
The Collective. A repo for a collection of red-team projects found mostly on Github.
Stars: ✭ 85 (-22.02%)
Mutual labels:  redteam
Deepsea
DeepSea Phishing Gear
Stars: ✭ 96 (-11.93%)
Mutual labels:  redteam
Ldap search
Python3 script to perform LDAP queries and enumerate users, groups, and computers from Windows Domains. Ldap_Search can also perform brute force/password spraying to identify valid accounts via LDAP.
Stars: ✭ 78 (-28.44%)
Mutual labels:  redteam
Bettercap
The Swiss Army knife for 802.11, BLE, IPv4 and IPv6 networks reconnaissance and MITM attacks.
Stars: ✭ 10,735 (+9748.62%)
Mutual labels:  redteam
Ultimateapplockerbypasslist
The goal of this repository is to document the most common techniques to bypass AppLocker.
Stars: ✭ 1,186 (+988.07%)
Mutual labels:  redteam
Winpwn
Automation for internal Windows Penetrationtest / AD-Security
Stars: ✭ 1,303 (+1095.41%)
Mutual labels:  redteam
Information Security Tasks
This repository is created only for infosec professionals whom work day to day basis to equip ourself with uptodate skillset, We can daily contribute daily one hour for day to day tasks and work on problem statements daily, Please contribute by providing problem statements and solutions
Stars: ✭ 108 (-0.92%)
Mutual labels:  redteam
Collection Document
Collection of quality safety articles. Awesome articles.
Stars: ✭ 1,387 (+1172.48%)
Mutual labels:  redteam
Gorsh
A Golang Reverse Shell w/ a Tmux-driven psuedo-C2 Interface
Stars: ✭ 97 (-11.01%)
Mutual labels:  redteam

AggressiveProxy

AggressiveProxy is a combination of a .NET 3.5 binary (LetMeOutSharp) and a Cobalt Strike aggressor script (AggressiveProxy.cna). Once LetMeOutSharp is executed on a workstation, it will try to enumerate all available proxy configurations and try to communicate with the Cobalt Strike server over HTTP(s) using the identified proxy configurations.

The story behind the tool can be found at EncodeGroup's Medium

Requirements

  • CobaltStrike 4.1
  • Mono Framework

Instructions

  • Modify the $msbuild value in AggressiveProxy.cna to point to the path of msbuild executable which is part of the Mono Framework

  • Click on the Proxy Handler->Start Handler menu item. At this point the script will request the listener, the proxy handler URL and the expected response content settings.

  • Once these values have been set, the script will then:

    • Replace %C2URL% and %RESPONSE% placeholders inside Program_template.cs and create the Program.cs file
    • Invoke MSBuild in order to build the .NET binary LetMeOutSharp
  • The script will then create a web page at the provided Check URL. Once a hit has been made to the specific URL from LetMeOutSharp, it will then:

    • Try to decode the base64 parameters of the GET request and extract the proxy address:port, the UserAgent and the architecture (x86/x64).
    • Try to match the UserAgent it received and pick a proper Malleable variant. If you want the generated shellcode to use the appropriate User-Agent, you will need to create the following variants:
      • "chrome"
      • "firefox"
      • "edge"

    If there are no variants configured, the default one should be used. The new variants should have exactly the same configuration as the variant your listener is/will be using, with the addition of the appropriate header "User-Agent" line in the client part. For example if your listener is using the following profile:

http-get {
  set uri "/test/";
  set verb "GET";
  client {
    header "Accept" "*/*";
    header "Accept-Encoding" "gzip, deflate";
    metadata {
      base64url;
      prepend "user=";
      header "Cookie";
    }
  }
  server {
    header "Server" "Server";
	header "Content-Type" "application/text";
	header "Connection" "keep-alive";
	output {
	  print;
	}
  }
}

You will need to define the following variants:

http-get "chrome" {
  ..<same as the main profile>..
  client {
    ..<same as the main profile>..
    header "User-Agent" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36";
    ..<same as the main profile>..
  }
  server {
    ..<same as the main profile>..
  }
}
http-get "firefox" {
  ..<same as the main profile>..
  client {
    ..<same as the main profile>..
    header "User-Agent" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0";
    ..<same as the main profile>..
  }
  server {
    ..<same as the main profile>..
  }
}
http-get "edge" {
  ..<same as the main profile>..
  client {
    ..<same as the main profile>..
    header "User-Agent" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edge/86.0.622.51";
    ..<same as the main profile>..
  }
  server {
    ..<same as the main profile>..
  }
}
  • AggressiveProxy.cna will then setup a new temporary listener with the custom proxy configuration. The following exception will be logged: java.lang.RuntimeException: Another Beacon listener exists on your cobalt console. This is normal and we will be using the temporary listener in order to create the shellcode with the custom proxy configuration. After generating the shellcode, the listener will be deleted.
  • A new URL will be created which will host the shellcode which is XOR encrypted and in HEX form.
  • LetMeOutSharp, will then fetch the shellcode and try to inject it to a new process. Currently as a POC, LetMeOutSharp will perform a QueueUserAPC injection to a newly spawned process of our favorite process notepad.exe. Feel free to modify Injector.cs to your taste.

Menu options

The CNA will create a menu with the following items:

  • Start Handler is responsible for defining the listener that LetMeOutSharp will try to communicate to, the URL that will try to reach as well as the expected response from the web server. After defining the settings, it will host the proxy handling URL on the Cobalt Strike web server.
  • Stop Handler will remove the proxy handling URL and any hosted generated shellcodes.

Extra Configuration

  • By modifying $buildver variable in the AggressiveProxy CNA, you can build a Debug version of LetMeOutSharp, which is more verbose and will print out all the relevant information it gathers. This should be used only for testing purposes.
  • Currently, AggressiveProxy CNA is using unpenetratable encryption for the hosted shellcode, with the use of a hardcoded XOR key. This can be modified the $xordata variable. You should also replace the line values[i] = (byte)(values[i] ^ 0x2a); in Program_template.cs

Notes

An effort has been made to test multiple cases of proxy configurations / technologies. This however does not mean that all cases have been accounted for. If you feel you have found a case, where LetMeOutSharp does not take into account, feel free to open an issue or a merge request.

Authors

@cirrusj

@leftp

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].