{"id":1366,"date":"2021-06-28T07:16:04","date_gmt":"2021-06-28T07:16:04","guid":{"rendered":"https:\/\/www.codecrafttech.com\/resources\/?p=1366"},"modified":"2023-04-12T10:57:09","modified_gmt":"2023-04-12T10:57:09","slug":"security-checklist-ii","status":"publish","type":"post","link":"https:\/\/www.codecrafttech.com\/resources\/blogs\/security-checklist-ii.html","title":{"rendered":"Agile Methodology &#038; Security in Software Development 2"},"content":{"rendered":"<p>This is the second part of the Mobile App testing checklist series. The first part is presented <a title=\"Security Checklist I\" href=\"https:\/\/www.codecrafttech.com\/resources\/blogs\/security-checklist.html\">here<\/a>. Continuing the series, we present a checklist of test cases for some more categories.<\/p>\n<h2>Network Communication Requirements<\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1339 lazyload\" data-src=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Network-Communication-Requirements.jpeg\" alt=\"Network Communication Requirements\" width=\"1400\" height=\"700\" data-srcset=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Network-Communication-Requirements.jpeg 1400w, https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Network-Communication-Requirements-768x384.jpeg 768w\" data-sizes=\"(max-width: 1400px) 100vw, 1400px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1400px; --smush-placeholder-aspect-ratio: 1400\/700;\" \/><\/p>\n<p>Apps serve as the front end and frequently make network calls to backend systems. This interaction involves exchanging critical information like personal details, bank information. Communication with external systems, particularly over the WWW, requires that the data sent should be over a secure channel to prevent it from being compromised.<\/p>\n<h3>For Android and iOS<\/h3>\n<blockquote><p><em><strong>Verify All network traffic goes via SSL <\/strong><\/em><\/p>\n<p><em><strong>Verify SSL Pinning is enabled. <\/strong><\/em><\/p>\n<p><em>i.e. Using MITM tools like Charles, verify that the https traffic cannot be decrypted Platform Interaction Requirements<\/em><\/p><\/blockquote>\n<h2>Platform Interaction Requirements<\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1340 lazyload\" data-src=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Platform-Interaction-Requirements.jpeg\" alt=\"Platform Interaction Requirements\" width=\"1400\" height=\"700\" data-srcset=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Platform-Interaction-Requirements.jpeg 1400w, https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/06\/Platform-Interaction-Requirements-768x384.jpeg 768w\" data-sizes=\"(max-width: 1400px) 100vw, 1400px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1400px; --smush-placeholder-aspect-ratio: 1400\/700;\" \/><\/p>\n<p>Modern smartphones offer a bevy of features. Camera, location, Bluetooth, gyroscope, and many more. Apps that use any such feature have to ask for the user&#8217;s consent to use the same. It is necessary to verify if the user is prompted to wilfully permit the app to use any feature outside of itself.<\/p>\n<h3>For Android<\/h3>\n<blockquote>\n<ul>\n<li>Verify for dangerous permissions, for all the below permissions an explicit prompt should be displayed to the user<\/li>\n<li>READ_CALENDAR<\/li>\n<li>WRITE_CALENDAR<\/li>\n<li>READ_CALL_LOG<\/li>\n<li>WRITE_CALL_LOG<\/li>\n<li>PROCESS_OUTGOING_CALLS<\/li>\n<li>CAMERA<\/li>\n<li>READ_CONTACTS<\/li>\n<li>WRITE_CONTACTS<\/li>\n<li>GET_ACCOUNTS<\/li>\n<li>ACCESS_FINE_LOCATION<\/li>\n<li>ACCESS_COARSE_LOCATION<\/li>\n<li>RECORD_AUDIO<\/li>\n<li>READ_PHONE_STATE<\/li>\n<li>READ_PHONE_NUMBERS<\/li>\n<li>CALL_PHONE<\/li>\n<li>ANSWER_PHONE_CALLS<\/li>\n<li>ADD_VOICEMAIL<\/li>\n<li>USE_SIP<\/li>\n<li>BODY_SENSORS<\/li>\n<li>SEND_SMS<\/li>\n<li>RECEIVE_SMS<\/li>\n<li>READ_SMS<\/li>\n<li>RECEIVE_WAP_PUSH<\/li>\n<li>RECEIVE_MMS<\/li>\n<li>READ_EXTERNAL_STORAGE<\/li>\n<li>WRITE_EXTERNAL_STORAGE<\/li>\n<li>Verify unnecessary permission are not added in Android.manifest file<\/li>\n<li>Verify app authentication is required when using Deep Links in the app<\/li>\n<li>If webviews are displayed inside the app, ensure the url is https, and cannot be decrypted via Charles<\/li>\n<li>Disable local file access in Code. Check with the developer and see if these restrictions are in place.<\/li>\n<li>webView.getSettings().setAllowFileAccess(<strong>false<\/strong>);<\/li>\n<li>webView.getSettings().setAllowFileAccessFromFileURLs(<strong>false<\/strong>);<\/li>\n<li>webView.getSettings().setAllowUniversalAccessFromFileURLs(<strong>false<\/strong>);<\/li>\n<li>webView.getSettings().setAllowContentAccess(<strong>false<\/strong>);<\/li>\n<li>Verify that App can be force updated.<\/li>\n<\/ul>\n<\/blockquote>\n<h3>For iOS<\/h3>\n<blockquote>\n<ul>\n<li>Verify app ask user permissions for the following<\/li>\n<li>Bluetooth peripherals<\/li>\n<li>Calendar data<\/li>\n<li>Camera<\/li>\n<li>Contacts<\/li>\n<li>Health sharing<\/li>\n<li>Health updating<\/li>\n<li>HomeKit<\/li>\n<li>Location<\/li>\n<li>Microphone<\/li>\n<li>Motion Music and the media library<\/li>\n<li>Photos<\/li>\n<li>Reminders<\/li>\n<li>Siri<\/li>\n<li>Speech recognition<\/li>\n<li>the TV provider<\/li>\n<li>Verify app authentication is required when using Deep Links in the app<\/li>\n<li>Verify webviews only load https content. Check the code for <strong>WKWebView<\/strong> and verify the following flag <strong>&#8220;hasOnlySecureContent&#8221;<\/strong> is set to true<\/li>\n<li>Verify Webviews cannot be decrypted via Charles<\/li>\n<li>Verify Both <strong>allowFileAccessFromFileURLs<\/strong> and <strong>allowUniversalAccessFromFileURLs<\/strong> are set to <strong>&#8220;0&#8221;<\/strong>, on webviews are set. Check with developers<\/li>\n<li>Verify that App can be force updated.<\/li>\n<\/ul>\n<\/blockquote>\n<h2>Code Quality and Build setting requirements<\/h2>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1544 lazyload\" data-src=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/08\/Code-Quality-and-Build-setting-requirements.jpeg\" alt=\"\" width=\"1400\" height=\"700\" data-srcset=\"https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/08\/Code-Quality-and-Build-setting-requirements.jpeg 1400w, https:\/\/www.codecrafttech.com\/resources\/wp-content\/uploads\/2021\/08\/Code-Quality-and-Build-setting-requirements-768x384.jpeg 768w\" data-sizes=\"(max-width: 1400px) 100vw, 1400px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1400px; --smush-placeholder-aspect-ratio: 1400\/700;\" \/><\/p>\n<p>Apps have a minimum of two configurations; a debug version where the app is not yet optimized for release or customer use.<\/p>\n<p><strong>For example,<\/strong> logs would be enabled in the debug version to track bugs while developing. In the debug version, the app can get away with being slower and <strong>\u201cfatter\u201d<\/strong>. Apps also have a production version, meant for end-users. Here the app is <strong>\u201cthinned\u201d<\/strong> down for the target device on which the app is running. This version is optimized. So when it comes to the production version of the app, it is essential to test the build settings and other aspects used only for the debug version such that it does not leak into the production version.<\/p>\n<h3>For Android<\/h3>\n<blockquote>\n<ul>\n<li><strong>Verify APK<\/strong> is Signed correctly.<\/li>\n<li>Test using the following command,<\/li>\n<li>apksigner verify &#8211;verbose Desktop\/example.apk,<\/li>\n<\/ul>\n<blockquote class=\"spacing-tag\"><p>Following output should be displayed<\/p>\n<p><strong>for example,<\/strong><\/p>\n<p>Verified using v1 scheme (JAR signing): true<\/p>\n<p>Verified using v2 scheme (APK Signature Scheme v2): true<\/p>\n<p>Verified using v3 scheme (APK Signature Scheme v3): true<\/p>\n<p>Number of signers: 1<\/p><\/blockquote>\n<ul>\n<li>Verify the store build is generated as a <strong>&#8220;Release&#8221;<\/strong> build and not <strong>&#8220;Debug&#8221;<\/strong> build.<\/li>\n<li>Using apktool decompile apk and check <strong>AndroidManifest.xml, android:debuggable<\/strong> should false<\/li>\n<li>Verify <strong>APK is Obfuscated<\/strong> (<em>i.e, Proguard is enabled<\/em>) and no sensitive data is visible.Decompile the apk using apktool. Convert <strong>classes.dex to .jar<\/strong> using <strong>d2j-dextojar<\/strong>. View the <strong>jar file via JDGUI <\/strong><\/li>\n<li>Verify <strong>all debug logs are disabled<\/strong>. Run <strong>adb logcat<\/strong> and check if the <strong>apk is displaying any sensitive information<\/strong><\/li>\n<\/ul>\n<\/blockquote>\n<h3>For iOS<\/h3>\n<blockquote>\n<ul>\n<li>Check the <strong>ipa is Release Mode<\/strong> and <strong>not in Debug Mode<\/strong>. Use <strong>Xcode<\/strong> and Check if the <strong>app can be debugged<\/strong>.<\/li>\n<li><strong>Check all debug logs<\/strong> are <strong>disabled<\/strong> and <strong>no sensitive information is logged in Xcode <\/strong><\/li>\n<li>Verify <strong>&#8220;Strip Debug Symbols During Copy&#8221;<\/strong>, <strong>&#8220;Strip Linked Product&#8221;<\/strong>, <strong>&#8220;Strip Swift Symbols&#8221;<\/strong> are set to Yes in Xcode build settings<\/li>\n<li>Check for vulnerabilities in 3rd party Pods. Run <strong>OWASPs<\/strong> tool<\/li>\n<li><strong>dependency-check &#8211;enableExperimental &#8211;out . &#8211;scan Podfile.lock <\/strong><\/li>\n<li>Resiliency<\/li>\n<\/ul>\n<\/blockquote>\n<h3>For Android<\/h3>\n<blockquote>\n<ul>\n<li>Verify apk does not launch on rooted devices.<\/li>\n<li>Checksum of apks should be created and validated against the server every time it&#8217;s launched.<\/li>\n<\/ul>\n<\/blockquote>\n<h3>For iOS<\/h3>\n<blockquote>\n<ul>\n<li>Verify app does not launch on Jailbroken phones<\/li>\n<li>Obfuscate code with <strong>iXGuard<\/strong> and <strong>verify via MachoView tool<\/strong><\/li>\n<\/ul>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This is the second part of the Mobile App testing checklist series. The first part is presented here. Continuing the series, we present a checklist of test cases for some more categories. Network Communication Requirements Apps serve as the front end and frequently make network calls to backend systems. This interaction involves exchanging critical information [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1573,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_mo_disable_npp":"no","_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[22],"tags":[61],"class_list":["post-1366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blogs","tag-testing"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/posts\/1366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/comments?post=1366"}],"version-history":[{"count":16,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/posts\/1366\/revisions"}],"predecessor-version":[{"id":1674,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/posts\/1366\/revisions\/1674"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/media\/1573"}],"wp:attachment":[{"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/media?parent=1366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/categories?post=1366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codecrafttech.com\/resources\/wp-json\/wp\/v2\/tags?post=1366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}