<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Hafiz Abdul-aziz on Medium]]></title>
        <description><![CDATA[Stories by Hafiz Abdul-aziz on Medium]]></description>
        <link>https://medium.com/@hafiz-ng?source=rss-7b6a43b2f517------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*keVAVYpvw6L65isNhvRrxA@2x.jpeg</url>
            <title>Stories by Hafiz Abdul-aziz on Medium</title>
            <link>https://medium.com/@hafiz-ng?source=rss-7b6a43b2f517------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:12:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hafiz-ng/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Why Fintech Startups in Nigeria need to embrace Coordinated Vulnerability Disclosure]]></title>
            <link>https://medium.com/@hafiz-ng/why-fintech-startups-in-nigeria-need-to-embrace-coordinated-vulnerability-disclosure-af2b580cdec4?source=rss-7b6a43b2f517------2</link>
            <guid isPermaLink="false">https://medium.com/p/af2b580cdec4</guid>
            <dc:creator><![CDATA[Hafiz Abdul-aziz]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 08:56:01 GMT</pubDate>
            <atom:updated>2023-05-14T20:38:49.425Z</atom:updated>
            <content:encoded><![CDATA[<h4>Nigeria is aiming to be a dominant player in the Africa Fintech market as the economic potentials for Fintech in Nigeria is vast.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CU4wjtv6HGfmLA43WHbrcA.png" /><figcaption>Image created by — <a href="https://hafiz.ng/">Hafiz Abdulaziz</a></figcaption></figure><p>While there has been an uptick in the number of Fintech startups accessing funding and tackling the issue of payments by providing disruptive services in Nigeria and beyond, many face risk of potential data breaches that may affect their growth and even survival.</p><p>Due to the <a href="https://www.velmie.com/post/using-aws-and-microservices-to-build-online-banking-solution">microservices approach</a> adopted to building Fintech products and services, APIs are used as a method of communication between third parties and online banking systems. This also makes the API attack surface enormous and a prime target for attackers, because they expose application logic and sensitive data such as personal information (PII).</p><p>This report is 2-fold. First, it presents the findings I disclosed responsibly to various Fintech Startups and <a href="https://www.mondaq.com/nigeria/financial-services/1188262/payment-service-banks-psb-in-nigeria">Payment Service Banks (PSB)</a> in Nigeria during the period between Aug — Dec, 2022. Second, it substantiates why it is imperative to adopt a Coordinated Vulnerability Disclosure (CVD) approach in engaging external security researchers to safely report found vulnerabilities to your team in a responsible manner.</p><p>My testing methodology was based on the OWASP API Security Top 10. The <a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a> list is a document that highlights ten critical threats to API security and provides mitigation tactics to prevent them. However, this write-up will cover 5 of the most severe and common API-related vulnerabilities from the OWASP API Top 10 List. These include:</p><p><a href="https://github.com/OWASP/API-Security/blob/master/2019/en/src/0xa1-broken-object-level-authorization.md">API1:2019 — Broken Object Level Authorization</a></p><p><a href="https://apisecurity.io/encyclopedia/content/owasp/api1-broken-object-level-authorization.htm">API2:2019 — Broken Authentication</a></p><p><a href="https://apisecurity.io/encyclopedia/content/owasp/api3-excessive-data-exposure.htm">API3:2019 — Excessive Data Exposure</a></p><p><a href="https://apisecurity.io/encyclopedia/content/owasp/api4-lack-of-resources-and-rate-limiting.htm">API4:2019 — Lack of Resources and Rate Limiting</a></p><p><a href="https://apisecurity.io/encyclopedia/content/owasp/api5-broken-function-level-authorization.htm">API5:2019 — Broken Function Level Authorization</a></p><p><strong>DISCLAIMER</strong>: Sensitive and private PII data were concealed to ensure confidentiality. All relevant stakeholders were contacted about the existing vulnerabilities and followed ethical guidelines in remediating and releasing patch fixes.</p><h4>API1:2019 — Broken Object Level Authorization</h4><p>In this sub-section, I dig into details about Broken Object Level Authorization (BOLA) — The most common and the most severe API vulnerability as of today according to the <a href="https://owasp.org/www-project-api-security/">OWASP API Security Project</a>.</p><p>This attack is also known as IDOR (Insecure Direct Object Reference). 80% of apps I tested withing this period were susceptible to multiple IDORs and lacked proper authorization checks, allowing attackers to access the specified resource, take-over user accounts, obtain PII data for other users, escalate privileges and so on. As demonstrated in the case studies below, an attacker is able to exfiltrate PII, modify other customers records and even takeover customer accounts by exploiting this type of vulnerability.</p><h4><strong>Case 1: Multiple IDORs — Leading to PII Disclosure, Access Control Bypass, etc.</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*90wldahwFNvNyhQhaFoyaA.jpeg" /><figcaption>Multiple IDORs leading to access control bypass and PII disclosure</figcaption></figure><h4>Case 2: Multiple IDORs — Leading to Privilege Escalation, Account Takeover etc.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XRF7c9pdCcISOpysQBSVsQ.png" /><figcaption>Multiple IDORs leading to PII disclosure, Account Takeover etc</figcaption></figure><h4><strong>How to Prevent</strong></h4><p>IDOR is one of the most prevalent vulnerabilities in web applications. They can cause enormous harm to an organization when combined with other vulnerabilities like account takeover and privilege escalation. To prevent this type of vulnerabilities:</p><ul><li>Use an authorization mechanism to check if the logged-in user has access to perform the requested action on the record in every function that uses an input from the client to access a record in the database.</li><li>For a thorough IDOR detection, manual testing is necessary.</li></ul><h4>API2:2019 — Broken Authentication</h4><p>According to <a href="https://owasp.org/www-project-api-security/">OWASP API Security Top 10</a>, Broken User Authentication is the second most critical API security threat. Poorly implemented API authentication allows attackers to assume other users’ identities.</p><p>Attackers are notorious for compromising targets with weak authentication mechanisms, if not properly implemented puts customers at the risk of account take over. There are dozens of complaints from users of Nigerian Fintech products reporting compromise of their accounts. Such as this <a href="https://twitter.com/dnaijatechguy/status/1586809247395872769?s=20&amp;t=pckgYCS_r8Qvz8YIk9FMtQ">recent victim</a> expressing a compromise of his account.</p><h4>Case 1: Password Reset Vulnerability to Account Take over</h4><p>The password reset mechanism of a quite popular Nigerian Fintech product did not follow best practices to resetting a customer’s password. Ultimately, resulting to account take over vulnerabilities.</p><p>The developers of this product used the mobile number as the only means with which a customer could authenticate once the victim requests for a password reset. The password reset token was sent via SMS after initiating a password reset within the application. When clicked, displayed the message:</p><blockquote>“Your password has been reset! Please use your phone number as your password to login.”</blockquote><p>What this implies is that anyone who has requested for a password reset link in the past now has their mobile number as the password. An attacker with this knowledge could compromise any account that had initiated a password request with relative ease. The severity of this vulnerability was critical because the developers did not even let the users set their own passwords, no OTP is sent to the victim phone, and there is no Multi-Factor Authentication (MFA) to thwart this vulnerability.</p><p>Some of my contacts were victims of this vulnerability as I could have easily compromised an account using only a mobile number and assume their identity.</p><h4>Case 2: Password Reset Vulnerability to Account Take over</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cqLK3Fp07gyhyZdXzwii1Q.png" /></figure><p>Due to a Business Logic Flaw in a Popular Fintech solution provider, an attacker could take over a victim’s account with zero interaction from the victim using just their email address during the password reset flow. Business logic vulnerabilities are flaws in the design and implementation of an application that enables an attacker to elicit unintended behavior.</p><p>This was a critical finding, this Fintech product had more than 100,000 active users, most of which were school administrators across the country. This vulnerability posed them to the possibility of an attacker completely compromising their accounts and gaining access to Payroll, HRM, and other sensitive business data.</p><p>From recommendations in my vulnerability report, the product owners were able to re-produce and resolve this critical vulnerability and possibly saved their users from identity theft and financial loses.</p><h4><strong>How to prevent</strong></h4><p>According to <a href="https://apisecurity.io/encyclopedia/content/owasp/api2-broken-authentication.htm">api.security.io</a>, to protect against this type of attack:</p><ul><li>Check all possible ways to authenticate to all APIs.</li><li>APIs for password reset and one-time links also allow users to authenticate, and should be protected just as rigorously.</li><li>Use standard authentication, token generation, password storage, and multi-factor authentication (MFA).</li></ul><h4>API3:2019 — Excessive Data Exposure</h4><p>To test for this type of vulnerability, I had to reverse engineer API endpoints of the targets, as documentation was unavailable. Upon which I manually built my own collection of requests using <a href="https://www.postman.com/">Postman</a>. Then I began analyzing various API requests and responses to look for excessive data exposure that should not be returned to the user.</p><h4><strong>Case 1: Excessive Data Exposure leads to Account Takeover</strong></h4><p>Information such as mobile numbers, password reset token were exposed via the password reset endpoint of this Fintech Service Provider. Here is an extract from the endpoint:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VjgKmivBzPab41UaCOoI1w.jpeg" /><figcaption>Password Reset Endpoint Leaking Token in Body Response</figcaption></figure><p>Due to the improper sanitization of the password reset endpoint, the password reset token sent to the account owner after a password reset has been initiated, was disclosed in the response of the body. An attacker could takeover any arbitrary account using only the email account of the victim. This Nigerian tech startup launched in 2019 and has more than 50,000 active users.</p><h4><strong>Case 2: Mass Exposure of customer Verification ID, Mobile Numbers and Passport Photographs</strong></h4><p>Developers of a popular Fintech hardcoded secret keys to third party services within an Android APK. This application is quite popular with more than 100K+ downloads from their respective stores. These keys were active and sensitive endpoints gave access to mobile numbers and private data of victims.</p><p>Among the exposed data I uncovered were 65,000 mobile numbers, ID Cards (National Passport, Driver’s Licenses, NIMC) belonging to customers, and Personal Identifiable Information (PII).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*AbFN7xP2NG-k7aWcWj343g.jpeg" /><figcaption>Extract of active mobile numbers exfiltrated from vulnerable endpoint [Redacted]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*fyEy_Pz5Ba9GWItCdQel7w.png" /><figcaption>Verification Digital Photos of customers [Redacted]</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*o-Yfal0QTPV2I-3ECzg8KQ.png" /><figcaption>ID Cards of customers [Redacted]</figcaption></figure><h4>Case 3: Excessive Data Exposure potentially exposing millions of private data of users of financial services in Nigeria</h4><p>A Bank Verification Number (BVN) contains 11 digits. It is issued to all Nigerian bank clients and connected to their bank accounts across all Nigerian banks. It acts as a centralized Biometric identification system for the Nigerian banking industry. Therefore, it is imperative that all the parties involved in handling this information safeguard this information and keep it private.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b7UfJwlAY04AXl755i2Pkg.png" /><figcaption>Excessive Data Exposure of customer PII</figcaption></figure><p>A popular Fintech PSB, was exposing PII of its customers during the Know-Your-Customer (KYC) verification step. A BVN Enquiry endpoint used to verify the identity of a customer was disclosing PII of a victim in response body (See below). With this endpoint, an attacker can query the Biometric Identification servers and retrieve PII data of users financial service in Nigeria using just the BVN of a victim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQor3vfWMUFKhZLBPUaazw.png" /><figcaption>Excessive Data Exposure on BVN Enquiry Endpoint</figcaption></figure><p>Other noteworthy findings encountered as a result of excessive data exposure vulnerability were:</p><ul><li>Email verification bypass from OTP leakage in response body</li><li>Circumvention of weak 2-Factor authentication</li><li>Account takeover of arbitrary user’s account</li></ul><h4><strong>How to Prevent</strong></h4><ul><li>Determine what constitutes as sensitive information and filter such PII within responses from unauthorized users.</li><li>Seldom use of sensitive and Personal Identifiable Information when creating resource files. Adopt the use of UUID or cryptographic functions.</li><li>Never rely on the client to filter data!</li></ul><h4>API4:2019 — Lack of Resources and Rate Limiting</h4><p>More than 85% of Nigerian Fintech products which I tested during this period did not have any throttling or rate limit mechanism for sensitive endpoints. This was particularly concerning considering the fact that many Nigerian Fintech products still adopt to the use of 4-digit OTP tokens and PINs for user verification and identification which goes against best practice.</p><p>Without any active rate limiting and account lock-out mechanisms. Attackers could exploit this flaw to perform password bruteforce attacks, by-pass OTP tokens and ultimately compromised the victim’s account.</p><h4>Case 1: Weak OTP implementation and lack of Rate Limiting and leads to Account Takeover (Medium)</h4><p>A popular Fintech service provider adopted 4-digit OTP token during the Password Reset Flow and Email Verification process. This coupled with the inherent lack of rate-limiting and request throttling on sensitive endpoints led to account takeover and email verification by-pass vulnerabilities respectively.</p><p>Other noteworthy findings encountered as a result of lack of resources and rate limiting were:</p><ul><li>Bypass MFA or 2FA mechanisms.</li><li>Attackers can exploit this vulnerability to perform DDoS attacks.</li></ul><h4>How to Prevent</h4><p>Without adequate protection of these endpoints, a motivated attacker can brute-force these endpoints to achieve their end goal. To prevent these type of attack:</p><ul><li>Seldom use of 4-digit OTP — A good rule of thumb is to adopt the use of 6- digit OTP token instead.</li><li>Throttle clients when they make too many requests within a given timeframe. This would significantly increase the difficulty to perform password brute forcing and email bombing attacks or data exfiltration by bots.</li></ul><h4>API5:2019 — Broken Function Level Authorization (BFLA)</h4><p>Unlike <a href="#">Broken Object Level Authorization</a> (BOLA), this flaw refers specifically to when unauthorized users can access sensitive or restricted functions they should not have access to. A broken function-level authorization essentially refers to a permission BOLA. The impact of this type of vulnerability is also very severe. It can cause information leakage, getting free items, creating or deleting accounts and even full account takeover of all the accounts.</p><p>During my research, I encountered a few Nigerian Fintech products prone to BFLA issues.</p><h4>Case 1: Delete Next-of-Kin of any customer via IDOR vulnerability</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*glbRlLnJdqSlg4cXgIT0EA.jpeg" /><figcaption>BFLA vulnerability Proof of Concept (PoC)</figcaption></figure><h4>How to Prevent</h4><p>Best practices recommends that you have a good overall view of the user and group hierarchy of your organization so you can review and secure all API endpoints and the authorization flows and require explicit grant to specific roles and deny all access by default.</p><h4>Why the need for rapid adoption of Coordinated Vulnerability Disclosure?</h4><p>According to <a href="https://bugcrowd.com/">Bugcrowd </a>—</p><blockquote>“A vulnerability disclosure policy sets the rules of engagement for an ethical hacker to identify and submit information on security vulnerabilities.”</blockquote><p>The purpose of the CVD is to give security researchers clear guidelines for conducting vulnerability research and reporting to your organization.</p><p>From my research, I have observed that many Nigerian Fintech product owners are not prepared to receive and handle vulnerability reports from outside parties, such as the security research community. Many also lack the ability to perform their own vulnerability discovery within their development lifecycles as a result fall victims of cyber attacks and data breaches. To protect the fate of digital finance in Nigeria’s Fintech sector, it is necessary to implement and continuously maintain a holistic security program. The adoption of CVD, is one way to achieve this aim.</p><p><a href="https://bugcrowd.com/">BugCrowd</a> and CipherLaw created the Open Source <a href="https://github.com/bugcrowd/disclosure-policy">Vulnerability Disclosure Framework</a>. It was designed to quickly and smoothly prepare your organization to work with the independent security researcher community while reducing the legal risks to researchers and companies.</p><p>PS — If you want to start a security program or engage me for Penetration Testing services. Contact me via <a href="/service/mailto:hafiz0x01@gmail.com">Email</a> or <a href="https://twitter.com/hafiz__ng">Twitter</a>, with the subject heading <em>“Penetration Testing services”</em>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af2b580cdec4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beetlebug — A Vulnerable Android CTF App]]></title>
            <link>https://medium.com/@hafiz-ng/beetlebug-a-vulnerable-android-ctf-app-1eb980fa4697?source=rss-7b6a43b2f517------2</link>
            <guid isPermaLink="false">https://medium.com/p/1eb980fa4697</guid>
            <category><![CDATA[mobile-security]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Hafiz Abdul-aziz]]></dc:creator>
            <pubDate>Sat, 23 Apr 2022 07:17:06 GMT</pubDate>
            <atom:updated>2022-08-29T16:26:26.036Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beetlebug — A Vulnerable Android CTF App</h3><h4>Beetlebug is a beginner-friendly Capture the Flag Android application that aims to inspire interest in Mobile Application Security.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EBiXtB_3v96GwpcZ5J0aPg.png" /></figure><p>The following is a UX/UI Design Case Study describing how I designed <a href="https://github.com/hafiz-ng/beetlebug">Beetlebug</a>. An open source insecure Android application with CTF challenges built for Android Penetration Testers, Developers, and Mobile Security enthusiasts. Throughout this case study, I’ll be sharing my process and reasoning behind the design decisions I took to developing my very own CTF Android application.</p><h3>Goal</h3><p>My main goal was <strong>improving the overall User Experience</strong> for mobile CTF players and provide a platform for developers, penetration testers and mobile security enthusiasts to test their Android hacking skills.</p><h3>Understanding the current problems</h3><p>Being a mobile pen-tester and bug hunter myself. I struggled to finding critical bugs particularly in mobile applications. I decided to try my hands on existing Android hacking labs and CTF challenges. While using these labs, I couldn’t help but notice that some of these labs where obsolete, a few no longer had any community support (despite being open-source projects), others demonstrated how to find some critical bugs. However, they left a player struggling to keep track of their progress due to poor user experience within these apps.</p><h3>Knowing the competition</h3><p>I started using some common platforms like <a href="https://github.com/payatu/diva-android">DIVA</a> (Damn Vulnerable Android App), <a href="https://github.com/B3nac/InjuredAndroid">InjuredAndroid</a>, <a href="https://github.com/dineshshetty/Android-InsecureBankv2">InsecureBankv2</a>, <a href="https://github.com/satishpatnayak/AndroGoat">AndroGoat</a> etc. I tried to understand these products by solving all the labs &amp; CTF challenges and also reverse engineering these app using open-source tools like <a href="https://github.com/MobSF/Mobile-Security-Framework-MobSF">MobSF</a>, <a href="http://java-decompiler.github.io/">JD-GUI</a> and <a href="https://ibotpeaches.github.io/Apktool/">apktool</a>. My main objective here was to understand how these products implemented some of these common bugs found in Android applications, how they could be exploited by bad actors and ultimately proffer a CTF-style Android app that could better implement these vulnerabilities as close as possible to real-world bugs with a refined and better user experience.</p><h3>Understanding CTF player User Flow</h3><p>Some of my friends participate in mobile CTF challenges quite regularly and I always observe them while the solve and their journey through capturing flags.</p><p>A Mobile application CTF challenges requires a player to –</p><ol><li>Minimize the window</li><li>Hunt the Flag</li><li>Comeback and submit the flag</li></ol><p>In my opinion, the process where the player leaves the app and comes back within the app to solve the challenge needs some extra attention. CTF players should be able to keep track of the progress as the find flags within the App resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*qjsz1VU4UgC8799jxekdbw.png" /></figure><h4>Information Architecture</h4><p>I commenced my design process by defining an information architecture for Beetlebug. This enabled me to gain insight into the User Experience across the mobile app and the User Flow of the player.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*RTThvelOL_CH3XSaOMyncQ.png" /><figcaption>Information Architecture of Beetlebug</figcaption></figure><h4>Wireframing</h4><p>The heart of this product lies in <strong>Flags Overview</strong>. This is where the CTF player would spend most time, switching between challenges, solving those challenges by capturing the flags and and submitting the flags. Throughout the wireframing phase, I took continuous feedback from friends who regularly played CTF challenges and ended up with this final iteration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BMn4_2gAPzhH6ULpxmkmHw.png" /><figcaption>Low Fidelity Wireframes</figcaption></figure><p><strong>Home</strong></p><p>The Home Activity used the Recycler View and CardView component of the <a href="https://hafiz.ng/beetlebug/#">Google Material Design</a> library to display the challenges in a card list view to the player.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*DSZvmo02TSxviMtrPfWt4A.png" /><figcaption>Home Activity</figcaption></figure><p><strong>Flags Overview</strong></p><p>This section presented the CTF player with a general overview of their progress through out their journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*3KodwUp3-6tToaIj54xh_g.png" /><figcaption>Flags Overview Activity</figcaption></figure><p>I developed a custom progress bar to better illustrate a visual idea of their level towards completing a challenge.</p><h4>Final Product</h4><p>Beetlebug covers key areas of Mobile Application Security including Insecure Data Storage, Vulnerable WebViews, insecure IPC components etc. You can grab the package from the releases section of this <a href="https://github.com/hafiz-ng/beetlebug">Github</a> page to get started with the CTF.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1eb980fa4697" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>