-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MSTG-NETWORK-1-4 Fix Network Security Testing on Android and iOS (by @NowSecure) #2042
Conversation
cpholguera
commented
Jan 25, 2022
- Both Android and iOS cover now MSTG-NETWORK-1, MSTG-NETWORK-2, MSTG-NETWORK-3, MSTG-NETWORK-4
- Some Tests were split to cover only one MASVS requirement.
- NEW: MSTG-NETWORK-1 on both Android and iOS!
- Fix Network Testing chapters structure and cohesion.
- Fix all network cross-chapter references and corrected some content location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many of them are simple accepts, a few of them are a bit more work :)
|
||
When running on Android 7.0 (API level 24) or higher, apps targeting those API levels will use a default Network Security Configuration that doesn't trust any user supplied CAs, reducing the possibility of MITM attacks by luring users to install malicious CAs. However, this protection can be bypassed by using a custom Network Security Configuration with a custom trust anchor indicating that the app will trust user supplied CAs. | ||
|
||
Use a decompiler (e.g. jadx or apktool) to confirm the target SDK version. After decoding the app you can look for the presence of `targetSDK` present in the file apktool.yml that was created in the output folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a decompiler (e.g. jadx or apktool) to confirm the target SDK version. After decoding the app you can look for the presence of `targetSDK` present in the file apktool.yml that was created in the output folder. | |
Use a decompiler (e.g. jadx or apktool) to confirm the target SDK version. After decoding the app you can look for the presence of `targetSDK` in the file apktool.yml that was created in the output folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apktool technically is a disassembler though, not a decompiler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was one block I simply moved around I didn't see that so thanks for telling! We have to change it. I assume it just want to say: unpack and check that value in the android manifest.
This is one of many cases where having a "Techniques" chapter we can refer back to will come handy. This way we don't have to explain that you need to unzip the APK, decode the Android Manifest..but you can achieve the same by ...blah blah We'd simply have "Checking a value from the Android Manifest" including all alternatives. And here we'd just say:
["Check that the value minsdk is ... in the Android Manifest"](linktotechniques#checking-a-value...)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely agree! In general, there are multiple locations where a link would be better than saying the same thing over and over again (e.g. Burp / ZAP)
I obviously meant to click 'Request changes' rather than 'Approve' :/ |
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
…int Identify Verification; fix Certificate Pinning in the Network Security Configuration
…ns in Android Developers;
…inning to 0x04f and bypass pinning to 0x05b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😅
|
||
When running on Android 7.0 (API level 24) or higher, apps targeting those API levels will use a default Network Security Configuration that doesn't trust any user supplied CAs, reducing the possibility of MITM attacks by luring users to install malicious CAs. However, this protection can be bypassed by using a custom Network Security Configuration with a custom trust anchor indicating that the app will trust user supplied CAs. | ||
|
||
Use a decompiler (e.g. jadx or apktool) to confirm the target SDK version. After decoding the app you can look for the presence of `targetSDK` present in the file apktool.yml that was created in the output folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely agree! In general, there are multiple locations where a link would be better than saying the same thing over and over again (e.g. Burp / ZAP)
|
||
For more information on this topic please consult the [blog post by NowSecure on ATS](https://www.nowsecure.com/blog/2017/08/31/security-analysts-guide-nsapptransportsecurity-nsallowsarbitraryloads-app-transport-security-ats-exceptions/ "A guide to ATS"). | ||
> **Apple Recommendation: Configure Exceptions Only When Needed; Prefer Server Fixes**: It’s always better to fix the server when faced with an ATS failure. Exceptions reduce the security of your app. Some also require justification when submitting an app to the App Store, as described in the next section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops! :D
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>
Co-authored-by: Jeroen Beckers <[email protected]>