Port Scan version 2.0 suffers from a command injection vulnerability.
Document Title: =============== Port Scan v2.0 iOS - Command Inject Vulnerability Product & Service Introduction: =============================== Port Scanning is a essential network utility for every IT professional and this is the best scanner available for your iOS device. This utility application lets you check what services are listening on a network and is useful for making sure no service ports are open that shouldn`t be. Use this security tool as a conveinant portable app to check on open ports behind your corporate firewall via connection through the WiFi network or from the Internet through the cellular network. This app is a must have for every network/system administrator but simple enough for the non-professional to use and understand. (Copy of the Product Homepage: https://itunes.apple.com/us/app/port-scan-ultra-fast-tcp-port/id638292293 ) Technical Details & Description: ================================ A local command inject web vulnerability has been discovered in the official Port Scan v2.0 iOS mobile web-application. The web vulnerability allows to inject malicious script codes to the application-side of the vulnerable iOS mobile app. The security vulnerability is located in the device name value of the `Start Quick Scan` module. Local attackers are able to manipulate the url value to compromise the mail function of the Port Scan mobile app. The html encoding is broken in the `Email Results` export function. Local attackers are able to manipulate the url port scan input field to compromise the application internal validation via the `Email Results` (html). The attack vector of the vulnerability is located on the application-side and the injection point is the browse url input field. The security risk of the local commandpath inject vulnerability is estimated as medium with a cvss (common vulnerability scoring system) count of 3.7. Exploitation of the local command inject vulnerability requires a low privilege iOS system device user account with restricted access and no user interaction. Successful exploitation of the vulnerability results in unauthorized execution of system specific commands and unauthorized path value requests to compromise the mobile iOS application and connected device components. Vulnerable Module(s) [+] Start Quick Scan Vulnerable Parameter(s) [+] URL Affected Module(s) [+] Email Results - Mail Proof of Concept (PoC): ======================= The vulnerability can be exploited by local attackers with restricted iOS device user account and without user interaction. For security demonstration or to reproduce the vulnerability follow the provided information and steps below to continue. Manual steps to reproduce the vulnerability ... 1. Start your iOS device (iPhone or iPad) 2. Install the Port Scan application to your iOS device 3. Open Port Scan application 6. Include above a payload to the URL input field 7. Click to perform a quick port scan 7. After the scan has been performed successful you click on top right the menu button 8. Push the Email Results button to export the scan results 9. Now, the execution occurs in the email section were the checked URL value is included! 10. Successful reproduce of the remote vulnerability! PoC: Port Scan Results from 17.10.2015, 19 50.html <tr><td width="100"><div align="right"><strong>Address:</strong></div></td> <td width="185"><strong>www.>''<./[LOCAL COMMAND INJECT VULNERABILITY VIA DEVICE NAME VALUE!]></strong></td> </tr> <tr> <td><div align="right"><strong>on Date:</strong></div></td> <td><strong>17.10.2015, 19:50</strong></td> </tr> <tr> <td><div align="right"><strong>Open Ports:</strong></div></td> <td><strong>1</td> </tr> </table> <p></p> <table width=600 cellspacing=3><tr><td width=50><div align=right><strong>Port - </strong></div></td><td width=550><strong>Description</strong></td></tr></table> <tr><td width=60><div align=right><strong>80 :</strong> </div></td><td width=550><span class=Blue> HTTP - World Wide Web</span></td></tr></iframe></strong></td></tr> Solution - Fix & Patch: ======================= The vulnerability can be patched by a secure parse and encode of the vulnerable device name value in the export function. Restrict the input and disallow usage of special chars in names. Filter by an exception handling that prevents the execution of malicious local stored device values. # 0day.today [2018-03-10] #