Skip to content

Commit 8c86c49

Browse files
committed
Armitage 01.23.13
This update to Armitage adds the ability to assign labels to hosts and create dynamic workspaces based on these labs. This update also adds helpers to configure USERNAME/PASSWORD options and EXE::Custom and EXE::Template. Several bugs were fixed as well.
1 parent d6ed6cd commit 8c86c49

29 files changed

+385
-118
lines changed

data/armitage/armitage.jar

2.58 KB
Binary file not shown.

data/armitage/cortana.jar

2.44 KB
Binary file not shown.

data/armitage/whatsnew.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
Armitage Changelog
22
==================
33

4+
23 Jan 13 (tested against msf 16351)
5+
---------
6+
- Added helpers to set EXE::Custom and EXE::Template options.
7+
- Fixed a bug displaying a Windows 8 icon for Windows 2008 hosts
8+
- Cleaned up Armitage -> SOCKS Proxy job management code. The code to
9+
check if a proxy server is up was deadlock prone. Removed it.
10+
- Starting SOCKS Proxy module now opens a tab displaying the module
11+
start process. An event is posted to the event log too.
12+
- Created an option helper to select credentials for SMBUser, SMBPass,
13+
USERNAME, and PASSWORD.
14+
- Added a feature to label hosts. A label will show up in its own column
15+
in table view or below all info in graph view. Any team member may
16+
change a label through [host] -> host -> Set Label. You may also use
17+
dynamic workspaces to show hosts with certain labels attached.
18+
- Fixed bad things happening when connecting Armitage to 'localhost' and
19+
not '127.0.0.1'.
20+
- Screenshots and Webcam shots are now centered in their tab.
21+
- Added an alternate .bat file to start msfrpcd on Windows in the
22+
Metasploit 4.5 installer's environment.
23+
- Added a color-style for [!] warning messages
24+
25+
Cortana Updates (for scripters)
26+
--------
27+
- &handler function now works as advertised.
28+
- Cortana now avoids use of core.setg
29+
430
4 Jan 13 (tested against msf 16252)
531
--------
632
- Added a helper to set REXE option

external/source/armitage/build.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
depend="yes"
1717
debug="true"
1818
optimize="yes"
19+
target="1.6"
20+
source="1.6"
1921
includeantruntime="fuckno"
2022
>
2123
<classpath path="./lib/jgraphx.jar;./lib/sleep.jar;./lib/msgpack-0.5.1-devel.jar;./lib/postgresql-9.1-901.jdbc4.jar" />

external/source/armitage/resources/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<center><h1>Armitage 1.45</h1></center>
44

55
<p>An attack management tool for Metasploit&reg;
6-
<br />Release: 4 Jan 13</p>
6+
<br />Release: 23 Jan 13</p>
77
<br />
88
<p>Developed by:</p>
99

external/source/armitage/resources/msfconsole.style

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
^msf (.*?)\((.*?)\) > \umsf\u $1(\c4$2\o) >
55
^\[\*\] (.*) \cC[*]\o $1
66
^\[\+\] (.*) \c9[+]\o $1
7+
^\[\!\] (.*) \c8[!]\o $1
78
^\[\-\] (.*) \c4[-]\o $1
89
^ =\[ (.*) =[\c7 $1
910
^(=[=\s]+) \cE$1
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
set BASE=$$BASE$$..\..\
3+
cd "%BASE%"
4+
set PATH=%BASE%ruby\bin;%BASE%java\bin;%BASE%tools;%BASE%nmap;%BASE%postgresql\bin;%PATH%
5+
IF NOT EXIST "%BASE%java" GOTO NO_JAVA
6+
set JAVA_HOME="%BASE%java"
7+
:NO_JAVA
8+
set MSF_DATABASE_CONFIG="%BASE%apps\pro\ui\config\database.yml"
9+
set MSF_BUNDLE_GEMS=0
10+
set BUNDLE_GEMFILE=%BASE%apps\pro\ui\Gemfile
11+
cd "%BASE%apps\pro\msf3"
12+
rubyw msfrpcd -a 127.0.0.1 -U $$USER$$ -P $$PASS$$ -S -f -p $$PORT$$

external/source/armitage/scripts-cortana/cortanadb.sl

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ sub c_client {
4242
sub setupHandlers {
4343
find_job("Exploit: multi/handler", {
4444
if ($1 == -1) {
45+
# set LPORT for the user...
46+
local('$c');
47+
$c = call($client, "console.allocate")['id'];
48+
call($client, "console.write", $c, "setg LPORT " . randomPort() . "\n");
49+
call($client, "console.release", $c);
50+
4551
# setup a handler for meterpreter
46-
call($client, "core.setg", "LPORT", randomPort());
4752
call($client, "module.execute", "exploit", "multi/handler", %(
4853
PAYLOAD => "windows/meterpreter/reverse_tcp",
4954
LHOST => "0.0.0.0",
@@ -55,7 +60,7 @@ sub setupHandlers {
5560

5661
sub main {
5762
global('$client $mclient');
58-
local('%r $exception');
63+
local('%r $exception $lhost $temp $c');
5964

6065
setField(^msf.MeterpreterSession, DEFAULT_WAIT => 20000L);
6166

@@ -81,8 +86,24 @@ sub main {
8186
# setup second thread.
8287
%r = call($client, "armitage.validate", $user, $pass, $null, "armitage", 120326);
8388

89+
# resolve lhost..
90+
$c = call($client, "console.allocate")['id'];
91+
call($client, "console.write", $c, "setg LHOST\n");
92+
while ($lhost eq "") {
93+
$temp = call($client, "console.read", $c)['data'];
94+
if (["$temp" startsWith: "LHOST => "]) {
95+
$lhost = substr(["$temp" trim], 9);
96+
}
97+
else {
98+
# this shouldn't happen because having LHOST set is a precondition
99+
# for Cortana to connect to a team server.
100+
sleep(1000);
101+
}
102+
}
103+
call($client, "console.release", $c);
104+
84105
# pass some objects back yo.
85-
[$loader passObjects: $client, $mclient];
106+
[$loader passObjects: $client, $mclient, $lhost];
86107

87108
# don't make previous messages available...
88109
call($mclient, "armitage.skip");

external/source/armitage/scripts-cortana/internal.sl

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import msf.*;
99

1010
# setg("varname", "value")
1111
sub setg {
12-
call_async("core.setg", $1, $2);
12+
cmd_safe("setg $1 $2");
1313
}
1414

1515
sub readg {
@@ -335,14 +335,22 @@ sub multi_handler {
335335
}
336336

337337
sub handler {
338-
local('%o $3');
339-
if ($3) {
340-
%o = copy($3);
341-
}
338+
local('%o $3 $key $value');
342339

343-
%o['PAYLOAD'] = "payload/ $+ $1";
340+
# default options
341+
%o['PAYLOAD'] = $1;
344342
%o['LPORT'] = $2;
343+
%o['DisablePayloadHandler'] = 'false';
344+
%o['ExitOnSession'] = 'false';
345+
346+
# let the user override anything
347+
if ($3) {
348+
foreach $key => $value ($3) {
349+
%o[$key] = $value;
350+
}
351+
}
345352

353+
# make sure LHOST is correct
346354
if ('LHOST' !in %o) {
347355
if ("*http*" iswm $1) {
348356
%o['LHOST'] = lhost();
@@ -352,6 +360,7 @@ sub handler {
352360
}
353361
}
354362

363+
# let's do it...
355364
return launch('exploit', 'multi/handler', %o);
356365
}
357366

external/source/armitage/scripts/armitage.sl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ sub showHost {
5959
else if ("*XP*" iswm $match || "*2003*" iswm $match || "*.NET*" iswm $match) {
6060
push(@overlay, 'resources/windowsxp.png');
6161
}
62-
else if ("*8*" iswm $match) {
62+
else if ("*8*" iswm $match && "*2008*" !iswm $match) {
6363
push(@overlay, 'resources/windows8.png');
6464
}
6565
else {
@@ -139,7 +139,7 @@ sub _connectToMetasploit {
139139
$progress = [new ProgressMonitor: $null, "Connecting to $1 $+ : $+ $2", "first try... wish me luck.", 0, 100];
140140

141141
# keep track of whether we're connected to a local or remote Metasploit instance. This will affect what we expose.
142-
$REMOTE = iff($1 eq "127.0.0.1", $null, 1);
142+
$REMOTE = iff($1 eq "127.0.0.1" || $1 eq "::1" || $1 eq "localhost", $null, 1);
143143

144144
$flag = 10;
145145
while ($flag) {
@@ -160,7 +160,7 @@ sub _connectToMetasploit {
160160
}
161161

162162
# connecting locally? go to Metasploit directly...
163-
if ($1 eq "127.0.0.1" || $1 eq "::1" || $1 eq "localhost") {
163+
if ($REMOTE is $null) {
164164
$client = [new MsgRpcImpl: $3, $4, $1, long($2), $null, $debug];
165165
$aclient = [new RpcAsync: $client];
166166
$mclient = $client;
@@ -239,10 +239,6 @@ sub _connectToMetasploit {
239239
[$progress setNote: "Connected: ..."];
240240
[$progress setProgress: 60];
241241

242-
if (!$REMOTE && %MSF_GLOBAL['ARMITAGE_TEAM'] eq '1') {
243-
showErrorAndQuit("Do not connect to 127.0.0.1 when\nrunning a team server.");
244-
}
245-
246242
dispatchEvent(&postSetup);
247243
}, \$progress));
248244
}

0 commit comments

Comments
 (0)