Beep Writeup

0x01 Reconnaissance

0x02 Exploitation

There are plenty of ways into this one.

  1. lfi-password

https://10.10.10.7/vtigercrm/graph.php?current_language=../../../../../../../..//etc/amportal.conf%00&module=Accounts&action Google turns up the location of the elasxtic configuration file. https://10.10.10.7/vtigercrm/graph.php?current_language=../../../../../../../../etc/asterisk/manager.conf%00&module=Accounts&action Log in to the application. admin/jEhdIekWmdjE Try using a valid cookie with the upload vulnerability (CVE-2015-6000) to get a web shell. The upload fails.

  1. lfi-ssh root@10.10.10.7: access denied
  2. remote code injection

38091: the exploit fails. 18650: use the error messages to enumerate and brute-force the extension. Extension 233 gives us a shell. This involves two tools whose workings and usage I have not studied in depth yet. I ran into an SSL error and resolved it; sending the request through Burp could also avoid the problem. https://github.com/EnableSecurity/sipvicious https://github.com/EnableSecurity/sipvicious/wiki/SVWar-Usage

  1. lfi-email webshell
  2. shellshock

There is no output. Use sleep 10, following the same principle as blind injection.

0x03 Privilege escalation

0x04 Attack path

0x05 Lessons learned

1. Downloaded exploits rarely work untouched. Understand the script first, then modify and run it.

  • The author may have changed it to prevent direct execution (PHP: <?eval xxx?>).
  • The environment, encoding, and other factors can cause errors.
  • There are also security reasons to read it first.

2. It is nice when an exploit works on the first try. When the output looks wrong, work out why and adjust it. The earlier CGI exploit needed an echo before it produced output; here, the extension enumeration error already said line busy.

3. Getting a shell through email + LFI is a neat technique. Understand it better and try it when a similar situation comes up.