<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anant+Shrivastava</id>
		<title>OWASP - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.owasp.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Anant+Shrivastava"/>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php/Special:Contributions/Anant_Shrivastava"/>
		<updated>2026-04-30T12:52:14Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.2</generator>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Bhopal&amp;diff=255574</id>
		<title>Bhopal</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Bhopal&amp;diff=255574"/>
				<updated>2019-10-20T06:58:33Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added reference to the new website&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= New Website =&lt;br /&gt;
&lt;br /&gt;
'''We Are moving our webpage to new Website : https://www2.owasp.org/www-chapter-bhopal/'''&lt;br /&gt;
&lt;br /&gt;
{{Chapter Template|chaptername=Bhopal|extra=The chapter leaders are [mailto:anant.shrivastava@owasp.org Anant Shrivastava] and [mailto:saurabh.chaudhary@owasap.org Saurabh Chaudhary].&lt;br /&gt;
|meetupurl=https://www.meetup.com/OWASP-Bhopal-Chapter/|region=Asia/Pacific/Middle East}}&lt;br /&gt;
&lt;br /&gt;
Everyone is welcome to join us at our chapter meetings.&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Chapter]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Anant_Shrivastava&amp;diff=254371</id>
		<title>Anant Shrivastava</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Anant_Shrivastava&amp;diff=254371"/>
				<updated>2019-08-30T13:31:22Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: Created page with &amp;quot;Test Page to claim User page&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Test Page to claim User page&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=250224</id>
		<title>User:Anant Shrivastava</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=250224"/>
				<updated>2019-04-17T07:54:00Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: Revamping of my user page to clearly outline my current posture.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Anant Shrivastava is an information security professional with 10+ yrs of corporate experience with expertise in Network, Mobile, Application and Linux Security. He is Regional Director Asia Pacific for NotSoSecure Global Services, he has trained ~600 delegates at various conferences (Blackhat all 3 editions, Nullcon, g0s, c0c0n). Anant also leads Open Source project Android Tamer ([https://www.androidtamer.com www.androidtamer.com]) and CodeVigilant ([https://www.codevigilant.com www.codevigilant.com]). His work can be found at [https://anantshri.info anantshri.info]&lt;br /&gt;
&lt;br /&gt;
As part of OWASP, Anant has worked at following:&lt;br /&gt;
# Currently Chapter leader OWASP Bhopal&lt;br /&gt;
# GSoC Mentor for OWASP OWTF Project&lt;br /&gt;
# Contributor OWASP Web Application Testing Guide &lt;br /&gt;
# Reviewer Mobile Security Testing Guide (MSTG)&lt;br /&gt;
# Reviewer Mobile Application Security Verification Standards (MASVS)&lt;br /&gt;
&lt;br /&gt;
Besides OWASP Anant is also active in multiple other open communities such as [https://null.co.in Null], [https://garage4hackers.com Garage4Hackers], [https://reconvillage.org/ Recon village] to name a few.&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=226772</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=226772"/>
				<updated>2017-02-25T07:08:20Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: couple of tweaks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
[[File:Andpen2.png]]&lt;br /&gt;
&lt;br /&gt;
A complete android pen testing involves different areas such as the ones described in the above picture&lt;br /&gt;
&lt;br /&gt;
===Application Mapping===&lt;br /&gt;
In this first phase, the focus relies on understanding the application logic and what exactly the application does. &lt;br /&gt;
This involves some manual test where we do some basic operations such as install the APK on the phone, login and comprehend the functionality of the app.&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors such as:&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
&lt;br /&gt;
===Client Attacks===&lt;br /&gt;
This is one of the most challenging and exciting parts of the pentest assessment.  Android apps are packed as an APK, also known as Android Package Kit or  Android Application Package. Our mission as Pen testers is to verify how well protected the application has been created and designed against known threat actors.Android Mobile applications are distributed through platforms like Google Play. Since the application is fully installed on the client, it becomes vulnerable to any attacks coming from the client. &lt;br /&gt;
&lt;br /&gt;
===Network Attacks===&lt;br /&gt;
As we need to identify vulnerabilities in the Client, is also essential to verify how secure is the communication between the Client and the Server by evaluating the traffic. For this purpose, using tools like Attack proxies, evaluating potential SSL issues, and executing Wireshark Data package inspection is an essential part of the assessment.&lt;br /&gt;
&lt;br /&gt;
===Server Attacks===&lt;br /&gt;
Last but not least, issues at the Server level will impact the security of the application. Insecure implementation such as misconfigurations , vulnerabilities and issues at API or Database level, affect also the security of an application&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. Reverse Engineering is an essential part of pen testing mobile applications. It also requires the use of rooted devices. If you have been wondering why do we need to Reverse Engineer an installed APK, the major reason relies on the client.&lt;br /&gt;
&lt;br /&gt;
==Devices==&lt;br /&gt;
&lt;br /&gt;
There are also different ways to pentest the application , and we should consider in which case we need to use one or the other &lt;br /&gt;
&lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Improper Platform Usage [Client Attacks]==&lt;br /&gt;
* Check AndroidManifest.xml permissions [https://developer.android.com/reference/android/Manifest.permission.html configurations] certain permissions can be [https://developer.android.com/guide/topics/permissions/requesting.html#normal-dangerous dangerous]&lt;br /&gt;
*If application uses fingerprinting, test against different vulnerabilities related to this [https://www.blackhat.com/docs/us-15/materials/us-15-Zhang-Fingerprints-On-Mobile-Devices-Abusing-And-Leaking-wp.pdf feature]&lt;br /&gt;
&lt;br /&gt;
== M2 - Insecure Data storage [Client Attacks] ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
It will probably require the use of a rooted Android device in order to access files in Android such as '/sdcard'&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries or file I/O. &lt;br /&gt;
&lt;br /&gt;
This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
# SQL / XML injection, and if the reading intent is publicly exposed another application could read this.&lt;br /&gt;
# Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be considered.&lt;br /&gt;
XSS will expose the entire application to the attacker as HTML5 applications will have the ability to call native functionality and hence control over the entire application. (WebViews)&lt;br /&gt;
&lt;br /&gt;
Additionally a backup of the application could be made using `adb backup` option and that can be analyzed to identify what the application stores and leaks when the client interacts with it.&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer [Network/Traffic attacks]==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or similar software. &lt;br /&gt;
* SSLv2, SSLv3 is disabled&lt;br /&gt;
* TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
* RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
* DH Params are &amp;gt;2048 Bits&lt;br /&gt;
* SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
* ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
* SSL Certificate is from Trusted RootCA&lt;br /&gt;
* SSL Certificate is not expired&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#IPC Verify Interprocess communication implementation] &lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
* Ensure application is working correctly by navigating around.&lt;br /&gt;
* Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
* Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
* Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
* Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
* Try again if everything works we have a application which employee's cert pinning and we have bypassed it using the xposed module.&lt;br /&gt;
* [https://developer.android.com/training/articles/security-gms-provider.html Android Security provider has been properly updated against SSL Exploits]&lt;br /&gt;
&lt;br /&gt;
== M4 - Insecure Authentication [Client/Server attacks]==&lt;br /&gt;
For this part some of the tools necessary in order to carry on the assessment are, &lt;br /&gt;
*attack proxies such as ZAP, BURP or Charles&lt;br /&gt;
*Wireshark for Traffic analysis&lt;br /&gt;
&lt;br /&gt;
By analyzing the traffic (HTTP request/response) between client and server, check the following items&lt;br /&gt;
*Analyze session management and workflow&lt;br /&gt;
*Analyze API authentication using  an attack proxy&lt;br /&gt;
*Insecure WebViews&lt;br /&gt;
*Check if Credentials are being stored in the Datastore or Server side&lt;br /&gt;
* Misuse or access to [https://developer.android.com/reference/android/accounts/AccountManager.html Account Manager]&lt;br /&gt;
*[https://docs.box.com/docs/android-security-guidelines#section-authenticating-callers-of-components Authenticating Callers of Components]&lt;br /&gt;
&lt;br /&gt;
Improper Session Handling typically results in the same outcomes as poor authentication. Once you are authenticated and given a session, that session allows one access to the mobile application.&lt;br /&gt;
There are multiple things to look at&lt;br /&gt;
* Check and validate Sessions on the Backend&lt;br /&gt;
* Check for session Timeout Protection&lt;br /&gt;
* Check for improper Cookies configuration&lt;br /&gt;
* Insecure Token Creation&lt;br /&gt;
*Insecure implementation of [https://developer.android.com/training/articles/security-tips.html#WebView WebView]&lt;br /&gt;
&lt;br /&gt;
== M5 - Insufficient Cryptography  [Client/Network/Server attacks]==&lt;br /&gt;
For this part , you will need to perform a overall analysis where you can enumerate where encryption has been used. For example:&lt;br /&gt;
*Type SSL/TLS encryption used&lt;br /&gt;
*Retrieving files securely using HTTPS URI or a secure tunnel such as implementing HttpsURLConnection or SSLSocket&lt;br /&gt;
*Authentication Session Tokens&lt;br /&gt;
*Data storage containing sensitive information in clear text&lt;br /&gt;
*Access to encryption keys or improper key management&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
*Implementation of own protocol&lt;br /&gt;
*Insecure use of Random Generators&lt;br /&gt;
&lt;br /&gt;
== M6 - Insecure Authorization [Client/Server attacks] ==&lt;br /&gt;
After a proper Application mapping and understanding the data flow, you can verify the authorization mechanism for the following:&lt;br /&gt;
*Handling credentials: does the application make use of authorization tokens instead of asking Credentials all the time?&lt;br /&gt;
*Verify that the application allows access only to the allowed roles&lt;br /&gt;
*Storing username and password in the data storage instead of using [https://developer.android.com/training/articles/security-tips.html AccountManager]&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Code Quality [Client Attacks]==&lt;br /&gt;
There are 2 approaches for this part:&lt;br /&gt;
*if you have access to the source code, doing code review on the Client app and the server API. &lt;br /&gt;
*IF you don't, you could still check the code by decompiling the APK&lt;br /&gt;
&lt;br /&gt;
We strongly recommend a Code Review in this case. This will definitely extract many potential vulnerabilities due to bad implementation&lt;br /&gt;
&lt;br /&gt;
== M8 - Code Tampering [Client Attacks]==&lt;br /&gt;
For this part you will need a rooted device and reverse engineering techniques&lt;br /&gt;
*Decompile APK using tools such as apktool, dex2jar / enjarify, Bytecodeviewer or commercial tools such as JEB&lt;br /&gt;
*Analysze code using decompiler such as JD-GUI or Bytecodeviewer. Commercial version such as JEB allows you to even debug the decompiled application but not in all cases&lt;br /&gt;
* After analyzing the code, attempt to bypass functionalities whether by changing the Smali code or Hooking methods using Xposed or Frida frameworks&lt;br /&gt;
* Verify if the application has been obfuscated and verify the level of obfuscation searching for specific strings.&lt;br /&gt;
*Decompile APK and change Smali, (check this tool: https://github.com/voider1/a2scomp)&lt;br /&gt;
*Android Binaries are basically dex classes, which if not protected can result in an easy decompilation of source code. This could lead to code / logic leakage.&lt;br /&gt;
Following controls need to be checked for and validated:&lt;br /&gt;
&lt;br /&gt;
* Jailbreak, Device Rooted- Detection Controls&lt;br /&gt;
* Checksum Controls&lt;br /&gt;
* Certificate Pinning Controls&lt;br /&gt;
* Debugger Detection Controls&lt;br /&gt;
*Xposed Detection Controls&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#DynamicCode Dynamic loading code]&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#Native use of Native code with Android NDK]&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
&lt;br /&gt;
(OWASP M10-2014)[https://www.owasp.org/index.php/Mobile_Top_10_2014-M10]&lt;br /&gt;
&lt;br /&gt;
== M9 -Reverse Engineering [Client attacks] ==&lt;br /&gt;
Reverse Engineering is an essential part of pen testing mobile applications. It also requires the use of rooted devices.&lt;br /&gt;
For this part make sure that you have prepared the following tools :&lt;br /&gt;
*Android Studio with SDK tools installed&lt;br /&gt;
*A rooted Android Device or Emulator&lt;br /&gt;
*For a rooted emulator you can use CuckoDroid which has Xposed installed&lt;br /&gt;
*Different tools installed for decompiling the APK such as apktool,Dex2Jar / enjarify or if you are looking for a total one use Bytecodeviewer or JEB&lt;br /&gt;
*IDA pro (for analyzing code flow)&lt;br /&gt;
* Smali decompiler/compiler and signer : https://github.com/voider1/a2scomp&lt;br /&gt;
&lt;br /&gt;
Verify that:&lt;br /&gt;
*Has the application be obfuscated?&lt;br /&gt;
*Search for key strings and keywords with tools like Bytecodeviewer or JEB &lt;br /&gt;
*Search for implantation of SSL pinning , Device rooted or connections to API's (search for words like 'TrustManager' , 'SHA256', X509 ,SHA, SSL , for more info see [https://docs.box.com/docs/android-security-guidelines Android Security Guidelines]&lt;br /&gt;
&lt;br /&gt;
== M10 - Extraneous Functionality ==&lt;br /&gt;
For testing this part, it will be necessary to do a code review or Reverse engineer the APK (if code is not available)&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
* Jonathan Carter&lt;br /&gt;
* Prashant Phatak&lt;br /&gt;
* Milan Singh Thakur&lt;br /&gt;
* Anant Shrivastava&lt;br /&gt;
* Johanna Curiel&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=226771</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=226771"/>
				<updated>2017-02-25T07:05:39Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: minor edit: added alternatives for dex2jar and changed capitilization&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
[[File:Andpen2.png]]&lt;br /&gt;
&lt;br /&gt;
A complete android pen testing involves different areas such as the ones described in the above picture&lt;br /&gt;
&lt;br /&gt;
===Application Mapping===&lt;br /&gt;
In this first phase, the focus relies on understanding the application logic and what exactly the application does. &lt;br /&gt;
This involves some manual test where we do some basic operations such as install the APK on the phone, login and comprehend the functionality of the app.&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors such as:&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
&lt;br /&gt;
===Client Attacks===&lt;br /&gt;
This is one of the most challenging and exciting parts of the pentest assessment.  Android apps are packed as an APK, also known as Android Package Kit or  Android Application Package. Our mission as Pen testers is to verify how well protected the application has been created and designed against known threat actors.Android Mobile applications are distributed through platforms like Google Play. Since the application is fully installed on the client, it becomes vulnerable to any attacks coming from the client. &lt;br /&gt;
&lt;br /&gt;
===Network Attacks===&lt;br /&gt;
As we need to identify vulnerabilities in the Client, is also essential to verify how secure is the communication between the Client and the Server by evaluating the traffic. For this purpose, using tools like Attack proxies, evaluating potential SSL issues, and executing Wireshark Data package inspection is an essential part of the assessment.&lt;br /&gt;
&lt;br /&gt;
===Server Attacks===&lt;br /&gt;
Last but not least, issues at the Server level will impact the security of the application. Insecure implementation such as misconfigurations , vulnerabilities and issues at API or Database level, affect also the security of an application&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. Reverse Engineering is an essential part of pen testing mobile applications. It also requires the use of rooted devices. If you have been wondering why do we need to Reverse Engineer an installed APK, the major reason relies on the client.&lt;br /&gt;
&lt;br /&gt;
==Devices==&lt;br /&gt;
&lt;br /&gt;
There are also different ways to pentest the application , and we should consider in which case we need to use one or the other &lt;br /&gt;
&lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Improper Platform Usage [Client Attacks]==&lt;br /&gt;
* Check AndroidManifest.xml permissions [https://developer.android.com/reference/android/Manifest.permission.html configurations] certain permissions can be [https://developer.android.com/guide/topics/permissions/requesting.html#normal-dangerous dangerous]&lt;br /&gt;
*If application uses fingerprinting, test against different vulnerabilities related to this [https://www.blackhat.com/docs/us-15/materials/us-15-Zhang-Fingerprints-On-Mobile-Devices-Abusing-And-Leaking-wp.pdf feature]&lt;br /&gt;
&lt;br /&gt;
== M2 - Insecure Data storage [Client Attacks] ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
It will probably require the use of a rooted Android device in order to access files in Android such as '/sdcard'&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries or file I/O. &lt;br /&gt;
&lt;br /&gt;
This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
# SQL / XML injection, and if the reading intent is publicly exposed another application could read this.&lt;br /&gt;
# Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be considered.&lt;br /&gt;
XSS will expose the entire application to the attacker as HTML5 applications will have the ability to call native functionality and hence control over the entire application. (WebViews)&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer [Network/Traffic attacks]==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or similar software. &lt;br /&gt;
* SSLv2, SSLv3 is disabled&lt;br /&gt;
* TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
* RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
* DH Params are &amp;gt;2048 Bits&lt;br /&gt;
* SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
* ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
* SSL Certificate is from Trusted RootCA&lt;br /&gt;
* SSL Certificate is not expired&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#IPC Verify Interprocess communication implementation] &lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
* Ensure application is working correctly by navigating around.&lt;br /&gt;
* Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
* Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
* Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
* Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
* Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
* [https://developer.android.com/training/articles/security-gms-provider.html Android Security provider has been properly updated against SSL Exploits]&lt;br /&gt;
&lt;br /&gt;
== M4 - Insecure Authentication [Client/Server attacks]==&lt;br /&gt;
For this part some of the tools necessary in order to carry on the assessment are, &lt;br /&gt;
*attack proxies such as ZAP, BURP or Charles&lt;br /&gt;
*Wireshark for Traffic analysis&lt;br /&gt;
&lt;br /&gt;
By analyzing the traffic (HTTP request/response) between client and server, check the following items&lt;br /&gt;
*Analyze session management and workflow&lt;br /&gt;
*Analyze API authentication using  an attack proxy&lt;br /&gt;
*Insecure WebViews&lt;br /&gt;
*Check if Credentials are being stored in the Datastore or Server side&lt;br /&gt;
* Misuse or access to [https://developer.android.com/reference/android/accounts/AccountManager.html Account Manager]&lt;br /&gt;
*[https://docs.box.com/docs/android-security-guidelines#section-authenticating-callers-of-components Authenticating Callers of Components]&lt;br /&gt;
&lt;br /&gt;
Improper Session Handling typically results in the same outcomes as poor authentication. Once you are authenticated and given a session, that session allows one access to the mobile application.&lt;br /&gt;
There are multiple things to look at&lt;br /&gt;
* Check and validate Sessions on the Backend&lt;br /&gt;
* Check for session Timeout Protection&lt;br /&gt;
* Check for improper Cookies configuration&lt;br /&gt;
* Insecure Token Creation&lt;br /&gt;
*Insecure implementation of [https://developer.android.com/training/articles/security-tips.html#WebView WebView]&lt;br /&gt;
&lt;br /&gt;
== M5 - Insufficient Cryptography  [Client/Network/Server attacks]==&lt;br /&gt;
For this part , you will need to perform a overall analysis where you can enumerate where encryption has been used. For example:&lt;br /&gt;
*Type SSL/TLS encryption used&lt;br /&gt;
*Retrieving files securely using HTTPS URI or a secure tunnel such as implementing HttpsURLConnection or SSLSocket&lt;br /&gt;
*Authentication Session Tokens&lt;br /&gt;
*Data storage containing sensitive information in clear text&lt;br /&gt;
*Access to encryption keys or improper key management&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
*Implementation of own protocol&lt;br /&gt;
*Insecure use of Random Generators&lt;br /&gt;
&lt;br /&gt;
== M6 - Insecure Authorization [Client/Server attacks] ==&lt;br /&gt;
After a proper Application mapping and understanding the data flow, you can verify the authorization mechanism for the following:&lt;br /&gt;
*Handling credentials: does the application make use of authorization tokens instead of asking Credentials all the time?&lt;br /&gt;
*Verify that the application allows access only to the allowed roles&lt;br /&gt;
*Storing username and password in the data storage instead of using [https://developer.android.com/training/articles/security-tips.html AccountManager]&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Code Quality [Client Attacks]==&lt;br /&gt;
There are 2 approaches for this part:&lt;br /&gt;
*if you have access to the source code, doing code review on the Client app and the server API. &lt;br /&gt;
*IF you don't, you could still check the code by decompiling the APK&lt;br /&gt;
&lt;br /&gt;
We strongly recommend a Code Review in this case. This will definitely extract many potential vulnerabilities due to bad implementation&lt;br /&gt;
&lt;br /&gt;
== M8 - Code Tampering [Client Attacks]==&lt;br /&gt;
For this part you will need a rooted device and reverse engineering techniques&lt;br /&gt;
*Decompile APK using tools such as apktool, dex2jar / enjarify, Bytecodeviewer or commercial tools such as JEB&lt;br /&gt;
*Analysze code using decompiler such as JD-GUI or Bytecodeviewer. Commercial version such as JEB allows you to even debug the decompiled application but not in all cases&lt;br /&gt;
* After analyzing the code, attempt to bypass functionalities whether by changing the Smali code or Hooking methods using Xposed or Frida frameworks&lt;br /&gt;
* Verify if the application has been obfuscated and verify the level of obfuscation searching for specific strings.&lt;br /&gt;
*Decompile APK and change Smali, (check this tool: https://github.com/voider1/a2scomp)&lt;br /&gt;
*Android Binaries are basically dex classes, which if not protected can result in an easy decompilation of source code. This could lead to code / logic leakage.&lt;br /&gt;
Following controls need to be checked for and validated:&lt;br /&gt;
&lt;br /&gt;
* Jailbreak, Device Rooted- Detection Controls&lt;br /&gt;
* Checksum Controls&lt;br /&gt;
* Certificate Pinning Controls&lt;br /&gt;
* Debugger Detection Controls&lt;br /&gt;
*Xposed Detection Controls&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#DynamicCode Dynamic loading code]&lt;br /&gt;
*[https://developer.android.com/training/articles/security-tips.html#Native use of Native code with Android NDK]&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
&lt;br /&gt;
(OWASP M10-2014)[https://www.owasp.org/index.php/Mobile_Top_10_2014-M10]&lt;br /&gt;
&lt;br /&gt;
== M9 -Reverse Engineering [Client attacks] ==&lt;br /&gt;
Reverse Engineering is an essential part of pen testing mobile applications. It also requires the use of rooted devices.&lt;br /&gt;
For this part make sure that you have prepared the following tools :&lt;br /&gt;
*Android Studio with SDK tools installed&lt;br /&gt;
*A rooted Android Device or Emulator&lt;br /&gt;
*For a rooted emulator you can use CuckoDroid which has Xposed installed&lt;br /&gt;
*Different tools installed for decompiling the APK such as apktool,Dex2Jar / enjarify or if you are looking for a total one use Bytecodeviewer or JEB&lt;br /&gt;
*IDA pro (for analyzing code flow)&lt;br /&gt;
* Smali decompiler/compiler and signer : https://github.com/voider1/a2scomp&lt;br /&gt;
&lt;br /&gt;
Verify that:&lt;br /&gt;
*Has the application be obfuscated?&lt;br /&gt;
*Search for key strings and keywords with tools like Bytecodeviewer or JEB &lt;br /&gt;
*Search for implantation of SSL pinning , Device rooted or connections to API's (search for words like 'TrustManager' , 'SHA256', X509 ,SHA, SSL , for more info see [https://docs.box.com/docs/android-security-guidelines Android Security Guidelines]&lt;br /&gt;
&lt;br /&gt;
== M10 - Extraneous Functionality ==&lt;br /&gt;
For testing this part, it will be necessary to do a code review or Reverse engineer the APK (if code is not available)&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
* Jonathan Carter&lt;br /&gt;
* Prashant Phatak&lt;br /&gt;
* Milan Singh Thakur&lt;br /&gt;
* Anant Shrivastava&lt;br /&gt;
* Johanna Curiel&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Mobile_Security_Testing_Guide&amp;diff=224116</id>
		<title>OWASP Mobile Security Testing Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Mobile_Security_Testing_Guide&amp;diff=224116"/>
				<updated>2016-12-13T17:43:39Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: masvs link correction as per https://github.com/OWASP/owasp-masvs/issues/63&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Main=&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:OWASP_MSTG_Header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
==Our Vision ==&lt;br /&gt;
&lt;br /&gt;
'''Create a comprehensive methodology that covers the processes, techniques, and tools used during a mobile app security test, and define an exhaustive set of test cases that enables testers to deliver consistent and complete results.'''&lt;br /&gt;
&lt;br /&gt;
At least, that was the ''initial'' vision. However, we soon discovered that we had to ask some deeper questions on what mobile app security is about: Without a reasonable definition a &amp;quot;secure&amp;quot; mobile app, there wasn't really anything to test against. We therefore went back to the drawing board and wrote the MASVS, a &amp;quot;mobile security standard&amp;quot; that defines the baseline security requirements.&lt;br /&gt;
&lt;br /&gt;
== Main Documents  ==&lt;br /&gt;
&lt;br /&gt;
   {| cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | [[File:masvs-sample-mini.jpg|link=]]&lt;br /&gt;
  |  '''Mobile AppSec Verification Standard (MASVS)'''&lt;br /&gt;
A standard for mobile app security. It is meant to be used by mobile software architects and developers seeking to develop secure mobile applications and as a basis for mobile app security testing methodologies. The MASVS lists requirements for both security controls and software protection mechanisms, and defines four verification levels that can be applied to achieve different grades of security and resiliency. &lt;br /&gt;
&lt;br /&gt;
The MASVS is in a pre-release state. A (slightly outdated) [https://github.com/OWASP/owasp-masvs/releases/tag/0.91 PDF release] is available. The most current set of requirements can be found in the master branch on [https://github.com/OWASP/owasp-masvs GitHub].&lt;br /&gt;
   |-&lt;br /&gt;
   | [[File:testing-guide-sample-mini.jpg|link=]]&lt;br /&gt;
   | '''Mobile Security Testing Guide (MSTG)'''&lt;br /&gt;
A comprehensive guide for iOS and Android mobile security testers that includes the following content:&lt;br /&gt;
# Mobile platform internals&lt;br /&gt;
# Testing in the secure development lifecycle&lt;br /&gt;
# Basic white-box and black-box security testing&lt;br /&gt;
# Mobile reverse engineering and tampering&lt;br /&gt;
# Assessing software protections&lt;br /&gt;
# Detailed white-box and black-box test cases that map to the requirements in the MASVS.&lt;br /&gt;
The MSTG is a work-in-progress. Currently, we hope to be &amp;quot;feature-complete&amp;quot; in Q1 2017. You can access the existing content in the [https://github.com/OWASP/owasp-mstg GitHub Repo].&lt;br /&gt;
   |-&lt;br /&gt;
   | [[File:checklist.jpg|link=]]&lt;br /&gt;
   | '''Mobile Security Testing Checklists'''&lt;br /&gt;
A basis of checklists will be made available in addition to the verification standard and testing guide.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Breakers]]  [[Category:OWASP_Document]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;padding-left:25px;width:200px;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
&lt;br /&gt;
==Classifications==&lt;br /&gt;
&lt;br /&gt;
   {| width=&amp;quot;200&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;center&amp;quot; width=&amp;quot;50%&amp;quot;| [[File:Owasp-breakers-small.png|link=https://www.owasp.org/index.php/Breakers]]&lt;br /&gt;
   |&lt;br /&gt;
   |-&lt;br /&gt;
   | align=&amp;quot;center&amp;quot; valign=&amp;quot;center&amp;quot; width=&amp;quot;50%&amp;quot;| &lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Cc-button-y-sa-small.png|link=http://creativecommons.org/licenses/by-sa/3.0/]]&lt;br /&gt;
   |-&lt;br /&gt;
   | colspan=&amp;quot;2&amp;quot; align=&amp;quot;center&amp;quot;  | [[File:Project_Type_Files_DOC.jpg|link=]]&lt;br /&gt;
   |}&lt;br /&gt;
&lt;br /&gt;
== Project Leaders ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://www.owasp.org/index.php/User:Bernhard_Mueller Bernhard Mueller]&lt;br /&gt;
&lt;br /&gt;
[https://www.owasp.org/index.php/User:Sven_Schleier Sven Schleier]&lt;br /&gt;
&lt;br /&gt;
== Project Initiator ==&lt;br /&gt;
&lt;br /&gt;
[https://www.owasp.org/index.php/User:Milan_Singh_Thakur Milan Singh Thakur]&lt;br /&gt;
&lt;br /&gt;
== Road Map ==&lt;br /&gt;
&lt;br /&gt;
* Q2 2017: Beta release&lt;br /&gt;
* Q3 2017: Version 1.0&lt;br /&gt;
* Q4 2017: Produce A Printable Book&lt;br /&gt;
&lt;br /&gt;
== Parent Project ==&lt;br /&gt;
&lt;br /&gt;
[[OWASP_Mobile_Security_Project]]&lt;br /&gt;
&lt;br /&gt;
==Licensing==&lt;br /&gt;
&lt;br /&gt;
The guide is licensed under the http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-ShareAlike 3.0 license], so you can copy, distribute and transmit the work, and you can adapt it, and use it commercially, but all provided that you attribute the work and if you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=News=&lt;br /&gt;
&lt;br /&gt;
== December 4th, 2016: Call for authors: The ultimate open-source mobile app reverse engineering guide ==&lt;br /&gt;
&lt;br /&gt;
Reverse engineering is an art, and describing every available facet of it would fill a whole library. The sheer range techniques and possible specializations is mind-blowing: One can spend years working on a very specific, isolated sub-problem, such as automating malware analysis or developing novel de-obfuscation methods. For mobile app security testers, it can be challenging to filter through the vast amount of information and build a working methodology. Things become even more problematic when one is tasked to assess apps that are heavily obfuscated and have anti-tampering measures built in.&lt;br /&gt;
&lt;br /&gt;
One of the main goals in the MSTG is to build the ultimate resource for mobile reverse engineers. This includes not only basic static and dynamic analysis, but also advanced de-obfuscation, scripting and automation. Obviously, writing all this content is a lot of work, both in terms of general content and OS-specific how-tos. We're therefore looking for talented authors that want to join the project early on. Topics include the following:&lt;br /&gt;
&lt;br /&gt;
* Basic Hybrid Static/Dynamic Analysis&lt;br /&gt;
* Code Injection and Dynamic Instrumentation (Substrate, FRIDA)&lt;br /&gt;
* Dynamic Binary Instrumentation (Valgrind, PIE)&lt;br /&gt;
* Analysis Frameworks (Metasm / Miasm)&lt;br /&gt;
* Symbolic Execution&lt;br /&gt;
* DCA and DPA attacks on white-box crypto&lt;br /&gt;
* Dynamic analysis frameworks (PANDA / DroidScope,...)&lt;br /&gt;
* Anything else we might have missed&lt;br /&gt;
&lt;br /&gt;
=== What is in for me? ===&lt;br /&gt;
&lt;br /&gt;
All of this is unpaid, volunteer work. However, depending on your contribution, you will be named in the &amp;quot;lead authors&amp;quot; or &amp;quot;contributors&amp;quot; list, and you'll be able to point to the fact that you co-authored the guide. You'll also be contributing to the field, helping others who are just starting out, and in turn becoming a happier person yourself (reaping the full benefits of your altruism).&lt;br /&gt;
&lt;br /&gt;
=== Where do I sign up? ===&lt;br /&gt;
&lt;br /&gt;
First of all, have a look at the existing RE chapters outline:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/OWASP/owasp-mstg/blob/master/Document/0x06-Reverse-Engineering-and-Tampering.md Generic / Introduction]&lt;br /&gt;
* [https://github.com/OWASP/owasp-mstg/blob/master/Document/0x06a-Reverse-Engineering-and-Tampering-Android.md Android]&lt;br /&gt;
* [https://github.com/OWASP/owasp-mstg/blob/master/Document/0x06b-Reverse-Engineering-and-Tampering-iOS.md iOS]&lt;br /&gt;
&lt;br /&gt;
You'll probably immediately have ideas on how you can contribute. If that's the case, read the [https://github.com/OWASP/owasp-mstg/blob/master/authors_guide.md author's guide] first. &lt;br /&gt;
&lt;br /&gt;
Then contact [https://github.com/b-mueller Bernhard Mueller] - ideally directly on the  [https://owasp.slack.com/messages/project-mobile_omtg/details/ OWASP Mobile Security Project Slack Channel], where you'll find all the other project members. You can sign up for an account [http://owasp.herokuapp.com/ here].&lt;br /&gt;
&lt;br /&gt;
=FAQs=&lt;br /&gt;
&lt;br /&gt;
==How can I participate in your project?==&lt;br /&gt;
First of all, read the [https://github.com/OWASP/owasp-mstg/blob/master/authors_guide.md author's guide] and decide in what for you would like to contribute.&lt;br /&gt;
Then, contact the lead author responsible for the chapter you are interested in. You can find their name and GitHub handle in the project [https://github.com/OWASP/owasp-mstg/blob/master/README.md README]. Please always check with the responsible person first, or you might end up working on a chapter that's already being done by someone else. &lt;br /&gt;
In any case, we encourage you to join [https://owasp.slack.com/messages/project-mobile_omtg/details/ OWASP Mobile Security Project Slack Channel], where you'll find all the other project members. You can sign up for an account [http://owasp.herokuapp.com/ here].&lt;br /&gt;
&lt;br /&gt;
The home of the OWASP Mobile Security Testing Guide is on [https://github.com/OWASP/owasp-mstg GitHub.] The MASVS is hosted in a [https://github.com/OWASP/owasp-masvs separate repository].&lt;br /&gt;
&lt;br /&gt;
==Where do you guys need help the most?==&lt;br /&gt;
&lt;br /&gt;
There's a lot of areas where you can help out:&lt;br /&gt;
&lt;br /&gt;
* Writing original content, such as describing testing processes and writing test cases. We're all doing this in our spare time, which unfortunately means that things sometimes slow down to a crawl. If you're knowledgeable in some area and have time available, we'd be incredibly thankful to anyone who contributes, even if it's only one or two test cases.&lt;br /&gt;
&lt;br /&gt;
* Reviewing content and giving feedback. The proper channel for questions and feedback is the GitHub issues system of the respective repo, contacting us on [https://owasp.slack.com/messages/project-mobile_omtg/details/ OWASP Mobile Security Project Slack Channel] is another possibility.&lt;br /&gt;
&lt;br /&gt;
* Developing tools. For example, we still don't have an automated way of generating checklists out of the GitHub repo.&lt;br /&gt;
&lt;br /&gt;
* Contributing to auxiliary projects: The [https://github.com/b-mueller/obfuscation-metrics obfuscation metrics project] is an auxiliary project that deals with specific forms of control flow and data obfuscation. This project needs experts in advanced obfuscation / de-obfuscation. Please contact us if you have experience in this area.&lt;br /&gt;
&lt;br /&gt;
==If I am not a programmer can I participate in your project?==&lt;br /&gt;
Yes, you can certainly participate in the project if you are not a programmer or technical. The project needs different skills and expertise and different times during its development. Currently, we are looking for researchers, writers, graphic designers, and a project administrator.&lt;br /&gt;
&lt;br /&gt;
==I contributed to the original Google Doc, but I'm not credited in the new version of the MSTG? ==&lt;br /&gt;
As we migrated some of the existing content, we did our best to backtrack the original authors and credit them appropriately. We also added a [https://github.com/OWASP/owasp-mstg/blob/master/Document/0x02-Frontispiece.md revision history] that lists all the authors from old Google Docs. If you are not on that list but feel you should be, please contact [https://github.com/b-mueller Bernhard] or [https://github.com/sushi2k Sven] and they'll fix it. Or better yet, re-join the author's team and start contributing to the new guide.&lt;br /&gt;
&lt;br /&gt;
= Acknowledgements =&lt;br /&gt;
&lt;br /&gt;
==Contributors==&lt;br /&gt;
&lt;br /&gt;
The Mobile Security Testing Guide was initiated by  [https://www.owasp.org/index.php/User:Milan_Singh_Thakur Milan Singh Thakur] in 2015. The original document was hosted on Google Drive. Guide development was moved to GitHub in October 2016. Below is the full list of contributors for each revision.&lt;br /&gt;
&lt;br /&gt;
=== MSTG in its current form ===&lt;br /&gt;
&lt;br /&gt;
'''Lead Authors:'''&lt;br /&gt;
&lt;br /&gt;
* Stephen Corbiaux&lt;br /&gt;
* Bernhard Mueller&lt;br /&gt;
* Sven Schleier&lt;br /&gt;
* Francesco Stillavato&lt;br /&gt;
* Stefan Streichsbier&lt;br /&gt;
* Abdessamad Temmar&lt;br /&gt;
* Stephanie Vanroelen&lt;br /&gt;
* Gerhard Wagner&lt;br /&gt;
* Jeroen Willemsen&lt;br /&gt;
&lt;br /&gt;
'''Contributors:'''&lt;br /&gt;
&lt;br /&gt;
* Davide Cioccia&lt;br /&gt;
* Bao Le&lt;br /&gt;
* Shiv Patel&lt;br /&gt;
* Prathan Phongthiproek&lt;br /&gt;
* Abhinav Sejpal&lt;br /&gt;
* Anant Shrivastava&lt;br /&gt;
* Pragati Singh&lt;br /&gt;
* Milan Singh Thakur&lt;br /&gt;
* Blessen Thomas&lt;br /&gt;
* Dennis Titze&lt;br /&gt;
* Bernard Wagner&lt;br /&gt;
&lt;br /&gt;
=== MSTG &amp;quot;Beta 2&amp;quot; on Google Drive ===&lt;br /&gt;
&lt;br /&gt;
'''Authors:'''&lt;br /&gt;
&lt;br /&gt;
* Mirza Ali&lt;br /&gt;
* Stephen Corbiaux&lt;br /&gt;
* Ryan Dewhurst&lt;br /&gt;
* Mohammad Hamed Dadpour&lt;br /&gt;
* David Fern&lt;br /&gt;
* Bao Lee&lt;br /&gt;
* Anto Joseph&lt;br /&gt;
* Nutan Kumar Panda&lt;br /&gt;
* Rahil Parikh&lt;br /&gt;
* Julian Schütte&lt;br /&gt;
* Abhinav Sejpal&lt;br /&gt;
* Anant Shrivastava&lt;br /&gt;
* Pragati Singh&lt;br /&gt;
* Milan Singh Thakur&lt;br /&gt;
* Stephanie Vanroelen&lt;br /&gt;
* Gerhard Wagner&lt;br /&gt;
&lt;br /&gt;
'''Reviewers:'''&lt;br /&gt;
&lt;br /&gt;
* Andrew Muller&lt;br /&gt;
* Jonathan Carter&lt;br /&gt;
* Stephanie Vanroelen&lt;br /&gt;
* Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
=== MSTG &amp;quot;Beta 1&amp;quot; on Google Drive ===&lt;br /&gt;
&lt;br /&gt;
'''Authors:''' &lt;br /&gt;
&lt;br /&gt;
*Mirza Ali &lt;br /&gt;
*Mohammad Hamed Dadpour&lt;br /&gt;
*David Fern&lt;br /&gt;
*Rahil Parikh&lt;br /&gt;
*Abhinav Sejpal&lt;br /&gt;
*Pragati Singh&lt;br /&gt;
*Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
'''Reviewers:'''&lt;br /&gt;
&lt;br /&gt;
*Andrew Muller&lt;br /&gt;
*Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
'''Top Contributors:'''&lt;br /&gt;
&lt;br /&gt;
*Jim Manico&lt;br /&gt;
*Yair Amit&lt;br /&gt;
*Amin Lalji&lt;br /&gt;
*OWASP Mobile Team&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- DO NOT ALTER OR REMOVE THE TEXT ON NEXT LINE --&amp;gt;&lt;br /&gt;
__NOTOC__ &amp;lt;headertabs /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Builders]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Document]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211771</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211771"/>
				<updated>2016-03-25T06:11:42Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M10 - Lack of Binary Protection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or similar software. &lt;br /&gt;
* SSLv2, SSLv3 is disabled&lt;br /&gt;
* TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
* RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
* DH Params are &amp;gt;2048 Bits&lt;br /&gt;
* SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
* ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
* SSL Certificate is from Trusted RootCA&lt;br /&gt;
* SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
* Ensure application is working correctly by navigating around.&lt;br /&gt;
* Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
* Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
* Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
* Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
* Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
&lt;br /&gt;
There are multiple things to look at &lt;br /&gt;
&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries or file I/O. &lt;br /&gt;
&lt;br /&gt;
This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
# SQL / XML injection, and if the reading intent is publicly exposed another application could read this.&lt;br /&gt;
# Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be considered.&lt;br /&gt;
XSS will expose the entire application to the attacker as HTML5 applications will have the ability to call native functionality and hence control over the entire application.&lt;br /&gt;
&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
Improper Session Handling typically results in the same outcomes as poor authentication. Once you are authenticated and given a session, that session allows one access to the mobile application.&lt;br /&gt;
There are multiple things to look at&lt;br /&gt;
* Check and validate Sessions on the Backend&lt;br /&gt;
* Check for session Timeout Protection&lt;br /&gt;
* Check for improper Cookies configuration&lt;br /&gt;
* Insecure Token Creation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
Android Binaries are basically dex classes, which if not protected can result in an easy decompilation of source code. This could lead to code / logic leakage.&lt;br /&gt;
&lt;br /&gt;
Following controls need to be checked for and validated:&lt;br /&gt;
&lt;br /&gt;
* Jailbreak Detection Controls&lt;br /&gt;
* Checksum Controls&lt;br /&gt;
* Certificate Pinning Controls&lt;br /&gt;
* Debugger Detection Controls&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
&lt;br /&gt;
(OWASP M10-2014)[https://www.owasp.org/index.php/Mobile_Top_10_2014-M10]&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211770</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211770"/>
				<updated>2016-03-25T06:11:13Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M10 - Lack of Binary Protection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or similar software. &lt;br /&gt;
* SSLv2, SSLv3 is disabled&lt;br /&gt;
* TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
* RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
* DH Params are &amp;gt;2048 Bits&lt;br /&gt;
* SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
* ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
* SSL Certificate is from Trusted RootCA&lt;br /&gt;
* SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
* Ensure application is working correctly by navigating around.&lt;br /&gt;
* Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
* Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
* Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
* Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
* Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
&lt;br /&gt;
There are multiple things to look at &lt;br /&gt;
&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries or file I/O. &lt;br /&gt;
&lt;br /&gt;
This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
# SQL / XML injection, and if the reading intent is publicly exposed another application could read this.&lt;br /&gt;
# Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be considered.&lt;br /&gt;
XSS will expose the entire application to the attacker as HTML5 applications will have the ability to call native functionality and hence control over the entire application.&lt;br /&gt;
&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
Improper Session Handling typically results in the same outcomes as poor authentication. Once you are authenticated and given a session, that session allows one access to the mobile application.&lt;br /&gt;
There are multiple things to look at&lt;br /&gt;
* Check and validate Sessions on the Backend&lt;br /&gt;
* Check for session Timeout Protection&lt;br /&gt;
* Check for improper Cookies configuration&lt;br /&gt;
* Insecure Token Creation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
Android Binaries are basically dex classes, which if not protected can result in an easy decompilation of source code. This could lead to code / logic leakage.&lt;br /&gt;
&lt;br /&gt;
Following controls need to be checked for and validated:&lt;br /&gt;
&lt;br /&gt;
* Jailbreak Detection Controls&lt;br /&gt;
* Checksum Controls&lt;br /&gt;
* Certificate Pinning Controls&lt;br /&gt;
* Debugger Detection Controls&lt;br /&gt;
&lt;br /&gt;
References&lt;br /&gt;
[OWASP M10-2014](https://www.owasp.org/index.php/Mobile_Top_10_2014-M10)&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211754</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211754"/>
				<updated>2016-03-24T19:24:41Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: Restored M9 to correct place&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or similar software. &lt;br /&gt;
* SSLv2, SSLv3 is disabled&lt;br /&gt;
* TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
* RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
* DH Params are &amp;gt;2048 Bits&lt;br /&gt;
* SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
* ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
* SSL Certificate is from Trusted RootCA&lt;br /&gt;
* SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
* Ensure application is working correctly by navigating around.&lt;br /&gt;
* Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
* Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
* Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
* Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
* Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
&lt;br /&gt;
There are multiple things to look at &lt;br /&gt;
&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries or file I/O. &lt;br /&gt;
&lt;br /&gt;
This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
# SQL / XML injection, and if the reading intent is publicly exposed another application could read this.&lt;br /&gt;
# Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
If the application is a HTML5 hybrid application then Cross Site Scripting (XSS) should also be considered.&lt;br /&gt;
XSS will expose the entire application to the attacker as HTML5 applications will have the ability to call native functionality and hence control over the entire application.&lt;br /&gt;
&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
Improper Session Handling typically results in the same outcomes as poor authentication. Once you are authenticated and given a session, that session allows one access to the mobile application.&lt;br /&gt;
There are multiple things to look at&lt;br /&gt;
* Check and validate Sessions on the Backend&lt;br /&gt;
* Check for session Timeout Protection&lt;br /&gt;
* Check for improper Cookies configuration&lt;br /&gt;
* Insecure Token Creation&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211414</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211414"/>
				<updated>2016-03-18T17:36:36Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M7 - Client Side Injection */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
&lt;br /&gt;
There are multiple things to look at &lt;br /&gt;
&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
&lt;br /&gt;
Android applications need to store data locally in sqlite files or XML structures and hence need to performs either SQL/XML Queries to DB or file read calls. This gives rise to 2 major issues.&lt;br /&gt;
&lt;br /&gt;
1. SQL / XML injection, and if the reading intent is publically exposed another application could read this.&lt;br /&gt;
2. Local file read which can allow other application to read files of the application in question and if they contain sensitive data then data leakage via this media. &lt;br /&gt;
&lt;br /&gt;
Besides this if we are dealing with HTML5 / Hybrid application XSS or Cross Site Scripting can also be considered. This XSS will expose the entire application to attacker as HTML5 applications will have wrapper to call native functionality and hence XSS will have control over entire application.&lt;br /&gt;
&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211413</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211413"/>
				<updated>2016-03-18T17:30:45Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M6 - Broken Cryptography */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
&lt;br /&gt;
There are multiple things to look at &lt;br /&gt;
&lt;br /&gt;
* Usage of known weak crypto algo's like Rot13, MD4, MD5, RC2, RC4, SHA1&lt;br /&gt;
* Do it Yourself / let me design my own algo for encryption&lt;br /&gt;
* Secret key hard coded in the application code itself.&lt;br /&gt;
&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211311</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211311"/>
				<updated>2016-03-17T07:12:57Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M5 - Poor Authorization and Authentication */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
&lt;br /&gt;
One of the simplest check's to be performed after application is used for some time and it has time to put the data inside system.&lt;br /&gt;
&lt;br /&gt;
* enumerate all exported activities&lt;br /&gt;
* start each activity and identify if the activity was suppose to be publicly accessible or not.&lt;br /&gt;
* Any activity displaying confidential information should be behind authentication. (confidential information includes PII (Personally identifiable data), financial data etc)&lt;br /&gt;
&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211309</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211309"/>
				<updated>2016-03-17T07:09:23Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* Authors and Primary Editors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
Anant Shrivastava&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211307</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211307"/>
				<updated>2016-03-17T05:44:07Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M4 - Unintended Data Leakage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
&lt;br /&gt;
Simmilar to M2 this section requires application to be used however while the application is in use we need to monitor following places.&lt;br /&gt;
&lt;br /&gt;
* adb logcat output&lt;br /&gt;
* cache and webcache folder locations&lt;br /&gt;
&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211305</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211305"/>
				<updated>2016-03-17T05:26:26Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M3 - Insufficient Transport Layer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
&lt;br /&gt;
Multiple layer of checks to be performed here&lt;br /&gt;
&lt;br /&gt;
1. On Server side&lt;br /&gt;
&lt;br /&gt;
* Identify all ssl endpoints.&lt;br /&gt;
&lt;br /&gt;
* Perform SSL Cipher Scan using (sslscan)[https://github.com/rbsec/sslscan] or simmilar software. ensure following&lt;br /&gt;
  * SSLv2, SSLv3 is disabled&lt;br /&gt;
  * TLS 1.2, 1.1 and 1.0 is supported (1.2 is essential to ensure highest possible secure connection)&lt;br /&gt;
  * RC4 and CBC Based Ciphers are disabled&lt;br /&gt;
  * DH Params are &amp;gt;2048 Bits&lt;br /&gt;
  * SSL Certificate is signed with atleast sha2 / sha256&lt;br /&gt;
  * ECDHE Ciphers / Ciphers supporting Perfect forward secrecy are preferred&lt;br /&gt;
  * SSL Certificate is from Trusted RootCA&lt;br /&gt;
  * SSL Certificate is not expired&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. On Device Side&lt;br /&gt;
&lt;br /&gt;
  1. Ensure application is working correctly by navigating around.&lt;br /&gt;
&lt;br /&gt;
  2. Put a proxy in between the application and remote server. If application fails to load. Application might be doing cert validation. Refer logcat if any message is printed.&lt;br /&gt;
&lt;br /&gt;
  3. Place Proxy RootCA in trusted root CA list in device. (Burp)[https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp] (OWASP-ZAP)[https://security.secure.force.com/security/tools/webapp/zapandroidsetup]&lt;br /&gt;
&lt;br /&gt;
  4. Try using application again. If application still doesn't connect, application might be doing cert pinning.&lt;br /&gt;
&lt;br /&gt;
  5. Install (Xposed Framework)[http://repo.xposed.info/module/de.robv.android.xposed.installer] and (Just Trust Me)[https://github.com/Fuzion24/JustTrustMe], enable JustTrustMe and then reboot device. &lt;br /&gt;
&lt;br /&gt;
  6. Try again if everything works we have a application which employee's cert pinning.&lt;br /&gt;
&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211304</id>
		<title>Android Testing Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Android_Testing_Cheat_Sheet&amp;diff=211304"/>
				<updated>2016-03-17T05:16:06Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* M2 - Insecure Data storage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:100%;height:160px;border:0,margin:0;overflow: hidden;&amp;quot;&amp;gt;[[File:Cheatsheets-header.jpg|link=]]&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;padding: 0;margin:0;margin-top:10px;text-align:left;&amp;quot; |-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot;  style=&amp;quot;border-right: 1px dotted gray;padding-right:25px;&amp;quot; |&lt;br /&gt;
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}''' &lt;br /&gt;
= Introduction  =&lt;br /&gt;
&amp;lt;b&amp;gt;DRAFT MODE - This Cheat Sheet is a Work in Progress&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This cheat sheet provides a checklist of tasks to be performed to do a penetration test of an Android application. It follows the [https://www.owasp.org/index.php/OWASP_Mobile_Security_Project OWASP Mobile Top 10 Risks] list.&lt;br /&gt;
&lt;br /&gt;
== Testing Methodology ==&lt;br /&gt;
&lt;br /&gt;
At the device level, there are 2 ways in which the application shall be tested. &lt;br /&gt;
# With Android device running in a factory default or normal mode&lt;br /&gt;
# With Android device running in a rooted mode&lt;br /&gt;
&lt;br /&gt;
At the application level, there are 2 ways in which it shall be tested&lt;br /&gt;
# Application running on the device (to take benefits of touch related features)&lt;br /&gt;
# Application running on the emulator (to ease the task of testing using wider screen of desktop or laptop)&lt;br /&gt;
&lt;br /&gt;
== Application Mapping ==&lt;br /&gt;
&lt;br /&gt;
Map the application for possible security vectors&lt;br /&gt;
# What is the application genre ? (Game, business, productivity etc)&lt;br /&gt;
# Does the application connect to backend web services?&lt;br /&gt;
# Is the application purely native or incorporates readymade frameworks?&lt;br /&gt;
# Does the application store data on the device?&lt;br /&gt;
# What all features of the device are used by the application? (camera, gyroscope, contacts etc)&lt;br /&gt;
   &lt;br /&gt;
= OWASP Step-by-step Approach =&lt;br /&gt;
(For each of the standards below, there shall be multiple steps for the tester to follow])&lt;br /&gt;
== M1 - Weaker Server side controls ==&lt;br /&gt;
== M2 - Insecure Data storage ==&lt;br /&gt;
&lt;br /&gt;
This Section should be ideally tested after using the application for some time. This way application has time to store some data on the disk.&lt;br /&gt;
&lt;br /&gt;
Commonplaces to look at &lt;br /&gt;
&lt;br /&gt;
* /data/data/app_folder&lt;br /&gt;
* /sdcard/&lt;br /&gt;
* /sdcard1/&lt;br /&gt;
&lt;br /&gt;
== M3 - Insufficient Transport Layer ==&lt;br /&gt;
== M4 - Unintended Data Leakage ==&lt;br /&gt;
== M5 - Poor Authorization and Authentication ==&lt;br /&gt;
== M6 - Broken Cryptography ==&lt;br /&gt;
== M7 - Client Side Injection ==&lt;br /&gt;
== M8 - Security Decisions via untrusted inputs ==&lt;br /&gt;
== M9 - Improper Session Handling ==&lt;br /&gt;
== M10 - Lack of Binary Protection ==&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors =&lt;br /&gt;
&lt;br /&gt;
Jim Manico&lt;br /&gt;
&lt;br /&gt;
Jonathan Carter&lt;br /&gt;
&lt;br /&gt;
Prashant Phatak&lt;br /&gt;
&lt;br /&gt;
Milan Singh Thakur&lt;br /&gt;
&lt;br /&gt;
== Other Cheatsheets ==&lt;br /&gt;
&lt;br /&gt;
{{Cheatsheet_Navigation_Body}}&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Cheatsheets]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Certificate_and_Public_Key_Pinning&amp;diff=206702</id>
		<title>Certificate and Public Key Pinning</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Certificate_and_Public_Key_Pinning&amp;diff=206702"/>
				<updated>2016-01-17T18:50:45Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* References */  added a talk delivered by me covering SSL pinning and its bypasses.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
[[Certificate and Public Key Pinning]] is a technical guide to implementing certificate and public key pinning as discussed at the ''[https://www.owasp.org/index.php/Virginia Virginia chapter's]'' presentation [[Media:Securing-Wireless-Channels-in-the-Mobile-Space.ppt|Securing Wireless Channels in the Mobile Space]]. This guide is focused on providing clear, simple, actionable guidance for securing the channel in a hostile environment where actors could be malicious and the conference of trust a liability. Additional presentation material included [[Media:pubkey-pin-supplement.pdf|supplement with code excerpts]], [[Media:pubkey-pin-android.zip|Android sample program]], [[Media:pubkey-pin-ios.zip|iOS sample program]], [[Media:pubkey-pin-dotnet.zip|.Net sample program]], and [[Media:pubkey-pin-openssl.zip|OpenSSL sample program]].&lt;br /&gt;
&lt;br /&gt;
A cheat sheet is available at [[Pinning_Cheat_Sheet|Pinning Cheat Sheet]].&lt;br /&gt;
&lt;br /&gt;
== Introduction == &lt;br /&gt;
&lt;br /&gt;
Secure channels are a cornerstone to users and employees working remotely and on the go. Users and developers expect end-to-end security when sending and receiving data - especially sensitive data on channels protected by VPN, SSL, or TLS. While organizations which control DNS and CA have likely reduced risk to trivial levels under most threat models, users and developers subjugated to other's DNS and a public CA hierarchy are exposed to non-trivial amounts of risk. In fact, history has shown those relying on outside services have suffered chronic breaches in their secure channels.&lt;br /&gt;
&lt;br /&gt;
The pandemic abuse of trust has resulted in users, developers and applications making security related decisions on untrusted input. The situation is somewhat of a paradox: entities such as DNS and CAs are trusted and supposed to supply trusted input; yet their input cannot be trusted. Relying on untrusted input for security related decisions is not only bad karma, it violates a number of secure coding principals (see, for example, OWASP's [[Injection Theory]] and [[Data Validation]]).&lt;br /&gt;
&lt;br /&gt;
Pinning effectively removes the &amp;quot;conference of trust&amp;quot;. An application which pins a certificate or public key no longer needs to depend on others - such as DNS or CAs - when making security decisions relating to a peer's identity. For those familiar with SSH, you should realize that public key pinning is nearly identical to SSH's &amp;lt;tt&amp;gt;StrictHostKeyChecking&amp;lt;/tt&amp;gt; option. SSH had it right the entire time, and the rest of the world is beginning to realize the virtues of directly identifying a host or service by its public key.&lt;br /&gt;
&lt;br /&gt;
Others who actively engage in pinning include Google and its browser Chrome. Chrome was successful in detecting the DigiNotar compromise which uncovered suspected interception by the Iranian government on its citizens. The initial report of the compromise can be found at ''[https://productforums.google.com/d/topic/gmail/3J3r2JqFNTw/discussion Is This MITM Attack to Gmail's SSL?]''; and Google Security's immediate response at ''[https://googleonlinesecurity.blogspot.com/2011/08/update-on-attempted-man-in-middle.html An update on attempted man-in-the-middle attacks]''.&lt;br /&gt;
&lt;br /&gt;
== What's the problem? ==&lt;br /&gt;
&lt;br /&gt;
Users, developers, and applications expect end-to-end security on their secure channels, but some secure channels are not meeting the expectation. Specifically, channels built using well known protocols such as VPN, SSL, and TLS can be vulnerable to a number of attacks.&lt;br /&gt;
&lt;br /&gt;
Examples of past failures are listed on the discussion tab for this article. This cheat sheet does not attempt to catalogue the failures in the industry, investigate the design flaws in the scaffolding, justify the lack of accountability or liability with the providers, explain the race to the bottom in services, or demystify the collusion between, for example, Browsers and CAs. For additional reading, please visit ''[http://www.cs.auckland.ac.nz/~pgut001/pubs/pkitutorial.pdf PKI is Broken]'' and ''[http://blog.cryptographyengineering.com/2012/02/how-to-fix-internet.html The Internet is Broken]''.&lt;br /&gt;
&lt;br /&gt;
=== Patient 0 ===&lt;br /&gt;
&lt;br /&gt;
The original problem was the ''Key Distribution Problem''. Insecure communications can be transformed into a secure communication problem with encryption. Encrypted communications can be transformed into an identity problem with signatures. The identity problem terminates at the key distribution problem. They are the same problem.&lt;br /&gt;
&lt;br /&gt;
=== The Cures ===&lt;br /&gt;
&lt;br /&gt;
There are three cures for the key distribution problem. First is to have first hand knowledge of your partner or peer (i.e., a peer, server or service). This could be solved with SneakerNet. Unfortunately, SneakerNet does not scale and cannot be used to solve the key distribution problem.&lt;br /&gt;
&lt;br /&gt;
The second is to rely on others, and it has two variants: (1) web of trust, and (2) hierarchy of trust. Web of Trust and Hierarchy of Trust solve the key distribution problem in a sterile environment. However, Web of Trust and Hierarchy of Trust each requires us to rely on others - or '''confer trust'''. In practice, trusting others is showing to be problematic.&lt;br /&gt;
&lt;br /&gt;
== What Is Pinning? ==&lt;br /&gt;
&lt;br /&gt;
Pinning is the process of associating a host with their ''expected'' X509 certificate or public key. Once a certificate or public key is known or seen for a host, the certificate or public key is associated or 'pinned' to the host. If more than one certificate or public key is acceptable, then the program holds a ''pinset'' (taking from [https://developers.google.com/events/io/sessions/gooio2012/107/ Jon Larimer and Kenny Root Google I/O talk]). In this case, the advertised identity must match one of the elements in the pinset.&lt;br /&gt;
&lt;br /&gt;
A host or service's certificate or public key can be added to an application at development time, or it can be added upon first encountering the certificate or public key. The former - adding at development time - is preferred since ''preloading'' the certificate or public key ''out of band'' usually means the attacker cannot taint the pin. If the certificate or public key is added upon first encounter, you will be using ''key continuity''. Key continuity can fail if the attacker has a privileged position during the first first encounter.&lt;br /&gt;
&lt;br /&gt;
Pinning leverages knowledge of the pre-existing relationship between the user and an organization or service to help make better security related decisions. Because you already have information on the server or service, you don't need to rely on generalized mechanisms meant to solve the ''key distribution'' problem. That is, you don't need to turn to DNS for name/address mappings or CAs for bindings and status. One exception is revocation and it is discussed below in [[#Pinning_Gaps|Pinning Gaps]].&lt;br /&gt;
&lt;br /&gt;
It is also worth mention that Pinning is not Stapling. Stapling sends both the certificate and  OCSP responder information in the same request to avoid the additional fetches the client should perform during path validations.&lt;br /&gt;
&lt;br /&gt;
=== When Do You Pin? ===&lt;br /&gt;
&lt;br /&gt;
You should pin anytime you want to be relatively certain of the remote host's identity or when operating in a hostile environment. Since one or both are almost always true, you should probably pin all the time.&lt;br /&gt;
&lt;br /&gt;
A perfect case in point: during the two weeks or so of preparation for the presentation and cheat sheet, we've observed three relevant and related failures. First was [http://gaurangkp.wordpress.com/2013/01/09/nokia-https-mitm/ Nokia/Opera willfully breaking the secure channel]; second was [http://blog.malwarebytes.org/intelligence/2013/02/digital-certificates-and-malware-a-dangerous-mix/ DigiCert issuing a code signing certificate for malware]; and third was [http://krebsonsecurity.com/2013/02/security-firm-bit9-hacked-used-to-spread-malware/ Bit9's loss of its root signing key]. The environment is not only hostile, its toxic.&lt;br /&gt;
&lt;br /&gt;
=== When Do You Whitelist? ===&lt;br /&gt;
&lt;br /&gt;
If you are working for an organization which practices &amp;quot;egress filtering&amp;quot; as part of a Data Loss Prevention (DLP) strategy, you will likely encounter ''Interception Proxies''. I like to refer to these things as '''&amp;quot;good&amp;quot; bad guys''' (as opposed to '''&amp;quot;bad&amp;quot; bad guys''') since both break end-to-end security and we can't tell them apart. In this case, '''do not''' offer to whitelist the interception proxy since it defeats your security goals. Add the interception proxy's public key to your pinset after being '''instructed''' to do so by the folks in Risk Acceptance.&lt;br /&gt;
&lt;br /&gt;
Note: if you whitelist a certificate or public key for a different host (for example, to accommodate an interception proxy), you are no longer pinning the expected certificates and keys for the host. Security and integrity on the channel could suffer, and it surely breaks end-to-end security expectations of users and organizations.&lt;br /&gt;
&lt;br /&gt;
For more reading on interception proxies, the additional risk they bestow, and how they fail, see Dr. Matthew Green's ''[http://blog.cryptographyengineering.com/2012/03/how-do-interception-proxies-fail.html How do Interception Proxies fail?]'' and Jeff Jarmoc's BlackHat talk ''[https://www.blackhat.com/html/bh-eu-12/bh-eu-12-archives.html#jarmoc SSL/TLS Interception Proxies and Transitive Trust]''.&lt;br /&gt;
&lt;br /&gt;
=== How Do You Pin? ===&lt;br /&gt;
&lt;br /&gt;
The idea is to re-use the existing protocols and infrastructure, but use them in a hardened manner. For re-use, a program would keep doing the things it used to do when establishing a secure connection.&lt;br /&gt;
&lt;br /&gt;
To harden the channel, the program would take advantage of the &amp;lt;tt&amp;gt;OnConnect&amp;lt;/tt&amp;gt; callback offered by a library, framework or platform. In the callback, the program would verify the remote host's identity by validating its certificate or public key. While pinning does not have to occur in an &amp;lt;tt&amp;gt;OnConnect&amp;lt;/tt&amp;gt; callback, its often most convenient because the underlying connection information is readily available.&lt;br /&gt;
&lt;br /&gt;
== What Should Be Pinned? ==&lt;br /&gt;
&lt;br /&gt;
The first thing to decide is what should be pinned. For this choice, you have two options: you can (1) pin  the certificate; or (2) pin the public key. If you choose public keys, you have two additional choices: (a) pin the &amp;lt;tt&amp;gt;subjectPublicKeyInfo&amp;lt;/tt&amp;gt;; or (b) pin one of the concrete types such as &amp;lt;tt&amp;gt;RSAPublicKey&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;DSAPublicKey&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The three choices are explained below in more detail. I would encourage you to pin the &amp;lt;tt&amp;gt;subjectPublicKeyInfo&amp;lt;/tt&amp;gt; because it has the public parameters (such as &amp;lt;tt&amp;gt;{e,n}&amp;lt;/tt&amp;gt; for an RSA public key) '''and''' contextual information such as an algorithm and OID. The context will help you keep your bearings at times, and Figure 1 below shows the additional information available.&lt;br /&gt;
&lt;br /&gt;
=== Encodings/Formats ===&lt;br /&gt;
&lt;br /&gt;
For the purposes of this article, the objects are in X509-compatible presentation format (PKCS#1 defers to X509, both of which use ASN.1). If you have a PEM encoded object (for example, &amp;lt;tt&amp;gt;-----BEGIN CERTIFICATE-----&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;-----END CERTIFICATE-----&amp;lt;/tt&amp;gt;), then convert the object to DER encoding. Conversion using OpenSSL is offered below in [[#Format_Conversions|Format Conversions]].&lt;br /&gt;
&lt;br /&gt;
A certificate is an object which binds an entity (such as a person or organization) to a public key via a signature. The certificate is DER encoded, and has associated data or attributes such as ''Subject'' (who is identified or bound), ''Issuer'' (who signed it), ''Validity'' (''NotBefore'' and ''NotAfter''), and a ''Public Key''.&lt;br /&gt;
&lt;br /&gt;
A certificate has a ''subjectPublicKeyInfo''. The subjectPublicKeyInfo is a key with additional information. The ASN.1 type includes an ''Algorithm ID'', a ''Version'', and an extensible format to hold a concrete public key. Figures 1 and 2 below show different views of the same RSA key, which is the subjectPublicKeyInfo. The key is for the site [https://www.random.org random.org], and it is used in the sample programs and listings below.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot;&lt;br /&gt;
| [[File:random-org-der-dump.png|thumb|375px|Figure 1: subjectPublicKeyInfo dumped with dumpans1]]&lt;br /&gt;
| [[File:random-org-der-hex.png|thumb|375px|Figure 2: subjectPublicKeyInfo under a hex editor]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The concrete public key is an encoded public key. The key format will usually be specified elsewhere - for example, PKCS#1 in the case of RSA Public Keys. In the case of an RSA public key, the type is ''RSAPublicKey'' and the parameters &amp;lt;tt&amp;gt;{e,n}&amp;lt;/tt&amp;gt; will be ASN.1 encoded. Figures 1 and 2 above clearly show the modulus (''n'' at line 28) and exponent (''e'' at line 289). For DSA, the concrete type is DSAPublicKey and the ASN.1 encoded parameters would be &amp;lt;tt&amp;gt;{p,q,g,y}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Final takeaways: (1) a certificate binds an entity to a public key; (2) a certificate has a subjectPublicKeyInfo; and (3) a subjectPublicKeyInfo has an concrete public key. For those who want to learn more, a more in-depth discussion from a programmer's perspective can be found at the Code Project's article ''[http://www.codeproject.com/Articles/25487/Cryptographic-Interoperability-Keys Cryptographic Interoperability: Keys]''.&lt;br /&gt;
&lt;br /&gt;
=== Certificate ===&lt;br /&gt;
&lt;br /&gt;
[[File:pin-cert.png|thumb|right|100px|Certificate]] The certificate is easiest to pin. You can fetch the certificate out of band for the website, have the IT folks email your company certificate to you, use &amp;lt;tt&amp;gt;openssl s_client&amp;lt;/tt&amp;gt; to retrieve the certificate etc. When the certificate expires, you would update your application. Assuming your application has no bugs or security defects, the application would be updated every year or two.&lt;br /&gt;
&lt;br /&gt;
At runtime, you retrieve the website or server's certificate in the callback. Within the callback, you compare the retrieved certificate with the certificate embedded within the program. If the comparison fails, then fail the method or function. &lt;br /&gt;
&lt;br /&gt;
There is a downside to pinning a certificate. If the site rotates its certificate on a regular basis, then your application would need to be updated regularly. For example, Google rotates its certificates, so you will need to update your application about once a month (if it depended on Google services). Even though Google rotates its certificates, the underlying public keys (within the certificate) remain static.&lt;br /&gt;
&lt;br /&gt;
=== Public Key ===&lt;br /&gt;
&lt;br /&gt;
[[File:pin-pubkey.png|thumb|right|100px|Public Key]] Public key pinning is more flexible but a little trickier due to the extra steps necessary to extract the public key from a certificate. As with a certificate, the program checks the extracted public key with its embedded copy of the public key.&lt;br /&gt;
&lt;br /&gt;
There are two downsides two public key pinning. First, its harder to work with keys (versus certificates) since you usually must extract the key from the certificate. Extraction is a minor inconvenience in Java and .Net, buts its uncomfortable in Cocoa/CocoaTouch and OpenSSL. Second, the key is static and may violate key rotation policies.&lt;br /&gt;
&lt;br /&gt;
=== Hashing ===&lt;br /&gt;
&lt;br /&gt;
While the three choices above used DER encoding, its also acceptable to use a hash of the information (or other transforms). In fact, the original sample programs were written using digested certificates and public keys. The samples were changed to allow a programmer to inspect the objects with tools like &amp;lt;tt&amp;gt;dumpasn1&amp;lt;/tt&amp;gt; and other ASN.1 decoders.&lt;br /&gt;
&lt;br /&gt;
Hashing also provides three additional benefits. First, hashing allows you to anonymize a certificate or public key. This might be important if you application is concerned about leaking information during decompilation and re-engineering.&lt;br /&gt;
&lt;br /&gt;
Second, a digested certificate fingerprint is often available as a native API for many libraries, so its convenient to use.&lt;br /&gt;
&lt;br /&gt;
Finally, an organization might want to supply a reserve (or back-up) identity in case the primary identity is compromised. Hashing ensures your adversaries do not see the reserved certificate or public key in advance of its use. In fact, Google's IETF draft ''websec-key-pinning'' uses the technique.&lt;br /&gt;
&lt;br /&gt;
== What About X509? ==&lt;br /&gt;
&lt;br /&gt;
PKI{X} and the Internet form an intersection. What Internet users expect and what they receive from CAs could vary wildly. For example, an Internet user has security goals, while a CA has revenue goals and legal goals. Many are surprised to learn that the user is often required to perform host identity verification even though the CA issued the certificate (the details are buried in CA warranties on their certificates and their Certification Practice Statement (CPS)).&lt;br /&gt;
&lt;br /&gt;
There are a number of PKI profiles available. For the Internet, &amp;quot;Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL)&amp;quot;, also known as [http://tools.ietf.org/rfc/rfc5280.txt RFC 5280], is of interest. Since a certificate is specified in the ITU's X509 standard, there are lots of mandatory and optional fields available for validation from both bodies. Because of the disjoint goals among groups, the next section provides guidance.&lt;br /&gt;
&lt;br /&gt;
=== Mandatory Checks ===&lt;br /&gt;
&lt;br /&gt;
All X509 verifications must include:&lt;br /&gt;
&lt;br /&gt;
* A path validation check. The check verifies all the signatures on certificates in the chain are valid under a given PKI. The check begins at the server or service's certificate (the leaf), and proceeds back to a trusted root certificate (the root).&lt;br /&gt;
&lt;br /&gt;
* A validity check, or the &amp;lt;tt&amp;gt;notBefore&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;notAfter&amp;lt;/tt&amp;gt; fields. The &amp;lt;tt&amp;gt;notAfter&amp;lt;/tt&amp;gt; field is especially important since a CA will not warrant the certificate after the date, and it does not have to provide CRL/OCSP updates after the date.&lt;br /&gt;
&lt;br /&gt;
* Revocation status. As with &amp;lt;tt&amp;gt;notAfter&amp;lt;/tt&amp;gt;, revocation is important because the CA will not warrant a certificate once it is listed as revoked. The IETF approved way of checking a certificate's revocation is OCSP and specified in [http://tools.ietf.org/rfc/rfc2560.txt RFC 2560].&lt;br /&gt;
&lt;br /&gt;
=== Optional Checks ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Mulling over what else to present, and the best way to present it. Subject name? DNS lookups? Key Usage? Algorithms? Geolocation based on IP? Check back soon.]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
In the model which pre-dated PKIX RFC-5280, X.509v1 there was strong binding of the certificate Subject name to the X.500 Directory.  With the update to X.509v3, the Directory is  still the standard for authentication of caCertificate attributes, versus accepting a self signed root. Geo-location is important, the fake certificate for Google was given a location of Florida, instead of Mountain View, CA. The binding of the certificate to the Directory can anchor the root caCertificate, in effect &amp;quot;pin&amp;quot; it, to a valid entity that can have demonstrable attributes such as location.  This is detailed in RFC-1255.  Additional fields specified, such as the subject alternative field, for example a RFC-822 email address, or DNS name, can be located in the DNS, but the actual heavy lifting is done by the X.500 Directory, which is used currently as a cross-certificate trust conduit at the Federal Bridge between major communities of interest, that are not Internet focused. While those cross-certificates are valuable in validation between trust communities, a self-signed root, still needs to be either pinned, curated in trust bundle such as in  web browser software secure storage or represented by a federated community. The Directory can play a role to fill in gaps to validate caCertificates, either locally, or nationally under an administrative domain such as c=US. By divorcing the subject from the Directory entry, problems begin to arise in which pinning plays a key role to ensure that client and server have the same reference points.&lt;br /&gt;
&lt;br /&gt;
=== Public Key Checks ===&lt;br /&gt;
&lt;br /&gt;
''Quod vide'' (''q.v.''). Verifying the identity of a host with knowledge of its associated/expected public key is pinning.&lt;br /&gt;
&lt;br /&gt;
== Examples of Pinning ==&lt;br /&gt;
&lt;br /&gt;
This section demonstrates certificate and public key pinning in Android Java, iOS, .Net, and OpenSSL. All programs attempt to connect to [https://www.random.org random.org] and fetch bytes (Dr. Mads Haahr participates in AOSP's pinning program, so the site should have a static key). The programs enjoy a pre-existing relationship with the site (more correctly, ''a priori'' knowledge), so they include a copy of the site's public key and pin the identity on the key.&lt;br /&gt;
&lt;br /&gt;
Parameter validation, return value checking, and error checking have been omitted in the code below, but is present in the sample programs. So the sample code is ready for copy/paste. By far, the most uncomfortable languages are C-based: iOS and OpenSSL.&lt;br /&gt;
&lt;br /&gt;
===HTTP pinning===&lt;br /&gt;
[http://www.rfc-editor.org/rfc/rfc7469.txt RFC 7469] introduced a new HTTP header that allows SSL servers to declare hashes of their certificates with time scope in which these certificates should not be changed. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       Public-Key-Pins: max-age=2592000;&lt;br /&gt;
       pin-sha256=&amp;quot;E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g=&amp;quot;;&lt;br /&gt;
       pin-sha256=&amp;quot;LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=&amp;quot;;&lt;br /&gt;
       report-uri=&amp;quot;http://example.com/pkp-report&amp;quot;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please note that [http://www.rfc-editor.org/rfc/rfc7469.txt RFC 7469] is controversial since it allows overrides for locally installed authorities. That is, it allows an adversary or other party who successfully phishes the user to override a known good pinset with non-authentic or fraudulent information. Second, the reporting mechanism is suppressed from broken pinsets, so a complying user agent will be complicit in the cover up after the fact. That is, the reporting of the broken pinset is called out as '''MUST NOT''' report [https://en.wikipedia.org/w/index.php?title=HTTP_Public_Key_Pinning [1]].&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
&lt;br /&gt;
Pinning in Android is accomplished through a custom &amp;lt;tt&amp;gt;X509TrustManager&amp;lt;/tt&amp;gt;. &amp;lt;tt&amp;gt;X509TrustManager&amp;lt;/tt&amp;gt; should perform the customary X509 checks in addition to performing the pin.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:pubkey-pin-android.zip|Android sample program]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;public final class PubKeyManager implements X509TrustManager&lt;br /&gt;
{&lt;br /&gt;
  private static String PUB_KEY = &amp;quot;30820122300d06092a864886f70d0101&amp;quot; +&lt;br /&gt;
    &amp;quot;0105000382010f003082010a0282010100b35ea8adaf4cb6db86068a836f3c85&amp;quot; +&lt;br /&gt;
    &amp;quot;5a545b1f0cc8afb19e38213bac4d55c3f2f19df6dee82ead67f70a990131b6bc&amp;quot; +&lt;br /&gt;
    &amp;quot;ac1a9116acc883862f00593199df19ce027c8eaaae8e3121f7f329219464e657&amp;quot; +&lt;br /&gt;
    &amp;quot;2cbf66e8e229eac2992dd795c4f23df0fe72b6ceef457eba0b9029619e0395b8&amp;quot; +&lt;br /&gt;
    &amp;quot;609851849dd6214589a2ceba4f7a7dcceb7ab2a6b60c27c69317bd7ab2135f50&amp;quot; +&lt;br /&gt;
    &amp;quot;c6317e5dbfb9d1e55936e4109b7b911450c746fe0d5d07165b6b23ada7700b00&amp;quot; +&lt;br /&gt;
    &amp;quot;33238c858ad179a82459c4718019c111b4ef7be53e5972e06ca68a112406da38&amp;quot; +&lt;br /&gt;
    &amp;quot;cf60d2f4fda4d1cd52f1da9fd6104d91a34455cd7b328b02525320a35253147b&amp;quot; +&lt;br /&gt;
    &amp;quot;e0b7a5bc860966dc84f10d723ce7eed5430203010001&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
  public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException&lt;br /&gt;
  {&lt;br /&gt;
    if (chain == null) {&lt;br /&gt;
      throw new IllegalArgumentException(&amp;quot;checkServerTrusted: X509Certificate array is null&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (!(chain.length &amp;gt; 0)) {&lt;br /&gt;
      throw new IllegalArgumentException(&amp;quot;checkServerTrusted: X509Certificate is empty&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (!(null != authType &amp;amp;&amp;amp; authType.equalsIgnoreCase(&amp;quot;RSA&amp;quot;))) {&lt;br /&gt;
      throw new CertificateException(&amp;quot;checkServerTrusted: AuthType is not RSA&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Perform customary SSL/TLS checks&lt;br /&gt;
    try {&lt;br /&gt;
      TrustManagerFactory tmf = TrustManagerFactory.getInstance(&amp;quot;X509&amp;quot;);&lt;br /&gt;
      tmf.init((KeyStore) null);&lt;br /&gt;
      &lt;br /&gt;
      for (TrustManager trustManager : tmf.getTrustManagers()) {&lt;br /&gt;
        ((X509TrustManager) trustManager).checkServerTrusted(chain, authType);&lt;br /&gt;
      }&lt;br /&gt;
    } catch (Exception e) {&lt;br /&gt;
      throw new CertificateException(e);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // Hack ahead: BigInteger and toString(). We know a DER encoded Public Key begins&lt;br /&gt;
    // with 0x30 (ASN.1 SEQUENCE and CONSTRUCTED), so there is no leading 0x00 to drop.&lt;br /&gt;
    RSAPublicKey pubkey = (RSAPublicKey) chain[0].getPublicKey();&lt;br /&gt;
    String encoded = new BigInteger(1 /* positive */, pubkey.getEncoded()).toString(16);&lt;br /&gt;
&lt;br /&gt;
    // Pin it!&lt;br /&gt;
    final boolean expected = PUB_KEY.equalsIgnoreCase(encoded);&lt;br /&gt;
    if (!expected) {&lt;br /&gt;
      throw new CertificateException(&amp;quot;checkServerTrusted: Expected public key: &amp;quot;&lt;br /&gt;
                + PUB_KEY + &amp;quot;, got public key:&amp;quot; + encoded);&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;PubKeyManager&amp;lt;/tt&amp;gt; would be used in code similar to below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;TrustManager tm[] = { new PubKeyManager() };&lt;br /&gt;
&lt;br /&gt;
SSLContext context = SSLContext.getInstance(&amp;quot;TLS&amp;quot;);&lt;br /&gt;
context.init(null, tm, null);&lt;br /&gt;
&lt;br /&gt;
URL url = new URL( &amp;quot;https://www.random.org/integers/?&amp;quot; +&lt;br /&gt;
                   &amp;quot;num=16&amp;amp;min=0&amp;amp;max=255&amp;amp;col=16&amp;amp;base=10&amp;amp;format=plain&amp;amp;rnd=new&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();&lt;br /&gt;
connection.setSSLSocketFactory(context.getSocketFactory());&lt;br /&gt;
&lt;br /&gt;
InputStreamReader instream = new InputStreamReader(connection.getInputStream());&lt;br /&gt;
StreamTokenizer tokenizer = new StreamTokenizer(instream);&lt;br /&gt;
...&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== iOS ===&lt;br /&gt;
&lt;br /&gt;
iOS pinning is performed through a &amp;lt;tt&amp;gt;NSURLConnectionDelegate&amp;lt;/tt&amp;gt;. The delegate must implement &amp;lt;tt&amp;gt;connection:canAuthenticateAgainstProtectionSpace:&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;connection:didReceiveAuthenticationChallenge:&amp;lt;/tt&amp;gt;. Within &amp;lt;tt&amp;gt;connection:didReceiveAuthenticationChallenge:&amp;lt;/tt&amp;gt;, the delegate must call &amp;lt;tt&amp;gt;SecTrustEvaluate&amp;lt;/tt&amp;gt; to perform customary X509 checks.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:pubkey-pin-ios.zip|iOS sample program]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-(IBAction)fetchButtonTapped:(id)sender&lt;br /&gt;
{&lt;br /&gt;
    NSString* requestString = @&amp;quot;https://www.random.org/integers/?&lt;br /&gt;
        num=16&amp;amp;min=0&amp;amp;max=255&amp;amp;col=16&amp;amp;base=16&amp;amp;format=plain&amp;amp;rnd=new&amp;quot;;&lt;br /&gt;
    NSURL* requestUrl = [NSURL URLWithString:requestString];&lt;br /&gt;
&lt;br /&gt;
    NSURLRequest* request = [NSURLRequest requestWithURL:requestUrl&lt;br /&gt;
                                             cachePolicy:NSURLRequestReloadIgnoringLocalCacheData&lt;br /&gt;
                                         timeoutInterval:10.0f];&lt;br /&gt;
&lt;br /&gt;
    NSURLConnection* connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
-(BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:&lt;br /&gt;
                  (NSURLProtectionSpace*)space&lt;br /&gt;
{&lt;br /&gt;
    return [[space authenticationMethod] isEqualToString: NSURLAuthenticationMethodServerTrust];&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:&lt;br /&gt;
                   (NSURLAuthenticationChallenge *)challenge&lt;br /&gt;
{&lt;br /&gt;
  if ([[[challenge protectionSpace] authenticationMethod] isEqualToString: NSURLAuthenticationMethodServerTrust])&lt;br /&gt;
  {&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
      SecTrustRef serverTrust = [[challenge protectionSpace] serverTrust];&lt;br /&gt;
      if(nil == serverTrust)&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      OSStatus status = SecTrustEvaluate(serverTrust, NULL);&lt;br /&gt;
      if(!(errSecSuccess == status))&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      SecCertificateRef serverCertificate = SecTrustGetCertificateAtIndex(serverTrust, 0);&lt;br /&gt;
      if(nil == serverCertificate)&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      CFDataRef serverCertificateData = SecCertificateCopyData(serverCertificate);&lt;br /&gt;
      [(id)serverCertificateData autorelease];&lt;br /&gt;
      if(nil == serverCertificateData)&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      const UInt8* const data = CFDataGetBytePtr(serverCertificateData);&lt;br /&gt;
      const CFIndex size = CFDataGetLength(serverCertificateData);&lt;br /&gt;
      NSData* cert1 = [NSData dataWithBytes:data length:(NSUInteger)size];&lt;br /&gt;
&lt;br /&gt;
      NSString *file = [[NSBundle mainBundle] pathForResource:@&amp;quot;random-org&amp;quot; ofType:@&amp;quot;der&amp;quot;];&lt;br /&gt;
      NSData* cert2 = [NSData dataWithContentsOfFile:file];&lt;br /&gt;
&lt;br /&gt;
      if(nil == cert1 || nil == cert2)&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      const BOOL equal = [cert1 isEqualToData:cert2];&lt;br /&gt;
      if(!equal)&lt;br /&gt;
        break; /* failed */&lt;br /&gt;
&lt;br /&gt;
      // The only good exit point&lt;br /&gt;
      return [[challenge sender] useCredential: [NSURLCredential credentialForTrust: serverTrust]&lt;br /&gt;
                    forAuthenticationChallenge: challenge];&lt;br /&gt;
    } while(0);&lt;br /&gt;
&lt;br /&gt;
    // Bad dog&lt;br /&gt;
    return [[challenge sender] cancelAuthenticationChallenge: challenge];&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== .Net ===&lt;br /&gt;
&lt;br /&gt;
.Net pinning can be achieved by using &amp;lt;tt&amp;gt;ServicePointManager&amp;lt;/tt&amp;gt; as shown below.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:pubkey-pin-dotnet.zip|.Net sample program]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;// Encoded RSAPublicKey&lt;br /&gt;
private static String PUB_KEY = &amp;quot;30818902818100C4A06B7B52F8D17DC1CCB47362&amp;quot; +&lt;br /&gt;
    &amp;quot;C64AB799AAE19E245A7559E9CEEC7D8AA4DF07CB0B21FDFD763C63A313A668FE9D764E&amp;quot; +&lt;br /&gt;
    &amp;quot;D913C51A676788DB62AF624F422C2F112C1316922AA5D37823CD9F43D1FC54513D14B2&amp;quot; +&lt;br /&gt;
    &amp;quot;9E36991F08A042C42EAAEEE5FE8E2CB10167174A359CEBF6FACC2C9CA933AD403137EE&amp;quot; +&lt;br /&gt;
    &amp;quot;2C3F4CBED9460129C72B0203010001&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
public static void Main(string[] args)&lt;br /&gt;
{&lt;br /&gt;
  ServicePointManager.ServerCertificateValidationCallback = PinPublicKey;&lt;br /&gt;
  WebRequest wr = WebRequest.Create(&amp;quot;https://encrypted.google.com/&amp;quot;);&lt;br /&gt;
  wr.GetResponse();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public static bool PinPublicKey(object sender, X509Certificate certificate, X509Chain chain,&lt;br /&gt;
                                SslPolicyErrors sslPolicyErrors)&lt;br /&gt;
{&lt;br /&gt;
  if (null == certificate)&lt;br /&gt;
    return false;&lt;br /&gt;
&lt;br /&gt;
  String pk = certificate.GetPublicKeyString();&lt;br /&gt;
  if (pk.Equals(PUB_KEY))&lt;br /&gt;
    return true;&lt;br /&gt;
&lt;br /&gt;
  // Bad dog&lt;br /&gt;
  return false;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== OpenSSL ===&lt;br /&gt;
&lt;br /&gt;
Pinning can occur at one of two places with OpenSSL. First is the user supplied &amp;lt;tt&amp;gt;verify_callback&amp;lt;/tt&amp;gt;. Second is after the connection is established via &amp;lt;tt&amp;gt;SSL_get_peer_certificate&amp;lt;/tt&amp;gt;. Either method will allow you to access the peer's certificate.&lt;br /&gt;
&lt;br /&gt;
Though OpenSSL performs the X509 checks, you must fail the connection and tear down the socket on error. By design, a server that does not supply a certificate will result in &amp;lt;tt&amp;gt;X509_V_OK&amp;lt;/tt&amp;gt; with a '''NULL''' certificate. To check the result of the customary verification: (1) you must call &amp;lt;tt&amp;gt;SSL_get_verify_result&amp;lt;/tt&amp;gt; and verify the return code is &amp;lt;tt&amp;gt;X509_V_OK&amp;lt;/tt&amp;gt;; and (2) you must call &amp;lt;tt&amp;gt;SSL_get_peer_certificate&amp;lt;/tt&amp;gt; and verify the certificate is '''non-NULL'''.&lt;br /&gt;
&lt;br /&gt;
Download: [[Media:pubkey-pin-openssl.zip|OpenSSL sample program]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;int pkp_pin_peer_pubkey(SSL* ssl)&lt;br /&gt;
{&lt;br /&gt;
    if(NULL == ssl) return FALSE;&lt;br /&gt;
    &lt;br /&gt;
    X509* cert = NULL;&lt;br /&gt;
    FILE* fp = NULL;&lt;br /&gt;
    &lt;br /&gt;
    /* Scratch */&lt;br /&gt;
    int len1 = 0, len2 = 0;&lt;br /&gt;
    unsigned char *buff1 = NULL, *buff2 = NULL;&lt;br /&gt;
    &lt;br /&gt;
    /* Result is returned to caller */&lt;br /&gt;
    int ret = 0, result = FALSE;&lt;br /&gt;
    &lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        /* http://www.openssl.org/docs/ssl/SSL_get_peer_certificate.html */&lt;br /&gt;
        cert = SSL_get_peer_certificate(ssl);&lt;br /&gt;
        if(!(cert != NULL))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Begin Gyrations to get the subjectPublicKeyInfo       */&lt;br /&gt;
        /* Thanks to Viktor Dukhovni on the OpenSSL mailing list */&lt;br /&gt;
        &lt;br /&gt;
        /* http://groups.google.com/group/mailing.openssl.users/browse_thread/thread/d61858dae102c6c7 */&lt;br /&gt;
        len1 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), NULL);&lt;br /&gt;
        if(!(len1 &amp;gt; 0))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* scratch */&lt;br /&gt;
        unsigned char* temp = NULL;&lt;br /&gt;
        &lt;br /&gt;
        /* http://www.openssl.org/docs/crypto/buffer.html */&lt;br /&gt;
        buff1 = temp = OPENSSL_malloc(len1);&lt;br /&gt;
        if(!(buff1 != NULL))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* http://www.openssl.org/docs/crypto/d2i_X509.html */&lt;br /&gt;
        len2 = i2d_X509_PUBKEY(X509_get_X509_PUBKEY(cert), &amp;amp;temp);&lt;br /&gt;
&lt;br /&gt;
        /* These checks are verifying we got back the same values as when we sized the buffer.      */&lt;br /&gt;
        /* Its pretty weak since they should always be the same. But it gives us something to test. */&lt;br /&gt;
        if(!((len1 == len2) &amp;amp;&amp;amp; (temp != NULL) &amp;amp;&amp;amp; ((temp - buff1) == len1)))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* End Gyrations */&lt;br /&gt;
        &lt;br /&gt;
        /* See the warning above!!!                                            */&lt;br /&gt;
        /* http://pubs.opengroup.org/onlinepubs/009696699/functions/fopen.html */&lt;br /&gt;
        fp = fopen(&amp;quot;random-org.der&amp;quot;, &amp;quot;rx&amp;quot;);&lt;br /&gt;
        if(NULL ==fp) {&lt;br /&gt;
            fp = fopen(&amp;quot;random-org.der&amp;quot;, &amp;quot;r&amp;quot;);&lt;br /&gt;
        &lt;br /&gt;
        if(!(NULL != fp))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Seek to eof to determine the file's size                            */&lt;br /&gt;
        /* http://pubs.opengroup.org/onlinepubs/009696699/functions/fseek.html */&lt;br /&gt;
        ret = fseek(fp, 0, SEEK_END);&lt;br /&gt;
        if(!(0 == ret))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Fetch the file's size                                               */&lt;br /&gt;
        /* http://pubs.opengroup.org/onlinepubs/009696699/functions/ftell.html */&lt;br /&gt;
        long size = ftell(fp);&lt;br /&gt;
&lt;br /&gt;
        /* Arbitrary size, but should be relatively small (less than 1K or 2K) */&lt;br /&gt;
        if(!(size != -1 &amp;amp;&amp;amp; size &amp;gt; 0 &amp;amp;&amp;amp; size &amp;lt; 2048))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Rewind to beginning to perform the read                             */&lt;br /&gt;
        /* http://pubs.opengroup.org/onlinepubs/009696699/functions/fseek.html */&lt;br /&gt;
        ret = fseek(fp, 0, SEEK_SET);&lt;br /&gt;
        if(!(0 == ret))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Re-use buff2 and len2 */&lt;br /&gt;
        buff2 = NULL; len2 = (int)size;&lt;br /&gt;
        &lt;br /&gt;
        /* http://www.openssl.org/docs/crypto/buffer.html */&lt;br /&gt;
        buff2 = OPENSSL_malloc(len2);&lt;br /&gt;
        if(!(buff2 != NULL))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* http://pubs.opengroup.org/onlinepubs/009696699/functions/fread.html */&lt;br /&gt;
        /* Returns number of elements read, which should be 1 */&lt;br /&gt;
        ret = (int)fread(buff2, (size_t)len2, 1, fp);&lt;br /&gt;
        if(!(ret == 1))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* Re-use size. MIN and MAX macro below... */&lt;br /&gt;
        size = len1 &amp;lt; len2 ? len1 : len2;&lt;br /&gt;
        &lt;br /&gt;
        /*************************/&lt;br /&gt;
        /*****    PAYDIRT    *****/&lt;br /&gt;
        /*************************/&lt;br /&gt;
        if(len1 != (int)size || len2 != (int)size || 0 != memcmp(buff1, buff2, (size_t)size))&lt;br /&gt;
            break; /* failed */&lt;br /&gt;
        &lt;br /&gt;
        /* The one good exit point */&lt;br /&gt;
        result = TRUE;&lt;br /&gt;
        &lt;br /&gt;
    } while(0);&lt;br /&gt;
    &lt;br /&gt;
    if(fp != NULL)&lt;br /&gt;
        fclose(fp);&lt;br /&gt;
    &lt;br /&gt;
    /* http://www.openssl.org/docs/crypto/buffer.html */&lt;br /&gt;
    if(NULL != buff2)&lt;br /&gt;
        OPENSSL_free(buff2);&lt;br /&gt;
    &lt;br /&gt;
    /* http://www.openssl.org/docs/crypto/buffer.html */&lt;br /&gt;
    if(NULL != buff1)&lt;br /&gt;
        OPENSSL_free(buff1);&lt;br /&gt;
    &lt;br /&gt;
    /* http://www.openssl.org/docs/crypto/X509_new.html */&lt;br /&gt;
    if(NULL != cert)&lt;br /&gt;
        X509_free(cert);&lt;br /&gt;
    &lt;br /&gt;
    return result;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Pinning Alternatives ==&lt;br /&gt;
&lt;br /&gt;
Not all applications use split key cryptography. Fortunately, there are protocols which allow you to set up a secure channel based on knowledge of passwords and pre-shared secrets (rather than putting the secret on the wire in a basic authentication scheme). Two are listed below - SRP and PSK. SRP and PSK have [http://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-3 88 cipher suites assigned to them by IANA for TLS], so there's no shortage of choices.&lt;br /&gt;
&lt;br /&gt;
{| align=&amp;quot;center&amp;quot;&lt;br /&gt;
| [[File:pin-iana-assigned.png|thumb|450px|Figure 3: IANA reserved cipher suites for SRP and PSK]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SRP ===&lt;br /&gt;
&lt;br /&gt;
Secure Remote Password (SRP) is a Password Authenticated Key Exchange (PAKE) by Thomas Wu based upon Diffie-Hellman. The protocol is standardized in [https://tools.ietf.org/rfc/rfc5054.txt RFC 5054] and available in the OpenSSL library (among others). In the SRP scheme, the server uses a verifier which consists of a &amp;lt;tt&amp;gt;{salt, hash(password)}&amp;lt;/tt&amp;gt; pair. The user has the password and receives the salt from the server. With lots of hand waving, both parties select per-instance random values (nonces) and execute the protocol using ''g&amp;lt;sup&amp;gt;{(salt + password)|verifier} + nonces&amp;lt;/sup&amp;gt;'' rather than traditional Diffie-Hellman using ''g&amp;lt;sup&amp;gt;ab&amp;lt;/sup&amp;gt;''.&lt;br /&gt;
&lt;br /&gt;
[[File:homer-p-np.jpg|thumb|right|150px|P=NP!!!]]Diffie-Hellman based schemes are part of a family of problems based on Discrete Logs (DL), which are logarithms over a finite field. DL schemes are appealing because they are known to be hard (unless ''P=NP'', which would cause computational number theorists to have a cow).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== PSK ===&lt;br /&gt;
&lt;br /&gt;
PSK is Pre-Shared Key and specified in [https://tools.ietf.org/rfc/rfc4279.txt RFC 4279] and [https://tools.ietf.org/rfc/rfc4764.txt RFC 4764]. The shared secret is used as a pre-master secret in TLS-PSK for SSL/TLS; or used to key a block cipher in EAP-PSK. EAP-PSK is designed for authentication over insecure networks such as IEEE 802.11.&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
This sections covers administrivia and miscellaneous items related to pinning.&lt;br /&gt;
&lt;br /&gt;
=== Ephemeral Keys ===&lt;br /&gt;
&lt;br /&gt;
Ephemeral keys are temporary keys used for one instance of a protocol execution and then thrown away. An ephemeral key has the benefit of providing forward secrecy, meaning a compromise of the site or service's long term (static) signing key does not facilitate decrypting past messages because the key was temporary and discarded (once the session terminated).&lt;br /&gt;
&lt;br /&gt;
Ephemeral keys do not affect pinning because the Ephemeral key is delivered in a separate &amp;lt;tt&amp;gt;ServerKeyExchange&amp;lt;/tt&amp;gt; message. In addition, the ephemeral key is a key and not a certificate, so it does not change the construction of the certificate chain. That is, the certificate of interest will still be located at &amp;lt;tt&amp;gt;certificates[0]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Pinning Gaps ===&lt;br /&gt;
&lt;br /&gt;
There are two gaps when pinning due to reuse of the existing infrastructure and protocols. First, an explicit challenge is '''not''' sent by the program to the peer server based on the server's public information. So the program never knows if the peer can actually decrypt messages. However, the shortcoming is usually academic in practice since an adversary will receive messages it can't decrypt.&lt;br /&gt;
&lt;br /&gt;
Second is revocation. Clients don't usually engage in revocation checking, so it could be possible to use a known bad certificate or key in a pinset. Even if revocation is active, Certificate Revocation Lists (CRLs) and Online Certificate Status Protocol (OCSP) can be defeated in a hostile environment. An application can take steps to remediate, with the primary means being freshness. That is, an application should be updated and distributed immediately when a critical security parameter changes.&lt;br /&gt;
&lt;br /&gt;
=== No Relationship ^@$! ===&lt;br /&gt;
&lt;br /&gt;
If you don't have a pre-existing relationship, all is not lost. First, you can pin a host or server's certificate or public key the first time you encounter it. If the bad guy was not active when you encountered the certificate or public key, he or she will not be successful with future funny business.&lt;br /&gt;
&lt;br /&gt;
Second, bad certificates are being spotted quicker in the field due to projects like [http://www.chromium.org Chromium] and [https://addons.mozilla.org/en-us/firefox/addon/certificate-patrol/ Certificate Patrol], and initiatives like the EFF's [https://www.eff.org/observatory SSL Observatory].&lt;br /&gt;
&lt;br /&gt;
Third, help is on its way, and there are a number of futures that will assist with the endeavors:&lt;br /&gt;
&lt;br /&gt;
* Public Key Pinning (http://www.ietf.org/id/draft-ietf-websec-key-pinning-09.txt) – an extension to the HTTP protocol allowing web host operators to instruct user agents (UAs) to remember (&amp;quot;pin&amp;quot;) the hosts' cryptographic identities for a given period of time.&lt;br /&gt;
* DNS-based Authentication of Named Entities (DANE) (https://datatracker.ietf.org/doc/rfc6698/) - uses Secure DNS to associate Certificates with Domain Names For S/MIME, SMTP with TLS, DNSSEC and TLSA records.&lt;br /&gt;
* Sovereign Keys (http://www.eff.org/sovereign-keys) - operates by providing an optional and secure way of associating domain names with public keys via DNSSEC. PKI (hierarchical) is still used. Semi-centralized with append only logging.&lt;br /&gt;
* Convergence (http://convergence.io) – different [geographical] views of a site and its associated data (certificates and public keys). Web of Trust is used. Semi-centralized.&lt;br /&gt;
&lt;br /&gt;
While Sovereign Keys and Convergence still require us to confer trust to outside parties, the parties involved do not serve share holders or covet revenue streams. Their interests are industry transparency and user security.&lt;br /&gt;
&lt;br /&gt;
=== More Information? ===&lt;br /&gt;
&lt;br /&gt;
Pinning is an ''old new thing'' that has been shaken, stirred, and repackaged. While &amp;quot;pinning&amp;quot; and &amp;quot;pinsets&amp;quot; are relatively new terms for old things, Jon Larimer and Kenny Root spent time on the subject at Google I/O 2012 with their talk ''[https://developers.google.com/events/io/sessions/gooio2012/107/ Security and Privacy in Android Apps]''.&lt;br /&gt;
&lt;br /&gt;
=== Format Conversions ===&lt;br /&gt;
&lt;br /&gt;
As a convenience to readers, the following with convert between PEM and DER format using OpenSSL.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# Public key, X509&lt;br /&gt;
$ openssl genrsa -out rsa-openssl.pem 3072&lt;br /&gt;
$ openssl rsa -in rsa-openssl.pem -pubout -outform DER -out rsa-openssl.der&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# Private key, PKCS#8&lt;br /&gt;
$ openssl genrsa -out rsa-openssl.pem 3072&lt;br /&gt;
$ openssl pkcs8 -nocrypt -in rsa-openssl.pem -inform PEM -topk8 -outform DER -out rsa-openssl.der&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* OWASP [[Injection_Theory|Injection Theory]]&lt;br /&gt;
* OWASP [[Data_Validation|Data Validation]]&lt;br /&gt;
* OWASP [[Transport_Layer_Protection_Cheat_Sheet|Transport Layer Protection Cheat Sheet]]&lt;br /&gt;
* IETF [http://www.ietf.org/id/draft-ietf-websec-key-pinning-09.txt Public Key Pinning]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc5054.txt RFC 5054 (SRP)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc4764.txt RFC 4764 (EAP-PSK)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc1421.txt RFC 1421 (PEM Encoding)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc5280.txt RFC 5280 (Internet X.509, PKIX)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc4648.txt RFC 4648 (Base16, Base32, and Base64 Encodings)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc3279.txt RFC 3279 (PKI, X509 Algorithms and CRL Profiles)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc4055.txt RFC 4055 (PKI, X509 Additional Algorithms and CRL Profiles)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc2246.txt RFC 2246 (TLS 1.0)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc4346.txt RFC 4346 (TLS 1.1)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc5246.txt RFC 5246 (TLS 1.2)]&lt;br /&gt;
* IETF [http://www.ietf.org/rfc/rfc6698.txt RFC 6698, Draft (DANE)]&lt;br /&gt;
* EFF [http://www.eff.org/sovereign-keys Sovereign Keys]&lt;br /&gt;
* Thoughtcrime Labs [http://convergence.io/ Convergence]&lt;br /&gt;
* RSA Laboratories [http://www.rsa.com/rsalabs/node.asp?id=2125 PKCS#1, RSA Encryption Standard]&lt;br /&gt;
* RSA Laboratories [http://www.rsa.com/rsalabs/node.asp?id=2128 PKCS#6, Extended-Certificate Syntax Standard]&lt;br /&gt;
* ITU [http://www.itu.int/rec/T-REC-X.690-200811-I/en Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)]&lt;br /&gt;
* TOR Project [https://blog.torproject.org/blog/detecting-certificate-authority-compromises-and-web-browser-collusion Detecting Certificate Authority Compromises and Web Browser Collusion]&lt;br /&gt;
* Code Project [http://www.codeproject.com/Articles/25487/Cryptographic-Interoperability-Keys Cryptographic Interoperability: Keys]&lt;br /&gt;
* Google I/O [https://developers.google.com/events/io/sessions/gooio2012/107/ Security and Privacy in Android Apps]&lt;br /&gt;
* Trevor Perrin [https://crypto.stanford.edu/RealWorldCrypto/slides/perrin.pdf Transparency, Trust Agility, Pinning (Recent Developments in Server Authentication)]&lt;br /&gt;
* Dr. Peter Gutmann's [http://www.cs.auckland.ac.nz/~pgut001/pubs/pkitutorial.pdf PKI is Broken]&lt;br /&gt;
* Dr. Matthew Green's [http://blog.cryptographyengineering.com/2012/02/how-to-fix-internet.html The Internet is Broken]&lt;br /&gt;
* Dr. Matthew Green's [http://blog.cryptographyengineering.com/2012/03/how-do-interception-proxies-fail.html How do Interception Proxies fail?]&lt;br /&gt;
* Presentation: [http://www.slideshare.net/anantshri/ssl-pinning-and-bypasses-android-and-ios SSL Pinning implementation and bypasses for iOS and Android ]&lt;br /&gt;
&lt;br /&gt;
= Authors and Primary Editors  =&lt;br /&gt;
&lt;br /&gt;
* Jeffrey Walton - jeffrey, owasp.org&lt;br /&gt;
* JohnSteven - john, owasp.org&lt;br /&gt;
* Jim Manico - jim, owasp.org&lt;br /&gt;
* Kevin Wall - kevin, owasp.org&lt;br /&gt;
&lt;br /&gt;
[[Category:Control]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187796</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187796"/>
				<updated>2015-01-10T06:44:45Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* Common Misconfigurations */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.&lt;br /&gt;
WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== PHP Errors On : Server misconfiguration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Wordpress CMS assumes that the server would have PHP Errors turned off and developers will rely on internal WP_DEBUG feature for Debugging the issues.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for PHP Errors setting, one can make a call to known Full path disclosing files. one such file is wp-includes/rss-functions.php (a list of such files was created for specific versions of wordpress example [https://code.google.com/p/inspathx/source/browse/trunk/paths_vuln/wordpress_2.9.2 2.9.2] and [https://code.google.com/p/inspathx/source/browse/trunk/paths_vuln/wordpress-3.0.4 3.0.4] )&lt;br /&gt;
if a call is made to http://%site%/wp-includes/rss-functions.php and a error message is obtained in the lines of&lt;br /&gt;
&lt;br /&gt;
Fatal error: Call to undefined function _deprecated_file() in /home/ABCD_XYZ/public_html/wp-includes/rss-functions.php on line 8 &lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
1. Using .htaccess file in webroot place&lt;br /&gt;
`php_flag display_errors off`&lt;br /&gt;
&lt;br /&gt;
2. Using php.ini for the server&lt;br /&gt;
`display_errors off`&lt;br /&gt;
&lt;br /&gt;
== Additional Hardening ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checklist ==&lt;br /&gt;
&lt;br /&gt;
define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187795</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187795"/>
				<updated>2015-01-10T06:39:35Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* Server misconfiguration : PHP Errors On */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.&lt;br /&gt;
WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== PHP Errors On : Server misconfiguration ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Wordpress CMS assumes that the server would have PHP Errors turned off and developers will rely on internal WP_DEBUG feature for Debugging the issues.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should make a call to known Full path disclosing files. one such file is wp-includes/rss-functions.php&lt;br /&gt;
if a call is made to http://%site%/wp-includes/rss-functions.php and a error message is obtained in the lines of&lt;br /&gt;
&lt;br /&gt;
Fatal error: Call to undefined function _deprecated_file() in /home/ABCD_XYZ/public_html/wp-includes/rss-functions.php on line 8 &lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
1. Using .htaccess file in webroot place&lt;br /&gt;
`php_flag display_errors off`&lt;br /&gt;
&lt;br /&gt;
2. Using php.ini for the server&lt;br /&gt;
`display_errors off`&lt;br /&gt;
&lt;br /&gt;
== Additional Hardening ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checklist ==&lt;br /&gt;
&lt;br /&gt;
define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187793</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187793"/>
				<updated>2015-01-10T06:37:21Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.&lt;br /&gt;
WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== Server misconfiguration : PHP Errors On ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Wordpress CMS assumes that the server would have PHP Errors turned off and developers will rely on internal WP_DEBUG feature for Debugging the issues.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should make a call to known Full path disclosing files. one such file is wp-includes/rss-functions.php&lt;br /&gt;
if a call is made to http://%site%/wp-includes/rss-functions.php and a error message is obtained in the lines of&lt;br /&gt;
&lt;br /&gt;
Fatal error: Call to undefined function _deprecated_file() in /home/ABCD_XYZ/public_html/wp-includes/rss-functions.php on line 8 &lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
1. Using .htaccess file in webroot place&lt;br /&gt;
`php_flag display_errors off`&lt;br /&gt;
&lt;br /&gt;
2. Using php.ini for the server&lt;br /&gt;
`display_errors off`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional Hardening ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checklist ==&lt;br /&gt;
&lt;br /&gt;
define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187792</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187792"/>
				<updated>2015-01-10T06:34:48Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.&lt;br /&gt;
WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== Server misconfigurations ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
Wordpress CMS assumes that the server would have PHP Errors turned off and developers will rely on internal WP_DEBUG feature for Debugging the issues.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should make a call to known Full path disclosing files. one such file is wp-includes/rss-functions.php&lt;br /&gt;
if a call is made to http://%site%/wp-includes/rss-functions.php and a error message is obtained in the lines of &lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Additional Hardening ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Checklist ==&lt;br /&gt;
&lt;br /&gt;
define( 'WP_DEBUG_LOG', true ); // log to wp-content/debug.log&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187791</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187791"/>
				<updated>2015-01-10T06:23:58Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
WordPress started in 2003 with a single bit of code to enhance the typography of everyday writing and with fewer users than you can count on your fingers and toes. Since then it has grown to be the largest self-hosted blogging tool in the world, used on millions of sites and seen by tens of millions of people every day.&lt;br /&gt;
WordPress is web software you can use to create a beautiful website or blog. We like to say that WordPress is both free and priceless at the same time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=187790</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=187790"/>
				<updated>2015-01-10T06:22:11Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
The Apache HTTP Server Project is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server. The project is jointly managed by a group of volunteers located around the world, using the Internet and the Web to communicate, plan, and develop the server and its related documentation. This project is part of the Apache Software Foundation. In addition, hundreds of users have contributed ideas, code, and documentation to the project. This file is intended to briefly describe the history of the Apache HTTP Server and recognize the many contributors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
'''Please also mention /server-status ! '''&lt;br /&gt;
&lt;br /&gt;
1. Version details disclosed in headers&lt;br /&gt;
disable apache tokens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Proper SSL cipher selection&lt;br /&gt;
Cipher orders&lt;br /&gt;
Disable specific ciphers&lt;br /&gt;
&lt;br /&gt;
3. Guidelines on how to store ssl private keys on server&lt;br /&gt;
stuff like not to store private keys on /var/www/&lt;br /&gt;
&lt;br /&gt;
4. Detailing about various authentication types&lt;br /&gt;
&lt;br /&gt;
basic, digest, X509, LDAP or others.&lt;br /&gt;
&lt;br /&gt;
Detailing about authoentication types and which one to use in which situation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_D_BIGIP&amp;diff=187789</id>
		<title>SCG D BIGIP</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_D_BIGIP&amp;diff=187789"/>
				<updated>2015-01-10T06:19:48Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added burp suite plugin by secureideas&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
The BIG-IP family of products offers the application intelligence network managers need to ensure applications are fast, secure and available. All BIG-IP products share a common underlying architecture, F5's Traffic Management Operating System (TMOS), which provides unified intelligence, flexibility and programmability. Together, BIG-IP's powerful platforms, advanced modules, and centralized management system make up the most comprehensive set of application delivery tools in the industry.&lt;br /&gt;
&lt;br /&gt;
BIG-IP devices work on a modular system, which enables to add new functions as necessary to quickly adapt to changing application and business needs. The following modules are currently available for the BIG-IP system:&lt;br /&gt;
* Application Acceleration Manager (AAM)&lt;br /&gt;
* Advanced Firewall Manager (AFM)&lt;br /&gt;
* Access Policy Manager (APM)&lt;br /&gt;
* Application Security Manger (ASM)&lt;br /&gt;
* Global Traffic Manager (GTM)&lt;br /&gt;
* Link Controller (LC)&lt;br /&gt;
* Local Traffic Manager (LTM)&lt;br /&gt;
* Protocol Security Module (PSM)&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
=== BIG-IP persistence cookie information leakage ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
An attacker can receive sensitive information about internal network via BIG-IP LTM persistence cookie.  &lt;br /&gt;
&lt;br /&gt;
To implement persistence sessions BIG-IP system inserts a cookie into the HTTP response, which well-behaved clients include in subsequent HTTP requests for the host name until the cookie expires. The cookie, by default, is named BIGipServer&amp;lt;pool_name&amp;gt;. The cookie is set to expire based on the time-out configured in the persistence profile. The cookie value contains the encoded IP address and port of the destination server [https://support.f5.com/kb/en-us/solutions/public/6000/900/sol6917.html] in the following format:&lt;br /&gt;
BIGipServer&amp;lt;pool name&amp;gt; = &amp;lt;coded server IP&amp;gt;.&amp;lt;coded server port&amp;gt;.0000&lt;br /&gt;
&lt;br /&gt;
After decoding [https://blog.whitehatsec.com/f5-networks-big-ip-cookie-decoded/] value of the BIG-IP persistence cookie an attacker receives an internal IP address and port number of backend servers. In some cases an attacker can also retreive sensitive informaion via &amp;lt;pool_name&amp;gt; suffix of the cookie name. For example, if an administrator give meaningful name to server pool (e.g. Sharepoint, 10.1.1.0, AD_prod) an attacker will get some additional information about network. Besides, an attacker detects that BIG-IP system is used in network infrustructure.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
# Run intercepting proxy or traffic intercepting browser plug-in, trap all responses where a cookie is set by the web application.&lt;br /&gt;
# If possible, log in to web application and inspect cookies.&lt;br /&gt;
# Find a cookie with name beginning with BIGipServer string or with value which has format as &amp;lt;coded server IP&amp;gt;.&amp;lt;coded server port&amp;gt;.0000 (e.g. 1677787402.36895.0000).&lt;br /&gt;
# Try to decode this value using available tools (e.g. [https://blog.whitehatsec.com/wp-content/uploads/F5BigIPCookieDecoder.html WhiteHat Security Big IP Cookie Decoder] [http://blog.secureideas.com/2013/08/burp-extension-for-f5-cookie-detection.html BurpSuitePro Plugin for Big IP Cookie Decoding]).&lt;br /&gt;
# Inspect suffix of BIGipServer cookie name and verify that it does not contain any sensitive information about network infrustructure.&lt;br /&gt;
&lt;br /&gt;
This example shows a GET request to BIG-IP with LTM module and a response containing BIGipServer cookie.&lt;br /&gt;
&lt;br /&gt;
==== Example 1 ====&lt;br /&gt;
 GET /app HTTP/1.1&lt;br /&gt;
 Host: x.x.x.x&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&lt;br /&gt;
&lt;br /&gt;
 HTTP/1.1 200 OK&lt;br /&gt;
 Set-Cookie: BIGipServerOldOWASSL=110536896.20480.0000; path=/&lt;br /&gt;
&lt;br /&gt;
Here we can see that pool has the meaningful name OldOWASSL and get the following destination server address:&lt;br /&gt;
* IP Address = 192.168.150.6&lt;br /&gt;
* Port = 80&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Configuring secure cookie persistence by using the Configuration utility&lt;br /&gt;
&lt;br /&gt;
* Log in to the Configuration utility.&lt;br /&gt;
* Navigate Local Traffic &amp;gt; Profiles &amp;gt; Persistence.&lt;br /&gt;
* Create new secure persistence profile with persistence type equals to &amp;quot;Cookie&amp;quot;.&lt;br /&gt;
* Check the custom box for &amp;quot;Cookie Name&amp;quot; and enter a cookie name that does not conflict with any existing cookie names.&lt;br /&gt;
* Check the custom box for &amp;quot;Cookie Encryption Use Policy&amp;quot; and choose a &amp;quot;required&amp;quot; option. Enter a passphrase in &amp;quot;Encryption Passphrase&amp;quot; field. &lt;br /&gt;
* Click on &amp;quot;Finished&amp;quot; button.&lt;br /&gt;
* Assign created persistence profile to virtual server.&lt;br /&gt;
&lt;br /&gt;
Configuring cookie persistence by using the TMSH&lt;br /&gt;
&lt;br /&gt;
* Log in to TMSH.&lt;br /&gt;
* Run the following commands:&lt;br /&gt;
: create ltm persistense cookie &amp;lt;profile_name&amp;gt;&lt;br /&gt;
: modify ltm persistense cookie &amp;lt;profile_name&amp;gt; cookie-name &amp;lt;secure_cookie_name&amp;gt;&lt;br /&gt;
: modify ltm persistense cookie &amp;lt;profile_name&amp;gt; cookie-encryption required&lt;br /&gt;
: modify ltm persistense cookie &amp;lt;profile_name&amp;gt; cookie-encryption-passphrase &amp;lt;secure_passphrase&amp;gt;&lt;br /&gt;
: modify ltm virtual &amp;lt;virtual_server&amp;gt; persist replace-all-with { &amp;lt;profile_name&amp;gt; }&lt;br /&gt;
&lt;br /&gt;
=== BIG-IP HTTP Server header information leakage ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
An attacker can receive information that a web application is protected by BIG-IP system via HTTP Server header.  &lt;br /&gt;
&lt;br /&gt;
BIG-IP system uses different HTTP Profiles for managing HTTP traffic. In particular, BIG-IP system uses HTTP Profile that specifies the string used as the server name in traffic generated by LTM. The default values are equal to &amp;quot;BigIP&amp;quot; or &amp;quot;BIG-IP&amp;quot; and depended on BIG-IP system version. An attacker can detect that BIG-IP is used in network infrustructure and then know role, type, and version of the BIG-IP system.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
# Run intercepting proxy or traffic intercepting browser plug-in, trap all responses from a web application.&lt;br /&gt;
# If possible, log in to web application and inspect HTTP responses.&lt;br /&gt;
# If Server header contains &amp;quot;BIG-IP&amp;quot; or &amp;quot;BigIP&amp;quot; value then BIG-IP is used.&lt;br /&gt;
&lt;br /&gt;
This example shows a GET request to BIG-IP and a response containing Server header inserted by BIG-IP LTM.&lt;br /&gt;
&lt;br /&gt;
==== Example 2 ====&lt;br /&gt;
 GET / HTTP/1.1&lt;br /&gt;
 Host: x.x.x.x&lt;br /&gt;
&lt;br /&gt;
'''Result Expected:'''&lt;br /&gt;
&lt;br /&gt;
 HTTP/1.0 302 Found&lt;br /&gt;
 Server: BigIP&lt;br /&gt;
 Connection: Close&lt;br /&gt;
 Content-Length: 0&lt;br /&gt;
 Location: /my.policy&lt;br /&gt;
 Set-Cookie: LastMRH_Session=05da1fc5;path=/;secure&lt;br /&gt;
 Set-Cookie: MRHSession=03e47713f1a8ef1aaa71cd9d05da1fc5;path=/;secure&lt;br /&gt;
 Set-Cookie: MRHSHint=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
It is recommended to remove Server header from HTTP responses.&lt;br /&gt;
&lt;br /&gt;
Removing Server header via Configuration Utility.&lt;br /&gt;
&lt;br /&gt;
* Log in to the Configuration utility.&lt;br /&gt;
* Navigate Local Traffic &amp;gt; Profiles &amp;gt; Services &amp;gt; HTTP.&lt;br /&gt;
* Create new secure HTTP profile.&lt;br /&gt;
* Enter empry string in &amp;quot;Server Agent Name&amp;quot; field.&lt;br /&gt;
* Click on &amp;quot;Finished&amp;quot; button.&lt;br /&gt;
* Assign created HTTP profile to virtual server.&lt;br /&gt;
&lt;br /&gt;
Removing Server header via TMSH&lt;br /&gt;
&lt;br /&gt;
* Log in to TMSH.&lt;br /&gt;
* Run the following commands:&lt;br /&gt;
: create ltm profile http &amp;lt;profile_name&amp;gt;&lt;br /&gt;
: modify ltm profile http &amp;lt;profile_name&amp;gt; server-agent-name none&lt;br /&gt;
&lt;br /&gt;
=== Administrative access to BIG-IP system via Internet ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
An attacker can access to BIG-IP system via Internet.  &lt;br /&gt;
&lt;br /&gt;
The BIG-IP system uses the following two network connection entry points [https://support.f5.com/kb/en-us/solutions/public/7000/300/sol7312.html]:&lt;br /&gt;
&lt;br /&gt;
* TMM switch interfaces&lt;br /&gt;
* Management interface (MGMT)&lt;br /&gt;
&lt;br /&gt;
Either the TMM switch interfaces or the MGMT interface can provide administrative access to the BIG-IP system. The TMM switch interfaces are the interfaces that the BIG-IP system uses to send and receive load-balanced traffic. The MGMT interface is the interface to perform system management functions. The MGMT interface is intended for administrative traffic and cannot be used for load-balanced traffic.  It is recommended to connect MGMT interface to a secure, management-only network, such as one that uses an RFC1918 private IP address space. Otherwise an attacker can identify BIG-IP systems in your network and then [https://www.blackhat.com/html/webcast/07182013-hacking-appliances-ironic-exploits-in-security-products.html try to attack them] via management plane.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
# Try to use the following googledorks:&lt;br /&gt;
&lt;br /&gt;
* inurl:&amp;quot;tmui/login.jsp&amp;quot;&lt;br /&gt;
* intitle:&amp;quot;BIG-IP&amp;quot; inurl:&amp;quot;tmui&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# Try to use the following queries in [http://un1c0rn.net/ Un1c0rn]&lt;br /&gt;
&lt;br /&gt;
* BIG-IP&lt;br /&gt;
* bigip&lt;br /&gt;
* BigIP&lt;br /&gt;
&lt;br /&gt;
# Try to use the following queries in [http://www.shodanhq.com Shodan]&lt;br /&gt;
&lt;br /&gt;
* F5-Login-Page&lt;br /&gt;
* WWW-Authenticate: Basic realm=BIG-IP&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
# Connect MGMT interface to management network.&lt;br /&gt;
# Set ‘allow none’ on all Self IPs and only administer the BIG-IP using the Management Port. Setting ‘allow none’ on each Self IP will block all access to administrative IP addresses except for the Management Port. Access to individual ports can be selectively enabled, but this is not recommended in a secure environment.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [https://f5.com/products/big-ip F5 Networks Official Site] &lt;br /&gt;
* [https://www.f5.com/pdf/products/big-ip-modules-ds.pdf BIG-IP Modules Datasheet]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_nginx&amp;diff=187440</id>
		<title>SCG WS nginx</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_nginx&amp;diff=187440"/>
				<updated>2014-12-31T12:57:05Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
'''NEEDS TO BE REVIEWED, SEE REFERENCES BELOW FOR A GOOD MATERIAL!'''&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
A detailed description of the product (can be taken from the official website)&lt;br /&gt;
&lt;br /&gt;
== Common Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
=== Misconfiguration 1 ===&lt;br /&gt;
==== Description ====&lt;br /&gt;
&lt;br /&gt;
%ProductName% allows unauthorized attacker to list all users of the system ...&lt;br /&gt;
&lt;br /&gt;
// Detailed description of the impact. Is it enabled by default? Vulnerable versions.&lt;br /&gt;
&lt;br /&gt;
==== How to test ====&lt;br /&gt;
&lt;br /&gt;
In order to test for %Misconfiguration_1%, one should ...&lt;br /&gt;
&lt;br /&gt;
// Proof-of-concept here. Please include the screenshots and widely known tools/scanners!&lt;br /&gt;
&lt;br /&gt;
==== Remediation ====&lt;br /&gt;
&lt;br /&gt;
Initial/common value of parameter &amp;quot;listUsers&amp;quot; from config.xml is set to &amp;quot;true&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To assess the vulnerability it is enough to change the value to false: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;security&amp;gt;&lt;br /&gt;
	&amp;lt;listUsers&amp;gt;false&amp;lt;/listUsers&amp;gt;&lt;br /&gt;
&amp;lt;/security&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://nealpoole.com/blog/2011/04/setting-up-php-fastcgi-and-nginx-dont-trust-the-tutorials-check-your-configuration/&lt;br /&gt;
&lt;br /&gt;
http://ngx.readthedocs.org/en/latest/topics/tutorials/config_pitfalls.html&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Secure_Configuration_Guide&amp;diff=187354</id>
		<title>Secure Configuration Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Secure_Configuration_Guide&amp;diff=187354"/>
				<updated>2014-12-27T16:05:36Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: /* 6. Crypto misconfiguration */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome on the page of Secure Configuration Guide!&lt;br /&gt;
&lt;br /&gt;
Project description is available here: https://www.owasp.org/index.php/OWASP_Secure_Configuration_Guide&lt;br /&gt;
&lt;br /&gt;
When editing the page, please follow the page structure, described in [[Template:OWASP Secure Configuration Guide]]&lt;br /&gt;
&lt;br /&gt;
= Table of Contents =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 1. Introduction ==&lt;br /&gt;
&lt;br /&gt;
'''1.1. The OWASP Secure Configuration Guide'''&lt;br /&gt;
&lt;br /&gt;
'''1.2. Misconfiguration. Defender's point'''&lt;br /&gt;
&lt;br /&gt;
'''1.3. Misconfiguration. Attacker's point'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 2. Web servers misconfiguration ==&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WS_Apache|2.1. Apache]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WS_IIS|2.2. IIS]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WS_nginx|2.3. nginx]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WS_GWS|2.4. GWS]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WS_IBM|2.5. IBM HTTP Server]]'''&lt;br /&gt;
&lt;br /&gt;
== 3. Application servers misconfiguration ==&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_Tomcat|3.1. Apache Tomcat]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_Borland|3.2. Borland Enterprise Server]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_ColdFusion|3.3. ColdFusion]]''' &lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_WebSphere|3.4. IBM WebSphere Application Server]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_JBoss|3.5. JBoss Enterprise Application Platform]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_Jetty|3.6. Jetty]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_NetWeaver|3.7. SAP NetWeaver Application Server]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_Oracle|3.8. Oracle Application Server]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_WebLogic|3.9. Oracle WebLogic Server]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_AS_GlassFish|3.10. Oracle GlassFish Server]]'''&lt;br /&gt;
&lt;br /&gt;
== 4. Web frameworks misconfiguration ==&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Struts|4.1. Apache Struts]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_ASPNET|4.2. ASP.NET]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_CakePHP|4.3. CakePHP]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_CodeIgniter|4.4. CodeIgniter]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Django|4.5. Django]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Lithium|4.6. Lithium]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Rails|4.7. Ruby on Rails]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Spring|4.8. Spring]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Symfony|4.9. Symfony]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_WF_Zend|4.10. Zend]]'''&lt;br /&gt;
&lt;br /&gt;
== 5. CMS misconfiguration ==&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Bitrix|5.1. Bitrix]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Drupal|5.2. Drupal]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Joomla|5.3. Joomla]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Magento|5.4. Magento]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_OpenCart|5.5. OpenCart]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_phpBB|5.6. phpBB]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Shopify|5.7. Shopify]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_TYPO3|5.8. TYPO3]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_vBulletin|5.9. vBulletin]]'''&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_CMS_Wordpress|5.10. Wordpress]]'''&lt;br /&gt;
&lt;br /&gt;
== 6. Crypto misconfiguration  ==&lt;br /&gt;
&lt;br /&gt;
'''6.1 SSL / TLS configuration'''&lt;br /&gt;
&lt;br /&gt;
'''6.2 Cryptographic Password storage policy'''&lt;br /&gt;
&lt;br /&gt;
'''6.3 to be complemented later'''&lt;br /&gt;
&lt;br /&gt;
== 7. Services ==&lt;br /&gt;
&lt;br /&gt;
'''7.1 to be complemented later'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 8. Devices ==&lt;br /&gt;
&lt;br /&gt;
'''[[SCG_D_BIGIP|8.1. BIG-IP]]''' &lt;br /&gt;
&lt;br /&gt;
'''8.2. Routers''' &lt;br /&gt;
&lt;br /&gt;
'''8.3. Firewalls '''&lt;br /&gt;
&lt;br /&gt;
'''8.4. to be complemented later'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:OWASP Project]]  [[Category:OWASP_Breakers]] [[Category:OWASP_Defenders]]  [[Category:OWASP_Document]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187300</id>
		<title>SCG CMS Wordpress</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_CMS_Wordpress&amp;diff=187300"/>
				<updated>2014-12-23T06:05:50Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
''' To be filled in in accordance to the template, some useful links: '''&lt;br /&gt;
&lt;br /&gt;
http://codex.wordpress.org/Hardening_WordPress (consider writing only real security risks with good examples)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://github.com/anantshri/wp-security (extract samples from here. keep them as code sections either for a plugin or for a theme functions.php, .htaccess or nginx config file)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=187299</id>
		<title>SCG WS Apache</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=SCG_WS_Apache&amp;diff=187299"/>
				<updated>2014-12-23T06:03:10Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: basic template of stuff that will be added and expanded.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Secure Configuration Guide}}&lt;br /&gt;
&lt;br /&gt;
Details will be added in proper format.&lt;br /&gt;
right now cataloguing links which can be used as references.&lt;br /&gt;
&lt;br /&gt;
== Misconfigurations ==&lt;br /&gt;
&lt;br /&gt;
1. Version details disclosed in headers&lt;br /&gt;
disable apache tokens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. Proper SSL cipher selection&lt;br /&gt;
Cipher orders&lt;br /&gt;
Disable specific ciphers&lt;br /&gt;
&lt;br /&gt;
3. Guidelines on how to store ssl private keys on server&lt;br /&gt;
stuff like not to store private keys on /var/www/&lt;br /&gt;
&lt;br /&gt;
4. Detailing about various authentication types&lt;br /&gt;
&lt;br /&gt;
basic, digest, X509, LDAP or others.&lt;br /&gt;
&lt;br /&gt;
Detailing about authoentication types and which one to use in which situation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
https://httpd.apache.org/docs/current/misc/security_tips.html&lt;br /&gt;
&lt;br /&gt;
https://wiki.debian.org/Apache/Hardening&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Clickjacking_Defense_Cheat_Sheet&amp;diff=177375</id>
		<title>Talk:Clickjacking Defense Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Clickjacking_Defense_Cheat_Sheet&amp;diff=177375"/>
				<updated>2014-06-22T06:48:07Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Javascript based solution : are they good now ==&lt;br /&gt;
&lt;br /&gt;
Considering the fact that people can disable javascript in framed page should we be recommending Javascript based solution for Clickjacking or we should all bet for just XFO.&lt;br /&gt;
&lt;br /&gt;
I can understand this (javascript based solution) could be a good option when the site can't function without javascript enabled however any site which has script enabled just for this feature can again be victimized using iframe property like sandbox=&amp;quot;allow-forms allow-scripts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] ([[User talk:Anant Shrivastava|talk]]) 01:48, 22 June 2014 (CDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Clickjacking_Defense_Cheat_Sheet&amp;diff=177374</id>
		<title>Talk:Clickjacking Defense Cheat Sheet</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Clickjacking_Defense_Cheat_Sheet&amp;diff=177374"/>
				<updated>2014-06-22T06:47:49Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: Created page with &amp;quot; == Javascript based soultion : are they good now ==  Considering the fact that people can disable javascript in framed page should we be recommending Javascript based solutio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Javascript based soultion : are they good now ==&lt;br /&gt;
&lt;br /&gt;
Considering the fact that people can disable javascript in framed page should we be recommending Javascript based solution for Clickjacking or we should all bet for just XFO.&lt;br /&gt;
&lt;br /&gt;
I can understand this (javascript based solution) could be a good option when the site can't function without javascript enabled however any site which has script enabled just for this feature can again be victimized using iframe property like sandbox=&amp;quot;allow-forms allow-scripts&amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] ([[User talk:Anant Shrivastava|talk]]) 01:47, 22 June 2014 (CDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Installer_Guidelines&amp;diff=133048</id>
		<title>OWASP Installer Guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Installer_Guidelines&amp;diff=133048"/>
				<updated>2012-07-17T11:39:50Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added suggestion on android location.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= OWASP Installer Guidelines =&lt;br /&gt;
&lt;br /&gt;
This is a ''proposed'' set of guidelines for the installers of OWASP projects.&lt;br /&gt;
&lt;br /&gt;
Please update this page with any suggestions for improvements you may have.&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
OWASP projects should be installed into a project specific directory underneath:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\Program Files (x86)\OWASP\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or for older Windows versions:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\Program Files\OWASP\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On uninstallation the 'OWASP' directory should be deleted if there are no other files or directories left underneath it.&lt;br /&gt;
&lt;br /&gt;
Installers should add programs to the 'All programs'/'Start Menu' list in a directory underneath an 'OWASP' directory.&lt;br /&gt;
&lt;br /&gt;
If necessary the 'OWASP' directory should be created and a link to the OWASP home page added.&lt;br /&gt;
&lt;br /&gt;
On uninstallation the OWASP 'Start Menu' directory should be deleted if there are no other files or directories left underneath it.&lt;br /&gt;
&lt;br /&gt;
Project known to conform to these recommendations:&lt;br /&gt;
* [[OWASP Zed Attack Proxy Project]]&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
OWASP projects should be installed into a project specific directory underneath:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/owasp/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On uninstallation the 'owasp' directory should be deleted if there are no other files or directories left underneath it.&lt;br /&gt;
&lt;br /&gt;
== Mac OS ==&lt;br /&gt;
TBA - please add suggestions&lt;br /&gt;
&lt;br /&gt;
== iPhone ==&lt;br /&gt;
TBA - please add suggestions&lt;br /&gt;
&lt;br /&gt;
== Android ==&lt;br /&gt;
package name : &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
com.owasp.&amp;lt;name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Where &amp;lt;name&amp;gt; will be package name.&lt;br /&gt;
also on sdcard &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/sdcard/owasp/&amp;lt;name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:OWASP_Installer_Guidelines&amp;diff=133047</id>
		<title>Talk:OWASP Installer Guidelines</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:OWASP_Installer_Guidelines&amp;diff=133047"/>
				<updated>2012-07-17T11:38:01Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added suggestion on android location.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Android ==&lt;br /&gt;
for android all applications installed will go to /data/data/ so we can keep the applications in one cluster by using a common package name.&lt;br /&gt;
&lt;br /&gt;
com.owasp.&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;name&amp;gt; would be app name.&lt;br /&gt;
so this will have following filesystem layout.&lt;br /&gt;
&lt;br /&gt;
/data/data/com.owasp.&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
also if we want to keep content on sdcard then layout should be&lt;br /&gt;
&lt;br /&gt;
/sdcard/owasp/&amp;lt;name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 11:38, 17 July 2012 (UTC)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=OWASP_Mobile_Security_Project_-_Android/References&amp;diff=119193</id>
		<title>OWASP Mobile Security Project - Android/References</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=OWASP_Mobile_Security_Project_-_Android/References&amp;diff=119193"/>
				<updated>2011-10-17T00:07:56Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added whitepaper on security issues in android custom roms&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Here are a number of references related to [[Android]] Security&lt;br /&gt;
&lt;br /&gt;
===Official documentation===&lt;br /&gt;
* Main websites: http://www.android.com , http://code.google.com/android , http://developer.android.com/&lt;br /&gt;
* [http://developer.android.com/guide/appendix/faq/security.html Android Security FAQ]&lt;br /&gt;
* [http://developer.android.com/guide/index.html Android Developer's Guide]&lt;br /&gt;
* [http://developer.android.com/guide/topics/security/security.html Security and Permissions]&lt;br /&gt;
* [http://developer.android.com/guide/topics/testing/testing_android.html Testing and Instrumentation]&lt;br /&gt;
* [http://developer.android.com/guide/topics/manifest/manifest-intro.html AndroidManifest.xml File] and [http://developer.android.com/reference/android/Manifest.permission.html Permissions list]&lt;br /&gt;
* [http://developer.android.com/guide/tutorials/notepad/index.html Notepad Tutorial] - Recomended starting point to understand Android&lt;br /&gt;
&lt;br /&gt;
===Android Security Team===&lt;br /&gt;
* Report security vulnerabilities in Android: security@android.com (here is the [http://developer.android.com/security_at_android_dot_com.txt PGP Public] key)&lt;br /&gt;
* [http://groups.google.com/group/android-security-discuss Android Security Mailing list]&lt;br /&gt;
* [http://groups.google.com/group/android-security-discuss/browse_thread/thread/a2ab575dd0e5c27d Introduction from Android Security Team]&lt;br /&gt;
&lt;br /&gt;
===Published Research and presentations ===&lt;br /&gt;
* '''Presentations'''&lt;br /&gt;
** [http://www.smartphonesdumbapps.com/ Smart Phones Dumb Apps] Presentation about how to unpack, disassemble/decompile, and analyze Android applications.  Also has a link to some Perl code to automate parts of this process.&lt;br /&gt;
** [http://www.coverity.com/library/pdf/coverity-scan-2010-open-source-integrity-report.pdf Coverity SCAN 2010 Open Source Integrity Report] which contains information about 88 Kernel bugs in Android&lt;br /&gt;
** [https://www.isecpartners.com/files/iSEC_Android_Exploratory_Blackhat_2009.pdf Exploratory Android Security (iSEC Partners,  Blackhat_2009)&lt;br /&gt;
** [https://www.isecpartners.com/files/iSEC_Securing_Android_Apps.pdf Developing Secure Mobile Applications for Android] &lt;br /&gt;
** [http://www.blackhat.com/html/bh-ad-10/bh-ad-10-briefings.html Building Android Sandcastles in Android's Sandbox] at BlackHat Abu Dhabi (Nov 10 - 11 2010) (NOT PUBLISHED YET)&lt;br /&gt;
** [http://anantshri.info/articles/android_cust_rom_security.html Security Issues in android Custom ROMs] at c0c0n Kochi India (Oct 8 2011)&lt;br /&gt;
* '''Books'''&lt;br /&gt;
** [http://www.amazon.com/gp/product/0071633561/ Mobile Application Security]&lt;br /&gt;
*'''Blog posts'''&lt;br /&gt;
** [http://jack-mannino.blogspot.com/2010/09/reversing-android-apps-101.html Reversing Android Apps 101]  and [http://jack-mannino.blogspot.com/2010/10/storing-data-on-mobile-devices-wrong.html Storing Data On Mobile Devices The Wrong Way]  - Jack Mannino &lt;br /&gt;
** [http://carnal0wnage.blogspot.com/2010/04/android-emulators-with-android-market.html Android Emulators with Android Market] and [http://techdroid.kbeanie.com/2009/11/android-market-on-emulator.html Android Market on Emulator]&lt;br /&gt;
&lt;br /&gt;
===Tools===&lt;br /&gt;
* '''Android Development'''&lt;br /&gt;
** [http://developer.android.com/sdk/index.html Android SDK] &lt;br /&gt;
* '''Android Security Review'''&lt;br /&gt;
** [http://www.smartphonesdumbapps.com/ Smart Phones Dumb Apps] Presentation about how to unpack, disassemble/decompile, and analyze Android applications.  Also has a link to some Perl code to automate parts of this process.&lt;br /&gt;
** [http://code.google.com/p/dex2jar/ Dex2Jar] :'' &amp;quot;...Android mobile device runs applications which have been converted into a compact Dalvik Executable (.dex) format. Dex2Jar converts .dex files to Java .class files...&amp;quot; ''&lt;br /&gt;
** [http://code.google.com/p/android-apktool/ ApkTool] :'' &amp;quot;...It is a tool for reengineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc...&amp;quot; ''&lt;br /&gt;
** [http://java.decompiler.free.fr JD-GUI and JD-Eclipse], [http://www.neshkov.com/ DJ] and [http://www.varaneckas.com/jad JAD (mirror)] : Java Decompilers&lt;br /&gt;
** [http://code.google.com/p/android4me/downloads/list AXMLPrinter2] - Utility that decodes the Android XML files, such as Manifest.xml ().&lt;br /&gt;
** [[OWASP O2 Platform]] can be used to review the Android Java source code (create object model of compiled java code, search source-code files, model config files)&lt;br /&gt;
** Commercial tools (like Fortify, IBM AppScan Source) can parse Java files (the question is &amp;quot;Do they have Android Specific rules&amp;quot;)&lt;br /&gt;
** iSec Partners have a number of Android related tools at https://www.isecpartners.com/mobile_application_tools.html&lt;br /&gt;
&lt;br /&gt;
===Media Coverage===&lt;br /&gt;
*  Storing data unencrypted: &amp;quot;Firm finds security holes in mobile bank apps&amp;quot;: http://news.cnet.com/8301-27080_3-20021874-245.html &lt;br /&gt;
* Paypal has issue with lack of SSL in iPhope app: http://online.wsj.com/article/SB10001424052748703506904575592782874885808.html (more to iPhone page)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=118923</id>
		<title>Talk:Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=118923"/>
				<updated>2011-10-12T11:19:25Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though this section is titled &amp;quot;web application fingerprint&amp;quot;, the content focuses only of fingerprinting &amp;quot;web servers&amp;quot;. I think either the title should be changed, or the content should be updated with similar techniques to fingerprint web applications. &lt;br /&gt;
&lt;br /&gt;
[[User:Marco|Marco]] 18:57, 17 August 2008 (EDT) &lt;br /&gt;
&lt;br /&gt;
:I agree. Though I'm curious what how you'd describe finger printing a &amp;quot;web application&amp;quot; ..... do you mean the technologies used? Do you mean building a tree or flow diagram of the site/app?&amp;lt;br&amp;gt; &lt;br /&gt;
:[[User:Rick.mitchell|Rick.mitchell]] 09:52, 3 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
hi All I have recently wrote a paper on this topic hope that could help in expanding the section posting the link here before actually linking it in external links section [http://anantshri.info/articles/web_app_finger_printing.html &amp;lt;br&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[http://anantshri.info/articles/web_app_finger_printing.html http://anantshri.info/articles/web_app_finger_printing.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 08:01, 17 July 2011 (EDT)&lt;br /&gt;
&lt;br /&gt;
after 3 months on non objection i have added the whitepaper in the related link sections under whitepaper category.&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 07:19, 12 October 2011 (EDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=118922</id>
		<title>Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=118922"/>
				<updated>2011-10-12T11:17:45Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: added whitepaper on web application fingerprinting. which should actually be the content of this page instead of http finger printing.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
Web server fingerprinting is a critical task for the Penetration tester. Knowing the version and type of a running web server allows testers to determine known vulnerabilities and the appropriate exploits to use during testing.&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue ==&lt;br /&gt;
There are several different vendors and versions of web servers on the market today. Knowing the type of web server that you are testing significantly helps in the testing process, and will also change the course of the test. This information can be derived by sending the web server specific commands and analyzing the output, as each version of web server software may respond differently to these commands. By knowing how each type of web server responds to specific commands and keeping this information in a web server fingerprint database, a penetration tester can send these commands to the web server, analyze the response, and compare it to the database of known signatures. Please note that it usually takes several different commands to accurately identify the web server, as different versions may react similarly to the same command. Rarely, however, different versions react the same to all HTTP commands. So, by sending several different commands, you increase the accuracy of your guess.&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
The simplest and most basic form of identifying a Web server is to look at the Server field in the HTTP response header. For our experiments we use netcat. &lt;br /&gt;
Consider the following HTTP Request-Response: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc 202.41.76.251 80&lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Date: Mon, 16 Jun 2003 02:53:29 GMT&lt;br /&gt;
Server: Apache/1.3.3 (Unix)  (Red Hat/Linux)&lt;br /&gt;
Last-Modified: Wed, 07 Oct 1998 11:18:14 GMT&lt;br /&gt;
ETag: &amp;quot;1813-49b-361b4df6&amp;quot;&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Content-Length: 1179&lt;br /&gt;
Connection: close&lt;br /&gt;
Content-Type: text/html&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the ''Server'' field, we understand that the server is likely Apache, version 1.3.3, running on Linux operating system.&lt;br /&gt;
&lt;br /&gt;
Four examples of the HTTP response headers are shown below.&lt;br /&gt;
&lt;br /&gt;
From an '''Apache 1.3.23''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''Microsoft IIS 5.0''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Expires: Yours, 17 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Date: Mon, 16 Jun 2003 01:41: 33 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Wed, 28 May 2003 15:32: 21 GMT &lt;br /&gt;
ETag: b0aac0542e25c31: 89d &lt;br /&gt;
Content-Length: 7369 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''Netscape Enterprise 4.1''' server: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:19: 04 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From a '''SunONE 6.1''' server:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:53:45 GMT&lt;br /&gt;
Content-length: 1186&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 14:50:31 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Accept-Ranges: bytes&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
However, this testing methodology is not so good. There are several techniques that allow a web site to obfuscate or to modify the server banner string.&lt;br /&gt;
For example we could obtain the following answer:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
403 HTTP/1.1 Forbidden &lt;br /&gt;
Date: Mon, 16 Jun 2003 02:41: 27 GMT &lt;br /&gt;
Server: Unknown-Webserver/1.0 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML; charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, the server field of that response is obfuscated: we cannot know what type of web server is running.&lt;br /&gt;
&lt;br /&gt;
=== Protocol behaviour ===&lt;br /&gt;
More refined techniques take in consideration various characteristics of the several web servers available on the market. We will list some methodologies that allow us to deduce the type of web server in use.&lt;br /&gt;
&lt;br /&gt;
'''HTTP header field ordering'''&lt;br /&gt;
&lt;br /&gt;
The first method consists of observing the ordering of the several headers in the response. Every web server has an inner ordering of the header. We consider the following answers as an example:&lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:10: 49 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:13: 52 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:01: 40 GMT &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Last-modified: Wed, 31 Jul 2002 15:37: 56 GMT &lt;br /&gt;
Content-length: 57 &lt;br /&gt;
Accept-ranges: bytes &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
HEAD / HTTP/1.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:23:37 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:20:26 GMT&lt;br /&gt;
Last-Modified: Wed, 10 Jan 2007 09:58:26 GMT&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can notice that the ordering of the ''Date'' field and the ''Server'' field differs between Apache, Netscape Enterprise, and IIS.&lt;br /&gt;
&lt;br /&gt;
'''Malformed requests test''' &lt;br /&gt;
&lt;br /&gt;
Another useful test to execute involves sending malformed requests or requests of nonexistent pages to the server.&lt;br /&gt;
Consider the following HTTP responses. &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:12: 37 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Connection: close &lt;br /&gt;
Transfer: chunked &lt;br /&gt;
Content-Type: text/HTML; charset=iso-8859-1 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Content-Location: http://iis.example.com/Default.htm &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Last-Modified: Fri, 01 Jan 1999 20:14: 02 GMT &lt;br /&gt;
ETag: W/e0d362a4c335be1: ae1 &lt;br /&gt;
Content-Length: 133 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / HTTP/3.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 505 HTTP Version Not Supported &lt;br /&gt;
Server: Netscape-Enterprise/4.1 &lt;br /&gt;
Date: Mon, 16 Jun 2003 06:04: 04 GMT &lt;br /&gt;
Content-length: 140 &lt;br /&gt;
Content-type: text/HTML &lt;br /&gt;
Connection: close &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / HTTP/3.0&lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad request&lt;br /&gt;
Server: Sun-ONE-Web-Server/6.1&lt;br /&gt;
Date: Tue, 16 Jan 2007 15:25:00 GMT&lt;br /&gt;
Content-length: 0&lt;br /&gt;
Content-type: text/html&lt;br /&gt;
Connection: close&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We notice that every server answers in a different way. The answer also differs in the version of the server. Similar observations can be done we create requests with a non-existent protocol. Consider the following responses: &lt;br /&gt;
&lt;br /&gt;
Response from '''Apache 1.3.23''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc apache.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 200 OK &lt;br /&gt;
Date: Sun, 15 Jun 2003 17:17: 47 GMT &lt;br /&gt;
Server: Apache/1.3.23 &lt;br /&gt;
Last-Modified: Thu, 27 Feb 2003 03:48: 19 GMT &lt;br /&gt;
ETag: 32417-c4-3e5d8a83 &lt;br /&gt;
Accept-Ranges: bytes &lt;br /&gt;
Content-Length: 196 &lt;br /&gt;
Connection: close &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''IIS 5.0''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc iis.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
HTTP/1.1 400 Bad Request &lt;br /&gt;
Server: Microsoft-IIS/5.0 &lt;br /&gt;
Date: Fri, 01 Jan 1999 20:14: 34 GMT &lt;br /&gt;
Content-Type: text/HTML &lt;br /&gt;
Content-Length: 87 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from '''Netscape Enterprise 4.1''' &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc netscape.example.com 80 &lt;br /&gt;
GET / JUNK/1.0 &lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt; &lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt; &lt;br /&gt;
Your browser sent to query this server could not understand. &lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Response from a '''SunONE 6.1'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ nc sunone.example.com 80 &lt;br /&gt;
GET / JUNK/1.0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;HTML&amp;gt;&amp;lt;HEAD&amp;gt;&amp;lt;TITLE&amp;gt;Bad request&amp;lt;/TITLE&amp;gt;&amp;lt;/HEAD&amp;gt;&lt;br /&gt;
&amp;lt;BODY&amp;gt;&amp;lt;H1&amp;gt;Bad request&amp;lt;/H1&amp;gt;&lt;br /&gt;
Your browser sent a query this server could not understand.&lt;br /&gt;
&amp;lt;/BODY&amp;gt;&amp;lt;/HTML&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Automated Testing ===&lt;br /&gt;
The tests to carry out in order to accurately fingerprint a web server can be many. Luckily, there are tools that automate these tests. &amp;quot;''httprint''&amp;quot; is one of such tools. httprint has a signature dictionary that allows one to recognize the type and the version of the web server in use.&amp;lt;br&amp;gt;&lt;br /&gt;
An example of running httprint is shown below:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:httprint.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== OnLine Testing === &lt;br /&gt;
An example of on line tool that often delivers a lot of information on target Web Server, is Netcraft. With this tool we can retrieve information about operating system, web server used, Server Uptime, Netblock Owner, history of change related to Web server and O.S.&amp;lt;br&amp;gt;&lt;br /&gt;
An example is shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:netcraft2.png]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* Saumil Shah: &amp;quot;An Introduction to HTTP fingerprinting&amp;quot; - http://net-square.com/httprint/httprint_paper.html&lt;br /&gt;
* Anant Shrivastava : &amp;quot;Web Application Finger Printing&amp;quot; - http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* httprint - http://net-square.com/httprint/index.shtml&lt;br /&gt;
* httprecon - http://www.computec.ch/projekte/httprecon/&lt;br /&gt;
* Netcraft - http://www.netcraft.com&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114160</id>
		<title>Talk:Enumerate Applications on Webserver (OTG-INFO-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114160"/>
				<updated>2011-07-19T06:18:15Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== NMAP Changes? ==&lt;br /&gt;
&lt;br /&gt;
Hi, what do you think to change the nmap command, and the nmap site?&lt;br /&gt;
&lt;br /&gt;
Latest nmap change some parameters like -P0 to -PN. -P0 is obsolete.&lt;br /&gt;
&lt;br /&gt;
Sample command should be now: nmap –PN –sT –sV –p1-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
If fact, nmap has the abilily to scan port number 0, so we can do better with:&lt;br /&gt;
&lt;br /&gt;
nmap –PN –sT –sV –p0-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
And the nmap site is nmap.org now. But www.insecure.org is still there.&lt;br /&gt;
&lt;br /&gt;
cheers&lt;br /&gt;
--[[User:Unusuario|Unusuario]] 15:36, 2 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== v3 Review Comments ==&lt;br /&gt;
&lt;br /&gt;
Similar to the previous section this section seems more like Service discovery than application discovery. We're still learning things about the server and not as much about the application(s) we're assessing. IMHO.&amp;lt;br&amp;gt;&lt;br /&gt;
May this section should be renamed to something like &amp;quot;Discovery of web server services and web applications on a host&amp;quot;.&lt;br /&gt;
[[User:Rick.mitchell|Rick.mitchell]] 09:55, 3 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Merge with  (OWASP-IG-004) ==&lt;br /&gt;
This article should be merged with 4.2.4 Testing for Web Application Fingerprint (OWASP-IG-004)  and renamed to web server finger printing as both these pages talk about server level finger printing.&lt;br /&gt;
&lt;br /&gt;
also if i may put forward I have tried to cover some steps of web application finger printing here : http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
I hope this could be of some use in the correct page of web application finger printing.&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 06:05, 18 July 2011 (EDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114081</id>
		<title>Talk:Enumerate Applications on Webserver (OTG-INFO-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114081"/>
				<updated>2011-07-18T10:05:35Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== NMAP Changes? ==&lt;br /&gt;
&lt;br /&gt;
Hi, what do you think to change the nmap command, and the nmap site?&lt;br /&gt;
&lt;br /&gt;
Latest nmap change some parameters like -P0 to -PN. -P0 is obsolete.&lt;br /&gt;
&lt;br /&gt;
Sample command should be now: nmap –PN –sT –sV –p1-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
If fact, nmap has the abilily to scan port number 0, so we can do better with:&lt;br /&gt;
&lt;br /&gt;
nmap –PN –sT –sV –p0-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
And the nmap site is nmap.org now. But www.insecure.org is still there.&lt;br /&gt;
&lt;br /&gt;
cheers&lt;br /&gt;
--[[User:Unusuario|Unusuario]] 15:36, 2 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== v3 Review Comments ==&lt;br /&gt;
&lt;br /&gt;
Similar to the previous section this section seems more like Service discovery than application discovery. We're still learning things about the server and not as much about the application(s) we're assessing. IMHO.&amp;lt;br&amp;gt;&lt;br /&gt;
May this section should be renamed to something like &amp;quot;Discovery of web server services and web applications on a host&amp;quot;.&lt;br /&gt;
[[User:Rick.mitchell|Rick.mitchell]] 09:55, 3 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Merge with  (OWASP-IG-004) ==&lt;br /&gt;
This article should be merged with 4.2.4 Testing for Web Application Fingerprint (OWASP-IG-004)  and renamed to web server finger printing as both these pages talk about server level finger printing.&lt;br /&gt;
&lt;br /&gt;
also if i pay put forward I have tried to cover some steps of web application finger printing here : http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
I hope this could be of some use in the correct page of web application finger printing.&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 06:05, 18 July 2011 (EDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114080</id>
		<title>Talk:Enumerate Applications on Webserver (OTG-INFO-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Enumerate_Applications_on_Webserver_(OTG-INFO-004)&amp;diff=114080"/>
				<updated>2011-07-18T10:04:44Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: merger request and content suggestion.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
== NMAP Changes? ==&lt;br /&gt;
&lt;br /&gt;
Hi, what do you think to change the nmap command, and the nmap site?&lt;br /&gt;
&lt;br /&gt;
Latest nmap change some parameters like -P0 to -PN. -P0 is obsolete.&lt;br /&gt;
&lt;br /&gt;
Sample command should be now: nmap –PN –sT –sV –p1-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
If fact, nmap has the abilily to scan port number 0, so we can do better with:&lt;br /&gt;
&lt;br /&gt;
nmap –PN –sT –sV –p0-65535 192.168.1.100&lt;br /&gt;
&lt;br /&gt;
And the nmap site is nmap.org now. But www.insecure.org is still there.&lt;br /&gt;
&lt;br /&gt;
cheers&lt;br /&gt;
--[[User:Unusuario|Unusuario]] 15:36, 2 April 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
== v3 Review Comments ==&lt;br /&gt;
&lt;br /&gt;
Similar to the previous section this section seems more like Service discovery than application discovery. We're still learning things about the server and not as much about the application(s) we're assessing. IMHO.&amp;lt;br&amp;gt;&lt;br /&gt;
May this section should be renamed to something like &amp;quot;Discovery of web server services and web applications on a host&amp;quot;.&lt;br /&gt;
[[User:Rick.mitchell|Rick.mitchell]] 09:55, 3 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Merge with  (OWASP-IG-004) ==&lt;br /&gt;
This article should be merged with 4.2.4 Testing for Web Application Fingerprint (OWASP-IG-004)  and renamed to web server finger printing as both these pages talk about server level finger printing.&lt;br /&gt;
&lt;br /&gt;
also if i pay put forward I have tried to cover some steps of web application finger printing here : http://anantshri.info/articles/web_app_finger_printing.html&lt;br /&gt;
I hope this could be of some use in the correct page of web application finger printing.&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Talk:Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=114032</id>
		<title>Talk:Testing for Web Application Fingerprint (OWASP-IG-004)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Talk:Testing_for_Web_Application_Fingerprint_(OWASP-IG-004)&amp;diff=114032"/>
				<updated>2011-07-17T12:01:25Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: submitting request for link addition for page enhancement&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Even though this section is titled &amp;quot;web application fingerprint&amp;quot;, the content focuses only of fingerprinting &amp;quot;web servers&amp;quot;. I think either the title should be changed, or the content should be updated with similar techniques to fingerprint web applications. &lt;br /&gt;
&lt;br /&gt;
[[User:Marco|Marco]] 18:57, 17 August 2008 (EDT) &lt;br /&gt;
&lt;br /&gt;
:I agree. Though I'm curious what how you'd describe finger printing a &amp;quot;web application&amp;quot; ..... do you mean the technologies used? Do you mean building a tree or flow diagram of the site/app?&amp;lt;br&amp;gt; &lt;br /&gt;
:[[User:Rick.mitchell|Rick.mitchell]] 09:52, 3 September 2008 (EDT)&lt;br /&gt;
&lt;br /&gt;
hi All I have recently wrote a paper on this topic hope that could help in expanding the section posting the link here before actually linking it in external links section [http://anantshri.info/articles/web_app_finger_printing.html &amp;lt;br&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
[http://anantshri.info/articles/web_app_finger_printing.html http://anantshri.info/articles/web_app_finger_printing.html]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:Anant Shrivastava|Anant Shrivastava]] 08:01, 17 July 2011 (EDT)&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Session_Management&amp;diff=93292</id>
		<title>Testing for Session Management</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Session_Management&amp;diff=93292"/>
				<updated>2010-11-18T22:11:10Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: correcting seq number&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
''' 4.5 Session Management Testing'''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
At the core of any web-based application is the way in which it maintains state and thereby controls user-interaction with the site.  Session Management broadly covers all controls on a user from authentication to leaving the application.&lt;br /&gt;
HTTP is a stateless protocol, meaning that web servers respond to client requests without linking them to each other.  Even simple application logic requires a user's multiple requests to be associated with each other across a &amp;quot;session”.  This necessitates third party solutions – through either Off-The-Shelf (OTS) middleware and web server solutions, or bespoke developer implementations.  Most popular web application environments, such as ASP and PHP, provide developers with built-in session handling routines. Some kind of identification token will typically be issued, which will be referred to as a “Session ID” or Cookie.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are a number of ways in which a web application may interact with a user.  Each is dependent upon the nature of the site, the security, and availability requirements of the application.&lt;br /&gt;
Whilst there are accepted best practices for application development, such as those outlined in the [[OWASP Guide Project|OWASP Guide to Building Secure Web Applications]], it is important that application security is considered within the context of the provider’s requirements and expectations. In this chapter we describe the following items.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Testing for Session_Management_Schema  (OWASP-SM-001)|4.5.1 Testing for Session Management Schema (OWASP-SM-001)]]&amp;lt;br&amp;gt;&lt;br /&gt;
This describes how to analyse a Session Management Schema, with the goal to understand how the Session Management mechanism has been developed and if it is possible to break it to bypass the user session. It explains how to test the security of session tokens issued to the client's browser: how to reverse engineer a cookie, and how to manipulate cookies to hijack a session.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for cookies attributes (OWASP-SM-002)|4.5.2 Testing for Cookies attributes (OWASP-SM-002)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Cookies are often a key attack vector for malicious users (typically, targeting other users) and, as such, the application should always take due diligence to protect cookies. In this section, we will look at how an application can take the necessary precautions when assigning cookies and how to test that these attributes have been correctly configured.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Session Fixation  (OWASP-SM-003)|4.5.3 Testing for Session Fixation  (OWASP-SM-003)]]&amp;lt;br&amp;gt;&lt;br /&gt;
When an application does not renew the cookie after a successful user authentication, it could be possible to find a session fixation vulnerability and force a user to utilize a cookie known to the attacker.&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for Exposed Session Variables   (OWASP-SM-004)|4.5.4 Testing for Exposed Session Variables   (OWASP-SM-004)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Session Tokens represent confidential information because they tie the user identity with his own session. It's possible to test if the session token is exposed to this vulnerability and try to create a replay session attack.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[Testing for CSRF  (OWASP-SM-005)|4.5.5 Testing for CSRF (OWASP-SM-005)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Cross Site Request Forgery describes a way to force an unknowing user to execute unwanted actions on a web application in which he is currently authenticated. This section describes how to test an application to find this kind of vulnerability.&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_authentication&amp;diff=93291</id>
		<title>Testing for authentication</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_authentication&amp;diff=93291"/>
				<updated>2010-11-18T22:08:50Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: serial number correction&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
''' 4.4 Authentication Testing '''&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Authentication (Greek: αυθεντικός = real or genuine, from 'authentes' = author ) is the act of establishing or confirming something (or someone) as authentic, that is, that claims made by or about the thing are true. Authenticating an object may mean confirming its provenance, whereas authenticating a person often consists of verifying her identity. Authentication depends upon one or more authentication factors.&lt;br /&gt;
In computer security, authentication is the process of attempting to verify the digital identity of the sender of a communication.  A common example of such a process is the logon process. Testing the authentication schema means understanding how the authentication process works and using that information to circumvent the authentication mechanism.&lt;br /&gt;
&lt;br /&gt;
[[Testing for credentials transport (OWASP-AT-001)|4.4.1 Credentials transport over an encrypted channel (OWASP-AT-001)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here, the tester will just try to understand if the data that users put into the web form, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not.  &lt;br /&gt;
&lt;br /&gt;
[[Testing for user enumeration  (OWASP-AT-002)|4.4.2 Testing for user enumeration (OWASP-AT-002)]]&amp;lt;br&amp;gt;&lt;br /&gt;
The scope of this test is to verify if it is possible to collect a set of valid users by interacting with the authentication mechanism of the application. This test will be useful for the brute force testing, in which we verify if, given a valid username, it is possible to find the corresponding password. &lt;br /&gt;
&lt;br /&gt;
[[Testing for Default or Guessable User Account (OWASP-AT-003)|4.4.3 Testing for Guessable (Dictionary) User Account (OWASP-AT-003)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here we test if there are default user accounts or guessable username/password combinations (dictionary testing).&lt;br /&gt;
&lt;br /&gt;
[[Testing for Brute Force (OWASP-AT-004)|4.4.4 Brute Force Testing (OWASP-AT-004)]]&amp;lt;br&amp;gt;&lt;br /&gt;
When a dictionary type attack fails, a tester can attempt to use brute force methods to gain authentication.  Brute force testing is not easy to accomplish for testers because of the time required and the possible lockout of the tester.&lt;br /&gt;
&lt;br /&gt;
[[Testing for Bypassing Authentication Schema (OWASP-AT-005)|4.4.5 Testing for bypassing authentication schema (OWASP-AT-005)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Other passive testing methods attempt to bypass the authentication schema by recognizing that not all of the application's resources are adequately protected.  The tester can access these resources without authentication.&lt;br /&gt;
&lt;br /&gt;
[[Testing for Vulnerable Remember Password and Pwd Reset  (OWASP-AT-006)|4.4.6 Testing for vulnerable remember &lt;br /&gt;
password and pwd reset (OWASP-AT-006)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here we test how the application manages the process of &amp;quot;password forgotten&amp;quot;. We also check whether the application allows the user to store the password in the browser (&amp;quot;remember password&amp;quot; function). &lt;br /&gt;
&lt;br /&gt;
[[Testing for Logout and Browser Cache Management  (OWASP-AT-007)|4.4.7 Testing for Logout and Browser Cache Management (OWASP-AT-007)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Here we check that the logout and caching functions are properly implemented.&lt;br /&gt;
&lt;br /&gt;
[[Testing for Captcha   (OWASP-AT-008)|4.4.8 Testing for CAPTCHA (OWASP-AT-008)]]&amp;lt;br&amp;gt;&lt;br /&gt;
CAPTCHA (&amp;quot;Completely Automated Public Turing test to tell Computers and Humans Apart&amp;quot;) is a type of challenge-response test used by many web applications to ensure that the response is not generated by a computer. CAPTCHA implementations are often vulnerable to various kinds of attacks even if the generated CAPTCHA is unbreakable. This section will help you to identify these kinds of attacks.&lt;br /&gt;
&lt;br /&gt;
[[Testing Multiple Factors Authentication (OWASP-AT-009)|4.4.9 Testing Multiple Factors Authentication (OWASP-AT-009)]]&amp;lt;br&amp;gt;&lt;br /&gt;
Multiple Factors Authentication means to test the following scenarios: One-time password (OTP) generator tokens, Crypto devices like USB tokens or smart cards, equipped with X.509 certificates, Random OTP sent via SMS, Personal information that only the legitimate user is supposed to know [OUTOFWALLET].&lt;br /&gt;
&lt;br /&gt;
[[Testing_for_Race_Conditions  (OWASP-AT-010)|4.4.10 Testing for Race Conditions (OWASP-AT-010)]]&amp;lt;br&amp;gt;&lt;br /&gt;
A race condition is a flaw that produces an unexpected result when timing of actions impact other actions. An example may be seen on a multithreaded application where actions are being performed on the same data. Race conditions, by their very nature, are difficult to test for.&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=92313</id>
		<title>User:Anant Shrivastava</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=92313"/>
				<updated>2010-11-03T20:52:10Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to my User Page.&lt;br /&gt;
&lt;br /&gt;
I also maintain a blog @ http://blog.anantshri.info&lt;br /&gt;
&lt;br /&gt;
Certifications : RHCE and CEH&lt;br /&gt;
&lt;br /&gt;
I work as a Server Admin on *nix Platform.&lt;br /&gt;
Interested in Ethical Hacking with focus on Web application Penetration Testing.&lt;br /&gt;
&lt;br /&gt;
My Experience could be summarized as listed below.&lt;br /&gt;
&lt;br /&gt;
*	Operating Systems	: Linux (RedHat/Fedora, Debian/Ubuntu), DOS, Windows(9X,XP,Vista)&lt;br /&gt;
*	Servers 		: HTTP (Apache, IIS, Tomcat), SMB, NFS, FTP, DNS.&lt;br /&gt;
*	Scripting		: Shell Scripting, Batch File Scripting, VB Scripting (VBA).&lt;br /&gt;
*	Web Development		: PHP, ASP (classic), HTML, XHTML, CSS (introductory), JSP, and JavaScript.&lt;br /&gt;
*	Programming 		: C/C++, VB 6.0, Java.&lt;br /&gt;
*	Database 		: MySQL, Oracle 10 g (introductory level)&lt;br /&gt;
*	VA / PT Tools 		: Wapiti, w3af&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't Learn to hack, Hack to learn.&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=92312</id>
		<title>User:Anant Shrivastava</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=User:Anant_Shrivastava&amp;diff=92312"/>
				<updated>2010-11-03T20:50:55Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: adding intro about myself&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to my User Page.&lt;br /&gt;
&lt;br /&gt;
RHCE and CEH&lt;br /&gt;
&lt;br /&gt;
I work as a Server Admin on *nix Platform.&lt;br /&gt;
Interested in Ethical Hacking with focus on Web application Penetration Testing.&lt;br /&gt;
&lt;br /&gt;
My Experience could be summarized as listed below.&lt;br /&gt;
&lt;br /&gt;
*	Operating Systems	: Linux (RedHat/Fedora, Debian/Ubuntu), DOS, Windows(9X,XP,Vista)&lt;br /&gt;
*	Servers 		: HTTP (Apache, IIS, Tomcat), SMB, NFS, FTP, DNS.&lt;br /&gt;
*	Scripting		: Shell Scripting, Batch File Scripting, VB Scripting (VBA).&lt;br /&gt;
*	Web Development		: PHP, ASP (classic), HTML, XHTML, CSS (introductory), JSP, and JavaScript.&lt;br /&gt;
*	Programming 		: C/C++, VB 6.0, Java.&lt;br /&gt;
*	Database 		: MySQL, Oracle 10 g (introductory level)&lt;br /&gt;
*	VA / PT Tools 		: Wapiti, w3af&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Don't Learn to hack, Hack to learn.&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	<entry>
		<id>https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=92307</id>
		<title>Testing for Credentials Transported over an Encrypted Channel (OTG-AUTHN-001)</title>
		<link rel="alternate" type="text/html" href="https://wiki.owasp.org/index.php?title=Testing_for_Credentials_Transported_over_an_Encrypted_Channel_(OTG-AUTHN-001)&amp;diff=92307"/>
				<updated>2010-11-03T20:02:25Z</updated>
		
		<summary type="html">&lt;p&gt;Anant Shrivastava: Undo revision 52833 by KirstenS (Talk) as the edit reversed the meaning.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Template:OWASP Testing Guide v3}}&lt;br /&gt;
&lt;br /&gt;
== Brief Summary ==&lt;br /&gt;
Testing for credentials transport means to verify that the user's authentication data are transferred via an encrypted channel to avoid being intercepted by malicious users. The analysis focuses simply on trying to understand if the data travels unencrypted from the web browser to the server, or if the web application takes the appropriate security measures using a protocol like HTTPS. The HTTPS protocol is built on TLS/SSL to encrypt the data that is transmitted and to ensure that user is being sent towards the desired site. Clearly, the fact that traffic is encrypted does not necessarily mean that it's completely safe. The security also depends on the encryption algorithm used and the robustness of the keys that the application is using, but this particular topic will not be addressed in this section. For a more detailed discussion on testing the safety of TLS/SSL channels you can refer to the chapter [[Testing for SSL-TLS  (OWASP-CM-001)|Testing for SSL-TLS]]. Here, the tester will just try to understand if the data that users put into web forms, for example, in order to log into a web site, are transmitted using secure protocols that protect them from an attacker or not. To do this we will consider various examples.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Description of the Issue == &lt;br /&gt;
Nowadays, the most common example of this issue is the login page of a web application. The tester should verify that user's credentials are transmitted via an encrypted channel. In order to log into a web site, usually, the user has to fill a simple form that transmits the inserted data with the POST method. What is less obvious is that this data can be passed using the HTTP protocol, that means in a non-secure way, or using HTTPS, which encrypts the data. To further complicate things, there is the possibility that the site has the login page accessible via HTTP (making us believe that the transmission is insecure), but then it actually sends data via HTTPS. This test is done to be sure that an attacker cannot retrieve sensitive information by simply sniffing the net with a sniffer tool. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Black Box testing and example ==&lt;br /&gt;
In the following examples we will use WebScarab in order to capture packet headers and to inspect them. You can use any web proxy that you prefer.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTP''' &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose that the login page presents a form with fields User, Pass, and the Submit button to authenticate and give access to the application. If we look at the header of our request with WebScarab, we get something like this:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST http://www.example.com/AuthenticationServlet HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/index.jsp&lt;br /&gt;
Cookie: JSESSIONID=LVrRRQQXgwyWpW7QMnS49vtW1yBdqn98CGlkP4jTvVCGdyPkmn3S!&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 64&lt;br /&gt;
&lt;br /&gt;
delegated_service=218&amp;amp;User=test&amp;amp;Pass=test&amp;amp;Submit=SUBMIT&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this example the tester can understand that the POST sends the data to the page ''www.example.com/AuthenticationServlet'' simply using HTTP. So, in this case, data are transmitted without encryption and a malicious user could read our username and password by simply sniffing the net with a tool like Wireshark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with POST method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
Suppose that our web application uses the HTTPS protocol to encrypt data we are sending (or at least for those relating to the authentication). In this case, trying to access the login page and to authenticate, the header of our POST request would be similar to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/cgi-bin/login.cgi HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/cgi-bin/login.cgi&lt;br /&gt;
Cookie: language=English; &lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 50&lt;br /&gt;
&lt;br /&gt;
Command=Login&amp;amp;User=test&amp;amp;Pass=test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that the request is addressed to&lt;br /&gt;
''www.example.com:443/cgi-bin/login.cgi'' using the HTTPS protocol.&lt;br /&gt;
This ensures that our data are sent through an encrypted channel and that they are not readable by other people. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: sending data with POST method via HTTPS on a page reachable via HTTP'''&lt;br /&gt;
&lt;br /&gt;
Now, suppose to have a web page reachable via HTTP and that then only data sent from the authentication form are shipped via HTTPS. This means that our data is transmitted in a secure way through encryption. This situation occurs, for example, when we are on a portal of a big company that offers various information and services publicly available, without identification, but which has also a private section accessible from the home page through a login. So when we try to login, the header of our request will look like the following example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST https://www.example.com:443/login.do HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Referer: http://www.example.com/homepage.do&lt;br /&gt;
Cookie: SERVTIMSESSIONID=s2JyLkvDJ9ZhX3yr5BJ3DFLkdphH0QNSJ3VQB6pLhjkW6F&lt;br /&gt;
Content-Type: application/x-www-form-urlencoded&lt;br /&gt;
Content-length: 45&lt;br /&gt;
&lt;br /&gt;
User=test&amp;amp;Pass=test&amp;amp;portal=ExamplePortal&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can see that our request is addressed to ''www.example.com:443/login.do'' using HTTPS. But if we have a look at the referer field in the header (the page from which we came), it is ''www.example.com/homepage.do'' and is accessible via simple HTTP. So, in this case, we have no lock inside our browser window that tells us that we are using a secure connection, but, in reality, we are sending data via HTTPS. This ensures us that no other people can read the data that we are sending.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Case study: Sending data with GET method through HTTPS'''&lt;br /&gt;
&lt;br /&gt;
In this last example, suppose that the application transfers data using the GET method. This method should never be used in a form that transmits sensitive data such as username and password, because they are displayed in clear in the URL and this entails a whole set of security issues. So this example is purely demonstrative, but, in reality, it is strongly suggested to use the POST method instead. This is because when the GET method is used, the URL that it requests is easily available from, for example, the server logs exposing your sensitive data to information leakage. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
GET https://www.example.com/success.html?user=test&amp;amp;pass=test HTTP/1.1&lt;br /&gt;
Host: www.example.com&lt;br /&gt;
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.14) Gecko/20080404&lt;br /&gt;
Accept: text/xml,application/xml,application/xhtml+xml,text/html&lt;br /&gt;
Accept-Language: it-it,it;q=0.8,en-us;q=0.5,en;q=0.3&lt;br /&gt;
Accept-Encoding: gzip,deflate&lt;br /&gt;
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&lt;br /&gt;
Keep-Alive: 300&lt;br /&gt;
Connection: keep-alive&lt;br /&gt;
Referer: https://www.example.com/form.html&lt;br /&gt;
If-Modified-Since: Mon, 30 Jun 2008 07:55:11 GMT&lt;br /&gt;
If-None-Match: &amp;quot;43a01-5b-4868915f&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can see that the data is transferred in clear text in the URL and not in the body of the message as before. But we must consider that TLS/SSL is a level 5 protocol, a lower level than HTTP, so the whole HTTP package  is still encrypted and the URL is unreadable to an attacker. It is not a good practice to use the GET method in these cases, because the information contained in the URL can be stored in many servers such as proxy and web servers, leaking the privacy of the user's credentials.&lt;br /&gt;
&lt;br /&gt;
== Gray Box testing and example == &lt;br /&gt;
Talk with the developers of the application and try to understand if they are aware of differences between HTTP and HTTPS protocols and why they should use the HTTPS for sensitive information transmissions.&amp;lt;br&amp;gt;&lt;br /&gt;
Then, check with them if HTTPS is used in every sensitive transmission, like those in login pages, to prevent unauthorized users to read the data.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
'''Whitepapers'''&amp;lt;br&amp;gt;&lt;br /&gt;
* HTTP/1.1: Security Considerations - http://www.w3.org/Protocols/rfc2616/rfc2616-sec15.html&amp;lt;br&amp;gt;&lt;br /&gt;
'''Tools'''&amp;lt;br&amp;gt;&lt;br /&gt;
* [[OWASP WebScarab Project|WebScarab]]&lt;/div&gt;</summary>
		<author><name>Anant Shrivastava</name></author>	</entry>

	</feed>