Skip to content

Commit

Permalink
Fixed C2 Viewer Shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
benpturner committed Sep 3, 2017
1 parent 7abd577 commit 7cf724b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions C2-Installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@ if ($downloaded) {
$bytes[0x15] = $bytes[0x15] -bor 0x20
[System.IO.File]::WriteAllBytes("$($installpath)PowershellC2\Start-C2-Server.lnk", $bytes)

$SourceExe = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
$ArgumentsToSourceExe = "-exec bypass -c import-module ${poshpath}C2-Viewer.ps1; c2-viewer"
$DestinationPath = "$($installpath)PowershellC2\Start-C2-Viewer.lnk"
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($DestinationPath)
$Shortcut.TargetPath = $SourceExe
$Shortcut.Arguments = $ArgumentsToSourceExe
$Shortcut.Save()

Write-Host "[+] Sucessfully installed PoshC2"

} else {
Expand Down
Binary file removed Start-C2-Viewer.lnk
Binary file not shown.
Binary file removed Start-Implant-Handler.lnk
Binary file not shown.

0 comments on commit 7cf724b

Please sign in to comment.