<?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 Ahemd ashraf on Medium]]></title>
        <description><![CDATA[Stories by Ahemd ashraf on Medium]]></description>
        <link>https://medium.com/@apop69166?source=rss-95ae346e00c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*T5tqx5T0-P867KT9</url>
            <title>Stories by Ahemd ashraf on Medium</title>
            <link>https://medium.com/@apop69166?source=rss-95ae346e00c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 04:35:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apop69166/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[Android Static Analysis Pentesting Handbook — Part 2]]></title>
            <link>https://medium.com/@apop69166/android-static-analysis-pentesting-handbook-part-2-ae588cd3f661?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae588cd3f661</guid>
            <category><![CDATA[mobile-pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Tue, 27 Oct 2026 20:50:03 GMT</pubDate>
            <atom:updated>2026-10-27T20:50:03.570Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>بسم الله</blockquote><h3>Section 6 — Services</h3><h3>إيه اللي تفحصه</h3><ul><li>exported=&quot;true&quot; services، خصوصًا بدون android:permission</li><li>Bound Services (onBind()) vs Started Services (onStartCommand())</li><li>استخدام Binder مباشر أو Messenger أو AIDL (Android Interface Definition Language)</li><li>custom IPC implementations</li><li>Foreground services وnوعها (foregroundServiceType)</li><li>أي عملية حساسة بتتنفذ جوه الـservice (network calls, DB writes, file operations)</li></ul><h3>الفرق الجوهري بين الأنواع</h3><p>النوعإزاي بيتكلم عليهالخطر النموذجي<strong>Started Service</strong>startService()/startForegroundService() + onStartCommand() بياخد Intentلو exported، أي app يقدر يبعت Intent بـextras يتحكم بيها في سلوك حساس<strong>Bound Service (local Binder)</strong>bindService() بيرجع IBinderأخطر لو الـBinder بيكشف methods حساسة من غير access control<strong>AIDL Service</strong>واجهة formal للـIPC، بتولّد stub classesلازم تفحص كل method في الـ.aidl-generated interface — كل واحدة فيها ممكن تكون entry point<strong>Messenger</strong>queue-based IPC باستخدام Handlerأبسط من AIDL بس برضه بتحتاج تتأكد من validation على محتوى الـMessage</p><h3>إزاي تكتشف من الكود</h3><pre>public class SyncService extends Service {<br>    private final IBinder binder = new LocalBinder();</pre><pre>    public class LocalBinder extends Binder {<br>        SyncService getService() { return SyncService.this; }<br>    }</pre><pre>    // method حساسة متاحة لأي حد bound<br>    public void syncUserData(String userId, boolean forceAdmin) {<br>        if (forceAdmin) grantAdminAccess(userId); // لا يوجد تحقق!<br>        // ...<br>    }<br>}</pre><p><strong>Tracing:</strong> Manifest (service exported) → onBind()/onStartCommand() → الـmethods المتاحة عن طريق الـBinder → هل فيها authorization check على الـcaller (Binder.getCallingUid())؟</p><p><strong>False Positive vs Real Vulnerability:</strong> مجرد وجود AIDL/Binder exposed مش بالضرورة خطر — لازم تتأكد إن الـmethods الـsensitive فعلاً قابلة للاستدعاء من caller خارجي بدون تحقق من getCallingUid()/getCallingPackage().</p><p><strong>Impact:</strong> privilege escalation، data manipulation، أو DoS (لو الـservice ممكن تتوقف/تتفعّل بشكل متكرر من attacker).</p><p><strong>Dynamic Validation:</strong></p><pre>adb shell am startservice -n com.target.app/.SyncService --es userId &quot;victim&quot; --ez forceAdmin true</pre><p><strong>Fix:</strong> تحقق من Binder.getCallingUid() قبل تنفيذ أي عملية حساسة، أو خلي الـservice exported=&quot;false&quot; لو مفيش داعي فعلي يبقى متاح من برا.</p><p><strong>أخطاء شائعة:</strong> الـdevelopers بيفترضوا إن “محدش هيعرف اسم الـservice” (security through obscurity) — ده مش دفاع حقيقي، اسم الـclass واضح جدًا في الـManifest decompiled.</p><h3>Section 7 — Broadcast Receivers</h3><h3>إيه اللي تفحصه</h3><ul><li><strong>Static receivers</strong> (مُعرّفة في Manifest) vs <strong>Dynamic receivers</strong> (مُسجّلة بـregisterReceiver() في الكود — من Android 8+ أغلبها لازم تتسجل dynamically لـimplicit broadcasts)</li><li>exported=&quot;true&quot; بدون permission</li><li><strong>Protected broadcasts</strong> (زي android.intent.action.BOOT_COMPLETED) اللي بس الـsystem يقدر يبعتها — فرّق بينها وبين broadcasts عادية أي app يقدر يبعتها</li><li>أي extras بتتقرأ جوه onReceive()</li></ul><h3>Spoofed Broadcasts / Broadcast Injection</h3><p>لو الـreceiver exported وبيستقبل broadcast عادي (مش protected)، أي app تاني على الجهاز يقدر “يزوّر” نفس الـbroadcast:</p><pre>public class PaymentReceiver extends BroadcastReceiver {<br>    public void onReceive(Context context, Intent intent) {<br>        if (&quot;com.target.app.PAYMENT_CONFIRMED&quot;.equals(intent.getAction())) {<br>            String orderId = intent.getStringExtra(&quot;order_id&quot;);<br>            unlockPremiumContent(orderId); // بدون أي تحقق من مصدر الـbroadcast<br>        }<br>    }<br>}</pre><p><strong>استغلال:</strong></p><pre>adb shell am broadcast -a com.target.app.PAYMENT_CONFIRMED --es order_id &quot;fake123&quot;</pre><p>لو الـaction دي مش في قايمة الـ<a href="https://developer.android.com/guide/components/broadcast-exceptions">protected broadcasts</a> الرسمية من جوجل، أي تطبيق تالت — حتى من غير أي permissions — يقدر يبعتها.</p><h3>Tracing</h3><pre>Receiver (exported, action غير protected)<br> → onReceive(context, intent)<br> → intent.getAction() / intent.getExtras()<br> → Handler/sensitive function (بدون verification لمصدر البرودكاست)</pre><p><strong>False Positive:</strong> receiver بيستقبل broadcast من الـsystem نفسه (زي CONNECTIVITY_CHANGE) مش فيه خطر غالبًا لأنه بس بيقرأ state، مش بيغير حاجة حساسة.</p><p><strong>Fix:</strong> استخدم android:permission بـsignature level، أو تحقق يدويًا من getCallingPackage() حيث أمكن (ملحوظة: BroadcastReceivers مفيهاش caller identity مباشرة زي الـServices — الحل الأفضل هو custom permission بـprotectionLevel=&quot;signature&quot; أو LocalBroadcastManager/private broadcasts).</p><h3>Section 8 — Content Providers</h3><p>قسم مهم جدًا لأن الـProviders هي أوضح طريق رسمي لمشاركة الـdata بين التطبيقات — وأي ضعف فيها بيبقى مباشر.</p><h3>إيه اللي تفحصه</h3><ul><li>exported=&quot;true&quot; أو exported غير محدد (default يختلف حسب targetSdkVersion: لو targetSdkVersion ≥ 17 الـdefault false، لو أقل الـdefault true)</li><li>android:authorities</li><li>android:readPermission / android:writePermission / android:permission</li><li>&lt;path-permission&gt; جوه الـprovider لو في granular permissions لمسارات مختلفة</li><li>&lt;grant-uri-permission&gt;</li><li>الكود الفعلي لكل method: query(), insert(), update(), delete(), openFile(), openAssetFile()</li></ul><h3>أهم الثغرات وإزاي تكتشفها</h3><p><strong>SQL Injection عن طريق </strong><strong>query()</strong></p><pre>public Cursor query(Uri uri, String[] projection, String selection,<br>                     String[] selectionArgs, String sortOrder) {<br>    // خطر: الـselection بيتبنى concatenation من user input بدلاً من parameterized<br>    String query = &quot;SELECT * FROM users WHERE &quot; + selection;<br>    return db.rawQuery(query, null);<br>}</pre><p><strong>الفرق بين الآمن وغير الآمن:</strong> لو selection وselectionArgs بيتبعتوا منفصلين للـdb.query() العادي (مش rawQuery بـconcatenation)، فده الاستخدام الآمن. أما لو حصل string concatenation مباشر (خصوصًا في rawQuery)، فده SQL Injection حقيقي.</p><p><strong>Path Traversal عن طريق </strong><strong>openFile()</strong></p><pre>public ParcelFileDescriptor openFile(Uri uri, String mode) {<br>    String fileName = uri.getLastPathSegment();<br>    File file = new File(baseDir, fileName); // لا يوجد canonicalization check<br>    return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);<br>}</pre><p>لو fileName فيها ../../data/data/com.target.app/shared_prefs/auth.xml، ومفيش تحقق من إن الـresolved path لسه جوه baseDir (باستخدام getCanonicalPath() ومقارنته)، فده path traversal حقيقي بيسمح بقراءة ملفات حساسة.</p><p><strong>Unauthorized Data Access</strong> لو الـprovider exported بدون readPermission، أي app على الجهاز يقدر:</p><pre>adb shell content query --uri content://com.target.app.provider/users</pre><p>ويقرأ كل البيانات من غير أي auth check.</p><h3>False Positive vs Real Vulnerability</h3><p>مجرد وجود exported provider مش خطر لوحده لو:</p><ul><li>الـprovider مُصمم عمدًا يكون “public” (زي provider بيشارك صور مع apps تانية عن طريق FileProvider مع grant-uri-permission محدود ودقيق)</li><li>الـqueries كلها بتستخدم parameterized selectionArgs</li></ul><h3>Tracing</h3><pre>Provider (exported) → query()/insert()/update()/delete()/openFile()<br> → هل الـinput (uri segments, selection, selectionArgs) بيتعامل معاه raw؟<br> → sink: SQL query أو File I/O</pre><p><strong>Fix:</strong> استخدم parameterized queries دائمًا، واعمل canonical path validation لأي file access، وحدد readPermission/writePermission مناسبين، أو خلي الـprovider exported=&quot;false&quot; لو مش محتاج يتشارك مع apps تانية.</p><h3>Section 9 — Intent Analysis</h3><h3>المفاهيم الأساسية</h3><p>المصطلحالشرح<strong>Explicit Intent</strong>بيحدد الـtarget component بالاسم مباشرة (new Intent(this, TargetActivity.class)) — أأمن لأنه مش عرضة لـhijacking<strong>Implicit Intent</strong>بيحدد action/category/data بس، والنظام بيحدد مين يستقبلها — عرضة لاعتراض من أي app تاني مسجل نفس الـintent-filter<strong>Intent Extras</strong>key-value data بتتبعت مع الـIntent — المصدر الأساسي لمعظم الـIntent-based vulnerabilities<strong>Parcelable/Serializable</strong>طرق تمرير objects معقدة جوه الـIntent — <strong>خطر إضافي</strong>: لو الـapp بتعمل deserialize لـobject من extra بدون type-checking دقيق، ممكن تحصل ClassCastException تُستغل أو حتى type confusion attacks<strong>ClipData</strong>بيانات إضافية ممكن تترفق بالـIntent (خصوصًا لمشاركة URIs مع grant permissions)<strong>PendingIntent</strong>&quot;token&quot; بيمثل Intent هيتنفذ لاحقًا من طرف تاني (النظام أو app تاني) — تفاصيل كاملة في Section 33</p><h3>أنواع الهجمات</h3><p><strong>Intent Injection</strong> لما الـapp تاخد data جاية من مصدر غير موثوق (deep link, QR code, NFC, clipboard) وتستخدمها تبني Intent جديد وتشغله:</p><pre>String targetAction = getIntent().getStringExtra(&quot;next_action&quot;);<br>Intent next = new Intent(targetAction);<br>startActivity(next); // الـattacker يتحكم بالكامل في الـIntent الجاي</pre><p><strong>Intent Redirection</strong> حالة خاصة من الـInjection بيتم فيها توجيه الـflow لمكون داخلي حساس (زي AdminActivity) باستخدام الصلاحيات الموروثة من الـapp المُستغَلّة نفسها (confused deputy).</p><p><strong>Intent Spoofing</strong> إرسال Intent مزوّر لـcomponent (Activity/Service/Receiver) exported، بانتحال صفة الطرف الشرعي — راجع الأمثلة في Sections 5, 6, 7.</p><p><strong>Parameter Pollution</strong> إرسال extras إضافية أو غير متوقعة تغيّر سلوك الـapp بشكل غير مقصود من الـdeveloper (زي إضافة &quot;is_verified&quot;: true extra لو الكود بيتحقق منها بإهمال).</p><p><strong>Unsafe Intent Handling</strong> عدم التحقق من نوع الـextra قبل استخدامه:</p><pre>Serializable obj = intent.getSerializableExtra(&quot;data&quot;);<br>MyClass myObj = (MyClass) obj; // ClassCastException لو النوع مختلف، أو أسوأ لو في custom deserialization logic</pre><h3>كيف تفرّق بين Vulnerability حقيقية و”مجرد كود”</h3><p>السؤال الجوهري دايمًا: <strong>هل مصدر الـIntent/extra ده يمكن لـattacker التحكم فيه؟</strong> لو الـIntent جاي من:</p><ul><li>exported component → نعم، تحكم كامل</li><li>Deep link → نعم، تحكم كامل</li><li>WebView JS bridge → نعم غالبًا</li><li>internal navigation جوه نفس الـapp بس → عادة لأ (لكن تأكد مفيش طريق غير مباشر زي clipboard)</li></ul><h3>Section 10 — Deep Links / App Links</h3><h3>فين تدور</h3><p>جوه AndroidManifest.xml، كل &lt;intent-filter&gt; فيها:</p><pre>&lt;intent-filter android:autoVerify=&quot;true&quot;&gt;<br>    &lt;action android:name=&quot;android.intent.action.VIEW&quot; /&gt;<br>    &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;<br>    &lt;category android:name=&quot;android.intent.category.BROWSABLE&quot; /&gt;<br>    &lt;data android:scheme=&quot;https&quot;<br>          android:host=&quot;target.com&quot;<br>          android:pathPrefix=&quot;/reset-password&quot; /&gt;<br>&lt;/intent-filter&gt;</pre><h3>الفرق بين الأنواع</h3><p>النوعالتعريفملاحظة أمنية<strong>Custom URI Scheme</strong> (myapp://...)scheme مخصص للتطبيقأي app على الجهاز يقدر يسجل نفس الـscheme (لو مش App Link مُتحقق منه) ويعترض الـIntent<strong>Android App Links</strong> (https://target.com/... مع autoVerify=&quot;true&quot;)Deep links مرتبطة بـdomain فعلي، بيتم التحقق منها عن طريق assetlinks.json على السيرفرأأمن نسبيًا، لكن لو الـverification فشل (أو الملف مش مُهيّأ صح)، بيرجع يتصرف زي custom scheme عادي</p><h3>Tracing الكامل</h3><pre>Deep Link (scheme/host/path من Manifest)<br> → Activity المستهدفة (onCreate/onNewIntent)<br> → intent.getData()  → Uri parsing (getQueryParameter, getPathSegments)<br> → هل فيه Authentication check بعد الـparsing؟<br> → هل فيه Authorization check (هل اليوزر الحالي مسموحله بالـaction ده)؟<br> → Sensitive Operation (navigation لصفحة حساسة، تنفيذ API call، فتح WebView)</pre><h3>أمثلة ثغرات شائعة</h3><p><strong>Authentication Bypass عن طريق Deep Link</strong> لو target.com/reset-password?token=XYZ&amp;user_id=123 بتفتح Activity تعمل reset password مباشرة من غير ما تتأكد إن الـtoken فعلاً صالح أو مرتبط بالـuser_id:</p><pre>Uri data = getIntent().getData();<br>String token = data.getQueryParameter(&quot;token&quot;);<br>String userId = data.getQueryParameter(&quot;user_id&quot;);<br>resetPassword(userId, newPassword); // لاحظ: الـtoken مش بيتفحص أصلاً!</pre><p><strong>Open Redirect</strong></p><pre>String redirectUrl = data.getQueryParameter(&quot;redirect&quot;);<br>webView.loadUrl(redirectUrl); // بدون whitelist للـdomains المسموحة</pre><p><strong>WebView Abuse عن طريق Deep Link</strong> لو الـdeep link بيحمّل URL جوه WebView فيها addJavascriptInterface() مفعّلة، الـattacker يقدر يتحكم في محتوى الصفحة المحمّلة (لو مفيش HTTPS pinning/domain whitelist) ويوصل لـJS bridge.</p><p><strong>Account Takeover</strong> لو الـdeep link بتحتوي على session token أو auth code (زي OAuth callback)، وتم تسجيل نفس الـscheme من تطبيق تاني (custom scheme hijacking)، الـtoken ممكن يترسل لتطبيق attacker بدل التطبيق الأصلي.</p><h3>False Positive vs Real Vulnerability</h3><p>مجرد وجود deep link مش vulnerability — الخطر الحقيقي بيظهر لو:</p><ol><li>الـparameters من الـURI بتتستخدم مباشرة في sensitive operation</li><li>مفيش verification كافي (token validation, auth check, domain whitelist)</li><li>الـscheme custom (مش App Link مُتحقق) وبالتالي عرضة للـhijacking من apps تانية</li></ol><h3>Dynamic Validation</h3><pre>adb shell am start -W -a android.intent.action.VIEW \<br>  -d &quot;myapp://reset-password?token=test&amp;user_id=1&quot; com.target.app</pre><h3>Fix</h3><ul><li>استخدم <strong>Android App Links</strong> (مع autoVerify=&quot;true&quot; وassetlinks.json صحيح) بدل custom schemes لأي عملية حساسة</li><li>تحقق دائمًا من validity الـtoken/الـsession بعد الـparsing، مش قبلها</li><li>اعمل whitelist صارم لأي redirect URL</li><li>لا تمرر session tokens كـquery parameters في روابط ممكن تتسرب (browser history, logs, referrer headers)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae588cd3f661" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Email Change Validation Issue: Old Email Remains Usable After an Email Update]]></title>
            <link>https://medium.com/@apop69166/email-change-validation-issue-old-email-remains-usable-after-an-email-update-e2668bf374bc?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2668bf374bc</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 14:06:28 GMT</pubDate>
            <atom:updated>2026-10-25T14:06:28.503Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>During testing of an email change functionality, I observed a potential authentication and account-management issue in which the previous email address remained usable for sign-in after the account’s email address was changed.</p><p>After changing the account email address, authentication using both the previous and the new email address appeared to succeed.</p><p>This raises questions about how the application validates email changes, retires previous email addresses, and associates login identities with accounts.</p><h3>Steps to Reproduce</h3><ol><li>Sign in to an account you own or are authorized to test.</li><li>Navigate to the account settings page.</li><li>Change the account’s email address from the existing address to a new address.</li><li>Attempt to sign in using the previous email address.</li><li>Attempt to sign in using the new email address.</li><li>Record the results of both authentication attempts and verify whether they resolve to the same account.</li></ol><h3>Observed Behavior</h3><p>After the email change, sign-in using both the old and new email addresses appeared to succeed.</p><p>This suggests that the email change process may not be invalidating the previous login identifier as expected, or that the application may be maintaining multiple valid sign-in identifiers.</p><p>Further testing is needed to determine whether both addresses authenticate to the same account, whether the old address remains an alias, and whether email verification is required before the new address becomes active.</p><h3>Expected Behavior</h3><p>After an email address is changed, the application should enforce a clear and consistent identity-verification policy.</p><p>Depending on the intended account model, the application should ensure that:</p><ul><li>The new email address is verified before being treated as the account’s verified email.</li><li>The previous email address is no longer accepted as a login identifier if it is intended to be retired.</li><li>Login identifiers are consistently associated with the correct account.</li><li>Email changes are protected against unauthorized modification and identity confusion.</li></ul><h3>Potential Security Impact</h3><p>If the previous email address remains a valid login identifier after an email change, users and account owners may be confused about which address controls access to the account.</p><p>The security impact depends on the underlying authentication behavior. In particular, it is necessary to establish whether the old and new addresses authenticate to the same account and whether an unauthorized person can exploit this behavior.</p><p>Account takeover has not been established by the current reproduction steps alone.</p><h3>Recommended Remediation</h3><p>Review the email change and authentication flows to confirm that:</p><ol><li>Email ownership verification is enforced as required by the application’s security policy.</li><li>The account’s canonical email and accepted login identifiers are updated consistently.</li><li>Retired email addresses cannot continue authenticating unexpectedly.</li><li>Existing sessions and recovery mechanisms follow the intended security policy after an email change.</li><li>Regression tests cover sign-in, password recovery, email verification, and account identity association after email changes.</li></ol><h3>Conclusion</h3><p>The observed behavior indicates that the previous email address may remain usable for authentication after an email change. Further validation of account identity and verification behavior is required to determine the precise security impact and severity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2668bf374bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Redirect in Employer OAuth Flow via Backslash Validation Bypass]]></title>
            <link>https://medium.com/@apop69166/open-redirect-in-employer-oauth-flow-via-backslash-validation-bypass-0fe571e0d9cf?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fe571e0d9cf</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Sun, 25 Oct 2026 14:02:28 GMT</pubDate>
            <atom:updated>2026-10-25T14:02:28.326Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A client-side URL validation weakness that allows navigation away from a trusted Employer origin.</em></p><h3>Overview</h3><p>While reviewing the client-side OAuth redirect handling on site Employer, I identified a potential open redirect in the returnPath parameter of:</p><p><a href="https://au.employer.seek.com/oauth/redirect">https://au.employer.</a>example.com<a href="https://au.employer.seek.com/oauth/redirect">/oauth/redirect</a></p><p>The application attempts to block external destinations by rejecting values beginning with // and values matching a conventional scheme:// pattern. However, the validation does not adequately account for backslashes in URL paths.</p><p>A crafted value beginning with /\ bypassed the observed checks and caused Chrome to navigate away from the Employer origin.</p><p>The behavior was reproduced in a fresh, unauthenticated browser profile using a locally hosted HTTPS test server. The browser loaded a marker page from that local origin, confirming that the issue was not limited to a theoretical parsing discrepancy.</p><p><strong>Scope of demonstrated impact:</strong> external-origin navigation. Credential theft, account takeover, and OAuth token disclosure were not demonstrated.</p><h3>Affected Component</h3><ul><li><strong>Host:</strong> au.employer.example.com</li><li><strong>Route:</strong> /oauth/redirect</li><li><strong>Parameter:</strong> returnPath</li><li><strong>Component:</strong> Client-side OAuth redirect handling</li><li><strong>Client bundle:</strong> /static/oauth/main-ed5b7e9a5881f074f6af.js</li><li><strong>Observed application version:</strong> 7729</li></ul><p>Only the Australian host was directly tested. Other regional hosts appeared in the client configuration, but their exposure remains unverified.</p><h3>Technical Analysis</h3><h3>1. The Validation Logic</h3><p>The client-side query parser applies checks equivalent to:</p><pre>returnPath.startsWith(&quot;//&quot;) ||<br>/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(returnPath)</pre><p>Values matching either condition are replaced with /. Other strings are returned unchanged.</p><p>This approach relies on checking the input’s textual form rather than validating the destination after URL parsing.</p><h3>2. The Navigation Sink</h3><p>The redirect route retrieves the parsed returnPath and passes values beginning with / to a navigation function:</p><pre>tV(0 === e.indexOf(&quot;/&quot;) ? e : window.location.origin);</pre><p>The function calls:</p><pre>tV = e =&gt; {<br>  window.location.assign(e);<br>};</pre><p>The combination of incomplete validation and browser URL parsing creates the redirect behavior.</p><h3>3. The Backslash Bypass</h3><p>The following proof-of-concept URL was used during testing:</p><pre>https://au.employer.example.com/oauth/redirect?returnPath=/%5C127.0.0.1:8443/probe</pre><p>After query-string decoding, the parameter begins with /\. It does not match either of the observed rejection conditions, so it reaches the navigation sink.</p><p>For special URL schemes such as HTTPS, browsers treat backslashes as forward slashes in relevant URL-parsing contexts. Consequently, the destination can resolve to a different origin rather than remaining on the Employer host.</p><h3>Steps to Reproduce</h3><p>The following reproduction uses a local test server rather than a public attacker-controlled website.</p><ol><li>Start a local HTTPS test server on 127.0.0.1:8443.</li><li>Configure it to serve a simple HTML marker page at /probe and log incoming requests.</li><li>Open a fresh browser profile without signing in to Employer.</li><li>Visit:</li></ol><ul><li><a href="https://au.employer.seek.com/oauth/redirect?returnPath=/%5C127.0.0.1:8443/probe">https://au.employer.</a>example.com<a href="https://au.employer.seek.com/oauth/redirect?returnPath=/%5C127.0.0.1:8443/probe">/oauth/redirect?returnPath=/%5C127.0.0.1:8443/probe</a></li></ul><ol><li>Observe that the browser navigates to the local test origin and loads the marker page.</li><li>Verify that the browser’s rendered DOM contains the marker text and that the local server logs a request for /probe.</li><li>Compare the result with:</li></ol><ul><li><a href="https://au.employer.seek.com/oauth/redirect?returnPath=//127.0.0.1:8443/probe">https://au.employer.</a>example.com<a href="https://au.employer.seek.com/oauth/redirect?returnPath=//127.0.0.1:8443/probe">/oauth/redirect?returnPath=//127.0.0.1:8443/probe</a></li></ul><ol><li>In the recorded control test, this alternative remained on the application.</li></ol><h3>Observed Results</h3><p>The successful test produced a marker page with the title:</p><p>example-OPEN-REDIRECT-POC-OK</p><p>Its body contained:</p><p>attacker-origin-loaded</p><p>The local server recorded requests for /probe and /favicon.ico. The browser&#39;s dumped DOM contained the marker page rather than the wxample application shell.</p><p>The control test using the // prefix stayed on example, supporting the conclusion that the backslash-based input bypassed the validation applied to that form.</p><p>The local test server used a self-signed certificate, so Chrome was launched with --ignore-certificate-errors for this controlled test only.</p><h3>Why This Matters</h3><p>Open redirects can undermine trust in legitimate links. An attacker may create a URL that begins with a trusted domain but ultimately sends a user to an external destination.</p><p>In a phishing scenario, this behavior could make a malicious destination appear more credible because the initial link uses the legitimate Employer domain.</p><p>The demonstrated result is external navigation. The following impacts were not established:</p><ul><li>Credential capture or theft.</li><li>Session theft or account takeover.</li><li>OAuth authorization-code or access-token disclosure.</li><li>Vulnerability on other regional Employer hosts.</li></ul><p>The severity of the issue depends on the program’s assessment of the redirect behavior and its practical impact.</p><h3>Recommended Remediation</h3><p>Avoid relying on a string-based denylist to determine whether a redirect destination is safe.</p><p>If the application only intends to allow same-origin destinations, parse the candidate URL and explicitly compare its origin with the current origin:</p><pre>function getSafeReturnPath(returnPath) {<br>  try {<br>    const destination = new URL(<br>      returnPath,<br>      window.location.origin<br>    );</pre><pre>    if (destination.origin !== window.location.origin) {<br>      return &quot;/&quot;;<br>    }</pre><pre>    return (<br>      destination.pathname +<br>      destination.search +<br>      destination.hash<br>    );<br>  } catch {<br>    return &quot;/&quot;;<br>  }<br>}</pre><p>Additional recommendations:</p><ul><li>Prefer an allowlist of valid internal paths when practical.</li><li>Reject or normalize backslashes and control characters before processing return paths.</li><li>Apply consistent validation across relevant login, logout, and OAuth return flows.</li><li>Add regression tests for protocol-relative URLs, backslash-based inputs, encoded characters, and malformed destinations.</li></ul><p>The goal is to validate the final resolved destination, not just the original string.</p><h3>Limitations</h3><p>This investigation directly tested only au.employer.example.cpm. The redirect was reproduced without authentication, using a local HTTPS test server as the destination.</p><p>No credentials, customer data, or OAuth tokens were collected. No authenticated actions were performed. Other regional hosts and post-authentication behavior were not independently tested.</p><h3>Conclusion</h3><p>The returnPath handling on the tested Employer OAuth route contains a client-side validation weakness that allows a backslash-based value to bypass the observed checks and trigger navigation to another origin.</p><p>The reproduction demonstrates actual browser navigation and loading of a marker page, rather than merely inferring exploitability from source code.</p><p>The appropriate fix is to validate the resolved destination against an explicit same-origin policy or a strict allowlist of permitted internal paths.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0fe571e0d9cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Static Analysis Pentesting Handbook — Part 1]]></title>
            <link>https://medium.com/@apop69166/android-static-analysis-pentesting-handbook-part-1-f7a1f4132c17?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7a1f4132c17</guid>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[androidhacking]]></category>
            <category><![CDATA[static-analysis]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Sun, 11 Oct 2026 20:53:25 GMT</pubDate>
            <atom:updated>2026-10-11T20:53:25.042Z</atom:updated>
            <content:encoded><![CDATA[<h3>Section 1 — APK Anatomy: ابدأ من الصفر</h3><p>أي APK هو في الأساس ZIP archive، وكل جزء فيه بيمثل سطح هجوم مختلف. قبل ما تفتح JADX، لازم تفهم كل component بيعمل إيه ووظيفته الأمنية.</p><h3>1.1 AndroidManifest.xml</h3><p><strong>إيه هو؟</strong> ملف binary XML (مش نص عادي، لازم decode) هو الـentry point اللي بيوصف للـAndroid OS: الـcomponents، الـpermissions، الـmin/target SDK، والـintent-filters اللي بتحدد إزاي التطبيق بيتفاعل مع برا.</p><p><strong>ليه مهم في الـPentesting؟</strong> ده أهم ملف في الـStatic Analysis كله، لأنه بيحدد الـ<strong>attack surface</strong> الخارجي للتطبيق: أي component ممكن app تاني (أو حتى attacker عنده physical access) يوصله.</p><p><strong>فين أدور عليه؟</strong> root الـAPK مباشرة، بعد فك الـAPK بـapktool d app.apk بيطلعلك كـ readable XML.</p><p><strong>أدور على إيه بالظبط؟</strong></p><ul><li>android:exported=&quot;true&quot; على أي component</li><li>android:debuggable</li><li>android:allowBackup</li><li>uses-permission خصوصًا الـdangerous ones</li><li>intent-filter داخل كل component</li><li>android:usesCleartextTraffic</li><li>android:networkSecurityConfig</li></ul><p><strong>إزاي أعرف إنه suspicious؟</strong> لو لقيت component (Activity/Service/Receiver/Provider) معمولها exported=&quot;true&quot; بدون android:permission محدد، أو intent-filter موجود بدون explicit export=false — ده بيبقى محتاج فحص فوري، لأن معناه إن أي تطبيق تاني على نفس الجهاز يقدر يكلمه.</p><p><strong>False Positive vs Real Vulnerability:</strong> مجرد وجود exported=&quot;true&quot; مش vulnerability لوحدها — ده بس بيوسع الـattack surface. الـvulnerability الحقيقية بتظهر لما تتبع الكود جوه الـcomponent وتلاقي إنه بينفذ sensitive action (زي DB write، file read، privilege change) من غير أي validation على الـcaller أو على الـinput الجاي من الـIntent.</p><p><strong>Tracing:</strong> Manifest (exported component) → onCreate/onReceive/onBind → هل في auth check؟ → إيه مصدر الـdata (extras)؟ → بتتحط فين (DB, file, API call)؟</p><p><strong>Impact:</strong> يختلف حسب الـcomponent — من information disclosure لحد full account takeover.</p><p><strong>Dynamic Validation:</strong> استخدم adb shell am start -n package/.Activity أو am broadcast أو am startservice لمحاولة استدعاء الـcomponent من برا، وشوف لو فعلاً بينفذ.</p><p><strong>Safe Exploitation (Lab only):</strong> اعمل companion app صغير يبعت الـIntent المطلوب ويشوف النتيجة.</p><p><strong>Fix:</strong> حط exported=&quot;false&quot; لو مفيش داعي فعلي للـcomponent يكون متاح من برا، أو زوّد android:permission بـ signature-level permission.</p><p><strong>أخطاء شائعة من الـdevelopers:</strong></p><ul><li>بينسوا إن إضافة intent-filter بتخلي الـcomponent exported تلقائيًا (في الـAPIs القديمة) حتى لو محطوش exported=&quot;true&quot; يدويًا.</li><li>بيحطوا exported=&quot;true&quot; عشان deep link واحد، وده بيفتح باقي الـcomponent للعالم كله.</li></ul><p><strong>Advanced Cases:</strong></p><ul><li>من Android 12 (API 31)، exported بقى attribute إجباري لو في intent-filter — ده بيقلل الغموض لكن برضه لازم تتأكد الـdevelopers حطوه صح.</li><li>في apps بتستخدم multiple manifests (product flavors)، ممكن الـmerged manifest يختلف عن اللي شايفه في المصدر — استخدم apktool أو aapt dump xmltree على الـAPK النهائي مش على الـsource.</li></ul><h3>1.2 classes.dex / classes2.dex / Multidex</h3><p><strong>إيه هو؟</strong> الـDEX (Dalvik Executable) هو bytecode المُجمّع من Java/Kotlin اللي بيشتغل عليه الـART runtime. لو عدد الـmethods تجاوز الـ64K limit، بيتقسم لملفات متعددة (classes2.dex, classes3.dex...) — ده اسمه Multidex.</p><p><strong>ليه مهم؟</strong> هنا الـbusiness logic كله، الـauthentication، الـcrypto، والـsecrets المحتملة. ده الهدف الرئيسي للـdecompilation بـJADX.</p><p><strong>أدور على إيه؟</strong> افتح كل الـdex files في JADX (بيدمجهم تلقائيًا)، وركّز على packages بتاعت الشركة نفسها (مش الـlibraries الجاهزة زي com.google.* أو androidx.*).</p><p><strong>Suspicious indicators:</strong> لو JADX معلّم classes كتير بـ// failed to decompile ده معناه obfuscation قوي أو anti-decompilation tricks — محتاج smali analysis.</p><p><strong>False Positive:</strong> library class بيستخدم reflection عادي مش بالضرورة obfuscation متعمدة.</p><p><strong>Tracing:</strong> استخدم “Find Usage” و”Call Hierarchy” في JADX للـtrace من أي method مشبوهة لمصدرها ولمستخدميها.</p><h3>1.3 resources.arsc</h3><p><strong>إيه هو؟</strong> Binary file فيه كل الـresource mappings (strings, dimensions, styles, IDs) اللي بـres/ بيشاوروا عليها.</p><p><strong>ليه مهم؟</strong> أحيانًا بيحتوي على hardcoded strings زي base URLs أو feature flags اللي مش واضحة في الكود مباشرة.</p><p><strong>أدور على إيه؟</strong> استخدم aapt dump resources app.apk أو JADX بيعرضها تلقائيًا تحت resources.</p><h3>1.4 res/</h3><p><strong>إيه هو؟</strong> مجلد الـresources (layouts, drawables, values, xml configs).</p><p><strong>أهم ملف جوه من منظور أمني:</strong></p><ul><li>res/xml/network_security_config.xml — بيحدد certificate pinning، cleartext traffic لكل domain.</li><li>res/values/strings.xml — ممكن يحتوي API keys أو URLs hardcoded.</li><li>res/xml/*.xml (backup rules, data extraction rules) — بتحدد إيه اللي بيتعمله backup.</li></ul><p><strong>إزاي أعرف إنه vulnerability؟</strong> لو network_security_config.xml فيه &lt;trust-anchors&gt;&lt;certificates src=&quot;user&quot;/&gt; ده معناه التطبيق بيثق بشهادات المستخدم اليدوية — ده بيسهّل MITM مع Burp/mitmproxy حتى لو مفيش root (في بعض الحالات).</p><h3>1.5 assets/</h3><p><strong>إيه هو؟</strong> ملفات raw بتتحط زي ما هي من غير compilation — ممكن تكون: config files, JSON, certificates, native libs إضافية، حتى encrypted payloads أو secondary DEX files (في بعض الـpacking/protection schemes).</p><p><strong>أدور على إيه؟</strong> grep -r على كل ملفات الـassets بحثًا عن URLs, keys, JSON configs فيها endpoints.</p><p><strong>Advanced:</strong> بعض الـapps بتحط DEX files مشفرة جوه assets وتفك تشفيرها runtime (custom packers) — لو لقيت binary blob غريب الحجم كبير جوه assets من غير امتداد واضح، ده إشارة محتملة لـpacking.</p><h3>1.6 lib/</h3><p><strong>إيه هو؟</strong> الـnative libraries (.so files) مقسمة حسب الـABI: arm64-v8a/, armeabi-v7a/, x86/, x86_64/.</p><p><strong>ليه مهم؟</strong> كتير من الـsecurity logic الحساسة (crypto, anti-tampering, root detection) بتتحط هنا عشان تصعّب الـreverse engineering.</p><p><strong>تفاصيل إضافية في Section 19 (Native Libraries).</strong></p><h3>1.7 META-INF/</h3><p><strong>إيه هو؟</strong> فيه الـsignature files (MANIFEST.MF, CERT.SF, CERT.RSA/DSA/EC) اللي بتثبت integrity وتوقيع الـAPK.</p><p><strong>ليه مهم؟</strong> بتستخدمه تتحقق من هوية الموقّع (keytool -printcert أو apksigner verify --print-certs)، وده مفيد لو بتقارن نسخة الـAPK الرسمية بنسخة modified (tampering detection, repackaging attacks).</p><h3>1.8 Kotlin Metadata</h3><p><strong>إيه هو؟</strong> الـKotlin compiler بيحط annotation (@Metadata) على كل class فيها معلومات عن الـoriginal Kotlin signatures (null-safety, data classes, default params) حتى بعد الـcompilation لـJVM bytecode.</p><p><strong>ليه مهم؟</strong> JADX بيستخدمها يرجّع كود Kotlin شبه الأصلي بدل Java الخام، وده بيوضحلك data classes اللي ممكن تبين structure الـAPI responses/requests (مفيد لـAPI Recon — Section 17).</p><h3>1.9 Protobuf Files</h3><p><strong>إيه هو؟</strong> لو التطبيق بيستخدم gRPC أو Protocol Buffers بدل JSON، هتلاقي .proto schemas أو generated classes (زي *OuterClass.java).</p><p><strong>ليه مهم؟</strong> دي بتوضحلك structure الـAPI بالكامل (fields, types) حتى لو الـtraffic نفسه binary وصعب تقرأه مباشرة من Burp — تقدر تستخدم الـschema تعمل decode للـtraffic لاحقًا.</p><h3>1.10 JSON/XML Configuration Files</h3><p>ممكن تلاقيها جوه assets/ أو res/raw/ — فيها feature flags, remote config defaults, API endpoints. دايمًا افحصها بـjq أو grep.</p><h3>1.11 Native Libraries (تفصيل إضافي) — راجع Section 19</h3><h3>1.12 Certificates/Signatures</h3><p>غير الـMETA-INF، ممكن تلاقي certificates إضافية (pinned certs) جوه res/raw/ أو assets/ لو التطبيق بيعمل manual certificate pinning — دي مهمة جدًا لو بتحاول تعمل bypass لـpinning (Section 16).</p><h3>Section 2 — Workflow لل Static Analysis</h3><p>الـworkflow مش خطوات تتعمل مرة واحدة وتخلص — هو <strong>loop</strong> بترجع فيه كل ما تكتشف حاجة جديدة. ده التسلسل العملي:</p><pre>APK<br> → 1. Identification        (package name, version, min/target SDK, signing info)<br> → 2. Unpacking              (apktool + جداً مهم jadx لـ source view)<br> → 3. Manifest Analysis       (attack surface mapping الأول)<br> → 4. DEX Analysis             (decompile, package structure)<br> → 5. Code Search               (keywords, patterns)<br> → 6. Architecture Understanding (MVVM/MVP? Dependency Injection? Networking layer?)<br> → 7. Data Flow Analysis          (source → sink tracing)<br> → 8. Attack Surface Mapping       (exported components + deep links + APIs)<br> → 9. Vulnerability Hunting          (تطبيق الـchecklist بتاعة كل section)<br> → 10. Native Analysis                 (lib/*.so في Ghidra لو موجود)<br> → 11. Secrets Analysis                  (grep/ripgrep + entropy tools)<br> → 12. Cross-reference                     (ربط كل الملاحظات ببعض)<br> → 13. Dynamic Validation                    (Frida/objection/adb/Burp)<br> → 14. Exploitability Assessment               (PoC داخل Lab)<br> → 15. Report</pre><h3>تفصيل كل مرحلة</h3><p><strong>1. Identification</strong></p><pre>aapt dump badging app.apk | grep -E &quot;package|sdkVersion|targetSdkVersion&quot;<br>apksigner verify --print-certs app.apk</pre><p>ده بيديك فكرة أولية: هل الـapp debug build ولا production؟ هل min SDK قديم (يعني بيدعم أجهزة من غير حمايات حديثة زي scoped storage)؟</p><p><strong>2. Unpacking</strong></p><pre>apktool d app.apk -o app_apktool      # لـ resources + manifest + smali<br>jadx -d app_jadx app.apk               # لـ Java-like source</pre><p>استخدم الاتنين مع بعض — apktool أدق في الـresources والـmanifest، JADX أسهل تقرأ بيه الكود.</p><p><strong>3. Manifest Analysis (أول حاجة فعلية)</strong> ابدأ دايمًا بالـManifest قبل الكود — ده بيديك الـmap اللي هتمشي عليها. اعمل جدول بكل exported component وحط جنبه: نوعه، permission المطلوب (لو موجود)، intent-filter.</p><p><strong>4. DEX Analysis</strong> افتح الـproject في JADX-GUI، وابص على structure الـpackages — فرّق بين كود الشركة نفسها وبين third-party libraries.</p><p><strong>5. Code Search</strong> استخدم ripgrep على الـsource المُستخرج:</p><pre>rg -n &quot;exec\(|Runtime\.getRuntime|ProcessBuilder&quot; app_jadx/<br>rg -n &quot;AES|DES|ECB|MD5|SHA1\b&quot; app_jadx/</pre><p><strong>6. Architecture Understanding</strong> حدد: بيستخدم Retrofit/OkHttp؟ في Dependency Injection (Dagger/Hilt)؟ فيه repository pattern؟ ده بيسهّل عليك تلاقي الـnetworking layer بسرعة بدل ما تدور عشوائي.</p><p><strong>7. Data Flow Analysis</strong> دي أهم مرحلة فعليًا — خد أي Source (Intent extra, deep link param, WebView input) واعمل tracing لحد ما توصل لـSink (SQL query, file write, network call). تفاصيل أكتر في Section 39.</p><p><strong>8. Attack Surface Mapping</strong> اجمع: exported components + deep link schemes + API endpoints المستخرجة + WebView loaded URLs. ده الـfinal map اللي هتختبر عليها.</p><p><strong>9. Vulnerability Hunting</strong> طبّق الـchecklist (Section 40) بندًا بند على كل جزء من الـmap.</p><p><strong>10. Native Analysis</strong> لو في .so files، حملها على Ghidra وابدأ بـstrings وexported functions الأول قبل ما تغوص في الـdisassembly.</p><p><strong>11. Secrets Analysis</strong></p><pre>rg -n &quot;api[_-]?key|secret|token|AIza|AKIA&quot; app_jadx/ app_apktool/</pre><p>استخدم أدوات زي trufflehog أو apkleaks لو متاحة، لكن افهم دايمًا إن الـhigh entropy strings محتاجة manual verification.</p><p><strong>12. Cross-reference</strong> دلوقتي اربط: الـsecret اللي لقيته جوه الكود — هل بيتستخدم في API call فعلي؟ الـexported Activity اللي لقيتها — هل بتاخد extras بتتحط في query بدون sanitization؟</p><p><strong>13. Dynamic Validation</strong> ركّب الـAPK على emulator/device، استخدم Frida/objection تتحقق من كل hypothesis statically built.</p><p><strong>14. Exploitability Assessment</strong> اعمل PoC فعلي (companion app أو Frida script) يثبت الـimpact الحقيقي.</p><p><strong>15. Report</strong> حوّل كل finding لـformat احترافي (تفاصيل كاملة في Section 49).</p><h3>Section 3 — الأدوات</h3><p>الأداةتستخدمها في إيهمتى تستخدمهابتدور على إيهLimitationsالبديل<strong>JADX / JADX-GUI</strong>Decompile DEX → Java-like source، تصفح الكلاسات، Find Usage، Call Hierarchyأول أداة تفتحها بعد الـManifestأي method/class بالاسم أو keywordبيفشل أحيانًا مع heavy obfuscation أو custom bytecode tricks — بيرجع “failed to decompile”baksmali/smali للرجوع للـbytecode الخام<strong>apktool</strong>فك الـresources + manifest + smali، وإعادة التجميع (rebuild)لما تحتاج تعدل الـAPK وتعيد بناءه (مثلاً لإزالة root detection وعمل resign) أو عشان manifest أدق من JADXAndroidManifest.xml decoded, smali filesمش بيعمل decompile لـJava، بس smaliJADX للقراءة، apktool للتعديل<strong>baksmali/smali</strong>قراءة/تعديل الـDalvik bytecode مباشرةلما JADX يفشل، أو عايز تعدل behavior مباشرة في bytecoderegisters, invoke instructionsصعب القراءة لفترات طويلة—<strong>Android Studio</strong>تشغيل emulator، Layout Inspector، Profilerلما تحتاج بيئة تشغيل كاملة أو تفحص runtime behavior بصريًا—تقيل نسبيًاgenymotion كـemulator بديل<strong>MobSF (Mobile Security Framework)</strong>automated static + dynamic scan، بيطلعلك تقرير أولي شاملكخطوة أولى سريعة (triage) قبل التحليل اليدوي العميقpermissions, hardcoded secrets, manifest issues, OWASP MASVS mappingبيطلع False Positives كتير، مبيعملش deep data-flow tracing حقيقياستخدمه كـstarting point مش كـfinal report<strong>Ghidra</strong>Reverse engineering للـnative .so librariesلما تلاقي native code محتاج تحليل عميق (crypto, anti-tampering)exported functions, strings, control flowمحتاج وقت learning curveIDA Pro (مدفوع، أقوى decompiler أحيانًا)<strong>IDA (Free/Pro)</strong>بديل لـGhidra لتحليل native binariesلو متاح ليك وعايز decompiler أدقنفس حاجات Ghidraالنسخة الفيها كل الميزات مدفوعةGhidra مجاني بالكامل<strong>radare2 / Cutter</strong>تحليل binaries (CLI أو GUI)بديل خفيف لـGhidra، سريع للـquick checksstrings, functions, disassemblyأصعب تعلم من Ghidra لو مش معتاد الـCLIGhidra للتحليل العميق<strong>strings</strong>استخراج كل الـprintable strings من أي binary (APK, DEX, SO)أول خطوة سريعة قبل أي تحليل عميقURLs, keys, error messages, class namesبيرجع noise كتير، مفيهوش contextripgrep على source بعد الـdecompile<strong>aapt/aapt2</strong>قراءة metadata, resources, badging infoاستخراج معلومات سريعة عن الـAPK (package, SDK versions, permissions)aapt dump badging/permissions/resourcesمحدود لـmetadata بسapktool لتفاصيل أعمق<strong>apksigner</strong>التحقق من توقيع الـAPKعايز تعرف هوية الموقّع أو تتحقق من tamperingsigning certificate—keytool<strong>keytool</strong>فحص الشهادات (.jks, .keystore, extracted certs)فحص تفاصيل certificate (issuer, validity, fingerprint)SHA-256 fingerprint, issuer—apksigner<strong>zip/unzip</strong>APK هو ZIP في الأساسلو محتاج توصل لملف معين بسرعة من غير فك الـAPK بالكاملأي ملف داخليملهوش understanding للـformat (binary XML هتفضل binary)apktool<strong>grep/ripgrep (rg)</strong>البحث بـpattern/regex في كل الكود بعد الـdecompileأهم أداة في مرحلة Code Search وSecrets Analysisأي keyword من الـSearch Keywords Master List (Section 42)false positives كتير لو الـpattern عام جدًا—<strong>Frida</strong>Dynamic instrumentation — hook أي method runtimeالتحقق من hypothesis بُنيت من الـstatic analysis (Section 47)قيم الـvariables runtime، bypass لـchecksمحتاج root/jailbreak أو patched appobjection (مبني فوق Frida)<strong>objection</strong>واجهة أسهل فوق Frida (runtime mobile exploration)لو عايز bypass سريع لـSSL pinning أو root detection من غير تكتب Frida scriptmemory, classes, methodsأقل مرونة من كتابة Frida script مخصصFrida مباشرة<strong>adb</strong>التواصل مع الجهاز/الـemulatorتشغيل components يدويًا، سحب ملفات، logcatadb shell am start/broadcast/startservice, adb logcat, adb pullمحتاج USB debugging مفعّل—</p><p><strong>ملاحظة مهمة:</strong> مفيش أداة واحدة كافية. الـworkflow الحقيقي بيدمج بين JADX (قراءة) + apktool (manifest/smali دقيق) + ripgrep (بحث سريع) + Ghidra (native) + Frida (تأكيد ديناميكي).</p><h3>Section 4 — AndroidManifest.xml: Deep Dive Checklist</h3><h3>Checklist شامل</h3><p>البندإيه اللي تفحصهليه مهم<strong>Exported Components</strong>كل &lt;activity&gt;, &lt;service&gt;, &lt;receiver&gt;, &lt;provider&gt; فيها exported=&quot;true&quot; أو فيها intent-filter بدون exported=&quot;false&quot; صريحأي component exported ممكن يتكلم عليه من تطبيق تاني<strong>Custom Permissions</strong>&lt;permission android:name=&quot;...&quot; android:protectionLevel=&quot;...&quot;&gt;لو protectionLevel=&quot;normal&quot; بدل signature، أي app يقدر ياخدها<strong>Permission protectionLevel</strong>normal / dangerous / signature / signatureOrSystemsignature بس هو المضمون إنه نفس الموقّع<strong>Deep Links / App Links</strong>&lt;intent-filter&gt; فيها android:scheme, android:host, autoVerify=&quot;true&quot;بوابة دخول خارجية مباشرة لأي Activity<strong>URI Schemes</strong>android:scheme=&quot;myapp&quot;custom schemes بتقدر أي app/browser يفتحها<strong>Task/Launch Modes</strong>android:launchMode=&quot;singleTask/singleInstance&quot;ممكن تأثر على Task Hijacking attacks<strong>WebView-related Components</strong>Activities بتستضيف WebViewلازم تتبص عليها بعمق خاص (Section 11)<strong>android:debuggable</strong>true فـproduction build = خطر جسيميسمح بالـattach بـJDWP debugger على أي جهاز<strong>android:allowBackup</strong>true (default) بيسمح بعمل backup للـdata عن طريق adb backupممكن يسرّب local storage كامل<strong>android:usesCleartextTraffic</strong>true بيسمح بـHTTP عاديman-in-the-middle أسهل<strong>networkSecurityConfig</strong>ملف بيحدد domains cleartext، pinningمهم جدًا — راجع Section 16<strong>Foreground Services</strong>android:foregroundServiceTypeمن Android 14 لازم تحدد النوع، وده بيأثر على الصلاحيات<strong>Package Visibility (</strong><strong>&lt;queries&gt;)</strong>إيه الـpackages اللي التطبيق &quot;شايفها&quot;بيوضح integrations مع apps تانية<strong>Privileged/System Permissions</strong>android:protectionLevel=&quot;signatureOrSystem&quot; أو permissions تبدأ بـandroid.permission. الحساسةغالبًا بتظهر في system/OEM apps بس<strong>External Storage Permissions</strong>READ/WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGEمرتبطة بـScoped Storage (Section 46)<strong>Accessibility Services</strong>&lt;service&gt; بـandroid.permission.BIND_ACCESSIBILITY_SERVICEقدرات واسعة جدًا — لو مُستغلة ممكن تقرأ كل حاجة على الشاشة<strong>Notification Listener Services</strong>BIND_NOTIFICATION_LISTENER_SERVICEوصول لكل الإشعارات (ممكن فيها OTPs!)<strong>Device Admin</strong>&lt;receiver&gt; بـBIND_DEVICE_ADMIN_POLICYصلاحيات على مستوى الجهاز (lock, wipe)<strong>Biometric Permissions</strong>USE_BIOMETRIC, USE_FINGERPRINTتأكد إنها مربوطة فعليًا بـCryptoObject (Section 32)<strong>Camera/Microphone/Location</strong>CAMERA, RECORD_AUDIO, ACCESS_FINE_LOCATIONهل مبررة لوظيفة التطبيق؟<strong>Receivers Accessible Externally</strong>&lt;receiver&gt; exported بـintent-filter لـsystem broadcasts زي BOOT_COMPLETEDده عادي لو النية صح، بس لازم تتأكد من الـhandler</p><h3>لكل Component نوع: أسئلة أساسية</h3><p><strong>هل يمكن الوصول إليه من خارج التطبيق؟</strong></p><ul><li>لو exported=&quot;true&quot; صريح → أيوه</li><li>لو عنده intent-filter وعلى API &lt; 31 بدون exported محدد → أيوه ضمنيًا (behavior قديم)</li><li>لو عنده android:permission بمستوى signature → بس apps موقعة بنفس الشهادة تقدر توصله</li></ul><p><strong>ليه ده خطر محتمل؟</strong> لأن أي app تاني (malicious) مثبت على نفس الجهاز — حتى من غير أي permissions خاصة — يقدر يبعت Intent للـcomponent ده ويحاول يستدعي أي logic جواه، بما فيها sensitive actions زي تحويل أموال، تغيير settings، أو الوصول لبيانات محلية.</p><h3>Section 5 — Activities</h3><h3>إيه اللي تفحصه</h3><ul><li>كل Activity مُعرّفة في الـManifest، وهل هي exported=&quot;true&quot;؟</li><li>intent-filter بتاعتها — implicit (action/category/data) ولا هي بس explicit target؟</li><li>أي extras بتستقبلها من getIntent().getExtras() أو intent.getStringExtra(...)</li><li>هل فيه check للـauthentication/authorization قبل ما تنفذ أي action حساسة؟</li><li>Deep link parsing جوه onCreate/onNewIntent</li></ul><h3>إزاي تكتشف كل نوع ثغرة</h3><p><strong>Unauthorized Activity Access</strong> Trace: Manifest (exported Activity, لا permission) → onCreate() → هل فيه check لـ isLoggedIn() / SharedPreferences.getBoolean(&quot;auth&quot;, false) قبل ما تعرض بيانات حساسة؟ لو مفيش → finding.</p><p><strong>Authentication Bypass</strong> لو Activity حساسة (زي AccountSettingsActivity) exported ومفيهاش auth check، تقدر تستدعيها مباشرة بـadb shell am start -n وتتخطى شاشة اللوجين بالكامل.</p><p><strong>Authorization Bypass</strong> حتى لو في auth check (user logged in)، هل في check لصلاحيات المستخدم نفسه؟ مثلاً Activity لإدارة مستخدمين تانيين لازم تتأكد إن اللي فتحها admin فعلاً.</p><p><strong>Intent Injection</strong> لو الـActivity بتاخد extra وتستخدمه تبني Intent جديد وتعمله startActivity() بدون validation، ده بيسمح بتوجيه الـflow لمكان تاني (ممكن يوصل لـexported Activity حساسة تانية، أو حتى لتطبيق خارجي).</p><p><strong>Parameter Tampering</strong> لو extras بتتستخدم تحدد سلوك حساس (زي &quot;amount&quot;, &quot;userId&quot;, &quot;isAdmin&quot;) من غير ما يتم التحقق منها server-side، attacker بيقدر يتحكم فيها مباشرة عن طريق custom Intent.</p><p><strong>Sensitive Data Exposure</strong> Activities بتعرض بيانات حساسة (tokens, PII) في الـUI أو الـlogs أثناء الـonCreate — خصوصًا لو فيه Log.d(&quot;TOKEN&quot;, token) منسي من التطوير.</p><p><strong>Deep Link Vulnerabilities</strong> تفاصيل كاملة في Section 10 — لكن من منظور الـActivity نفسها: هل بتعمل Uri.parse(intent.getData()) وتستخدم الـparameters من غير validation قبل ما تنفذ navigation أو action؟</p><h3>مثال Tracing عملي</h3><pre>// Exported Activity<br>public class TransferActivity extends Activity {<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        String amount = getIntent().getStringExtra(&quot;amount&quot;);<br>        String toAccount = getIntent().getStringExtra(&quot;to_account&quot;);<br>        // لاحظ: مفيش أي auth check هنا<br>        performTransfer(amount, toAccount);<br>    }<br>}</pre><p><strong>الملاحظة:</strong> الـActivity دي لو exported، أي app تاني يقدر:</p><pre>adb shell am start -n com.target.app/.TransferActivity \<br>  --es amount &quot;1000&quot; --es to_account &quot;attacker_account&quot;</pre><p>وينفذ تحويل بدون ما يمر على أي شاشة تسجيل دخول. ده finding خطير لازم يترفع فورًا، وتتأكد منه dynamically في Lab.</p><p><strong>الفرق بين Internal vs External Activities:</strong> لو الـActivity مش ليها intent-filter وexported=”false” (أو مش محدد وmin API يدعم الـdefault الآمن)، فهي بس accessible من جوه نفس التطبيق — مفيش خطر مباشر من apps خارجية، لكن لسه ممكن تكون exposed عن طريق task hijacking في حالات نادرة.</p><p><em>نهاية Part 1. هيتبعها Part 2: Services, Broadcast Receivers, Content Providers, Intent Analysis, Deep Links.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7a1f4132c17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Broken Object Level Authorization (BOLA / IDOR) in Linktree GraphQL API Allows Unauthorized…]]></title>
            <link>https://medium.com/@apop69166/broken-object-level-authorization-bola-idor-in-linktree-graphql-api-allows-unauthorized-93c233e5a357?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/93c233e5a357</guid>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 14:53:23 GMT</pubDate>
            <atom:updated>2026-10-01T14:53:23.457Z</atom:updated>
            <content:encoded><![CDATA[<h3>Broken Object Level Authorization (BOLA / IDOR) in Linktree GraphQL API Allows Unauthorized Modification of Links</h3><h3>Overview</h3><p>During security testing of Linktree’s GraphQL API, I identified a Broken Object Level Authorization (BOLA/IDOR) vulnerability that allowed an authenticated user to modify a Link object that was outside their authorized workspace.</p><p>The issue was caused by insufficient server-side authorization checks around a user-controlled Link identifier.</p><h3>Affected Endpoint</h3><pre>POST https://graph.linktr.ee/graphql</pre><p>The vulnerable functionality was exposed through GraphQL mutations responsible for managing Link objects.</p><h3>Discovery</h3><p>While testing Link management functionality, I noticed that requests contained a Link identifier that was supplied to the GraphQL API.</p><p>I first performed the operation against a Link belonging to my own workspace and captured the request.</p><p>I then modified the Link identifier and supplied the identifier of another Link that was outside my authorized workspace.</p><p>One of the tested object identifiers was:</p><pre>582743627</pre><p>The application accepted the modified identifier and processed the request against the referenced Link.</p><p>This indicated that the backend was not properly verifying whether the authenticated user was authorized to manage the referenced object.</p><h3>Proof of Concept</h3><p>The testing process was straightforward.</p><h3>Step 1 — Legitimate Request</h3><p>I authenticated with an account that had permission to manage Links in my own workspace.</p><p>I then captured the GraphQL request responsible for modifying the Link.</p><p>The request contained a Link/object identifier.</p><h3>Step 2 — Modify the Object Identifier</h3><p>I replaced the original Link ID with the ID of a Link belonging to another workspace.</p><p>For example:</p><pre>Original Link ID:<br>&lt;my-authorized-link-id&gt;</pre><pre>Modified Link ID:<br>582743627</pre><p>No victim credentials were required.</p><h3>Step 3 — Send the Modified Request</h3><p>The modified GraphQL request was sent using the same authenticated session.</p><p>Instead of rejecting the request because the Link belonged to a different authorization scope, the server processed the operation against the supplied object.</p><p>The affected functionality was associated with the following GraphQL mutation:</p><pre>setDigitalDownloadLinkContext</pre><p>The mutation operated on Link-related properties such as:</p><pre>id<br>title<br>url<br>active<br>status</pre><h3>Result</h3><p>The operation was successfully performed against the referenced Link despite the authenticated account not having authorization over that Link.</p><p>This demonstrated an object-level authorization failure.</p><h3>Why This Happens</h3><p>The application correctly authenticated the requester, but authentication alone does not establish authorization over every Link object.</p><p>The server should have established a relationship similar to:</p><pre>Authenticated User<br>        ↓<br>Authorized Workspace<br>        ↓<br>Requested Link<br>        ↓<br>Permission to modify that Link</pre><p>Instead, the supplied Link identifier was trusted without sufficiently validating that relationship.</p><h3>Impact</h3><p>An attacker with a valid account could potentially manipulate Link objects outside their authorized workspace by supplying identifiers belonging to other users or workspaces.</p><p>Depending on the affected Link, this could result in:</p><ul><li>Unauthorized Link modification</li><li>Link defacement</li><li>Replacement of legitimate URLs</li><li>Redirecting visitors to attacker-controlled destinations</li><li>Phishing opportunities</li><li>Unauthorized modification of digital-product links</li><li>Cross-workspace integrity violations</li></ul><p>The demonstrated security boundary violation is that authorization was not properly enforced at the Link-object level.</p><h3>Root Cause</h3><p>The root cause was insufficient server-side object-level authorization.</p><p>The GraphQL resolver accepted a Link identifier supplied by the client but did not adequately verify that the authenticated user had permission to perform the requested operation on that specific Link.</p><p>A valid object ID should never be treated as proof that the requester is authorized to access or modify the object.</p><h3>Remediation</h3><p>Every GraphQL resolver or mutation that accepts a Link identifier should perform an explicit server-side authorization check.</p><p>Before modifying a Link, the backend should:</p><ol><li>Resolve the requested Link.</li><li>Determine the workspace/account that owns the Link.</li><li>Determine the authenticated user’s workspace and permissions.</li><li>Verify that the user has the required permission for the requested operation.</li><li>Reject the request if the authorization relationship does not exist.</li></ol><p>The authorization check should be performed server-side for every request and should not depend on frontend restrictions.</p><h3>Conclusion</h3><p>This finding demonstrates why GraphQL APIs require strict object-level authorization.</p><p>An authenticated user should not automatically be trusted to access or modify an object simply because they can supply its identifier.</p><p>For penetration testers, a useful test case is to capture a legitimate request, identify object-level identifiers, and replay the request with an identifier belonging to another authorization scope.</p><p>If the server processes the request instead of rejecting it, this may indicate a BOLA/IDOR vulnerability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93c233e5a357" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exposure of Shareable AWS S3 Pre-Signed Download URLs for Paid Digital Products]]></title>
            <link>https://medium.com/@apop69166/exposure-of-shareable-aws-s3-pre-signed-download-urls-for-paid-digital-products-8e7dbef9fab3?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e7dbef9fab3</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 14:48:37 GMT</pubDate>
            <atom:updated>2026-10-01T14:48:37.477Z</atom:updated>
            <content:encoded><![CDATA[<h3>Overview</h3><p>While testing Linktree’s digital-product functionality, I identified an issue where GraphQL responses exposed AWS S3 pre-signed download URLs associated with digital products.</p><p>The URLs were returned as part of the product/listing data and contained AWS S3 signing parameters.</p><h3>Discovery</h3><p>During testing of the digital-product functionality, I inspected the GraphQL responses returned when retrieving product information.</p><p>A field similar to:</p><p>listing.url</p><p>contained an AWS S3 pre-signed URL.</p><p>The URL included AWS signing parameters such as:</p><ul><li>X-Amz-Algorithm</li><li>X-Amz-Credential</li><li>X-Amz-Date</li><li>X-Amz-Expires</li><li>X-Amz-Signature</li></ul><p>The observed expiration value was:</p><p>X-Amz-Expires=86400</p><p>which corresponds to a validity period of approximately 24 hours.</p><h3>Why This Was Interesting</h3><p>A pre-signed S3 URL is effectively a temporary bearer capability.</p><p>Anyone who possesses a valid URL can generally access the associated S3 object until the signature expires, subject to the permissions encoded into that signed URL.</p><p>Therefore, exposing such a URL through an API response deserves careful authorization analysis, particularly when the underlying object represents paid digital content.</p><h3>Proof of Concept</h3><p>I obtained the product information through the application’s GraphQL functionality and inspected the returned listing.url value.</p><p>The response contained a signed AWS S3 URL.</p><p>I then tested the URL independently of the application’s normal authenticated download flow.</p><p>The URL could be requested directly without supplying the Linktree session that originally exposed the URL.</p><p>The important security property was therefore that possession of the signed URL was sufficient to access the underlying object during its validity period.</p><h3>Impact</h3><p>If the signed URL corresponds to content that should only be available to a paying customer, exposing the URL to an unauthorized party could allow the content to be downloaded directly from S3.</p><p>Potential consequences include:</p><ul><li>Unauthorized access to digital products</li><li>Sharing of temporary download URLs</li><li>Circumvention of application-level access controls</li><li>Loss of control over paid digital content</li><li>Potential redistribution of purchased content</li></ul><p>The exact impact depends on whether the URL is intentionally exposed to the requesting user and whether the corresponding object is supposed to be restricted to purchasers.</p><h3>Root Cause</h3><p>The application exposed a bearer-style S3 download capability through the GraphQL response.</p><p>Application-level authorization and object-level S3 access therefore need to be carefully aligned.</p><p>A signed URL should only be generated and returned when the requesting user is authorized to access the corresponding object.</p><h3>Remediation</h3><p>Possible mitigations include:</p><ul><li>Generate pre-signed URLs only after verifying the user’s entitlement.</li><li>Keep sensitive product objects private in S3.</li><li>Use short expiration periods where practical.</li><li>Avoid exposing download URLs earlier than necessary.</li><li>Bind access to the application’s authorization/entitlement logic.</li><li>Consider a controlled download endpoint that verifies authorization before issuing a short-lived signed URL.</li><li>Monitor and revoke/rotate exposed URLs where possible.</li></ul><h3>Conclusion</h3><p>AWS S3 pre-signed URLs are useful for controlled downloads, but they should be treated as temporary bearer credentials.</p><p>When such URLs are exposed through an API, the application must ensure that only users who are authorized to access the underlying object can obtain a valid URL.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e7dbef9fab3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Broken Function Level Authorization in Linktree GraphQL API Allows Lower-Privileged Admins to…]]></title>
            <link>https://medium.com/@apop69166/broken-function-level-authorization-in-linktree-graphql-api-allows-lower-privileged-admins-to-5d53185b3693?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d53185b3693</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 14:45:10 GMT</pubDate>
            <atom:updated>2026-10-01T14:45:10.302Z</atom:updated>
            <content:encoded><![CDATA[<h3>Broken Function Level Authorization in Linktree GraphQL API Allows Lower-Privileged Admins to Invite Administrators</h3><h3>Introduction</h3><p>While testing the authorization model of Linktree’s GraphQL API, I discovered a Broken Function Level Authorization vulnerability that allowed a lower-privileged Admin account to perform an administrative operation that should have been restricted to the account Owner.</p><p>The application correctly distinguished between different administrative roles in the UI, but the backend GraphQL API did not enforce the same privilege boundary for the affected mutation.</p><h3>Understanding the Authorization Model</h3><p>The account had multiple privilege levels.</p><p>The <strong>Owner</strong> had permission to manage administrators and invite additional users.</p><p>A lower-privileged <strong>Admin</strong> account, however, did not have permission to perform the same operation.</p><p>This created an interesting authorization boundary to test:</p><blockquote><em>Can an Admin directly call the GraphQL mutation used by the Owner to invite another administrator?</em></blockquote><p>Instead of relying on the UI, I tested the authorization directly at the API layer.</p><h3>Finding the Mutation</h3><p>While inspecting the application’s GraphQL requests, I identified a mutation used by the Owner to add another user as an administrator.</p><p>The important part was that the operation itself was accessible through the GraphQL API and accepted user/account-related parameters.</p><p>At this point, the expected behavior was:</p><ul><li>Owner session → mutation should succeed.</li><li>Lower-privileged Admin session → mutation should be rejected.</li></ul><p>I then tested the exact same operation using the lower-privileged Admin’s authenticated session.</p><h3>Proof of Concept</h3><p>First, I authenticated as the account Owner and captured the request responsible for adding another administrator.</p><p>I then replaced the authentication cookie with the cookie belonging to the lower-privileged Admin account.</p><p>No Owner credentials were used for the second request.</p><p>The same GraphQL mutation was sent using the Admin session.</p><p>Conceptually, the request looked like:</p><pre>mutation {<br>    &lt;owner_admin_invitation_mutation&gt;(<br>        identifier: &quot;&lt;target-user&gt;&quot;<br>        accountId: &quot;&lt;account-id&gt;&quot;<br>    ) {<br>        ...<br>    }<br>}</pre><p>The important change was not the mutation itself.</p><p>The only relevant change was the authenticated session.</p><h3>Owner Session</h3><p>Using the Owner’s cookie:</p><pre>Request → Owner session → Mutation → Success</pre><p>This was expected behavior.</p><h3>Lower-Privileged Admin Session</h3><p>I then replaced the Owner’s cookie with the cookie belonging to the Admin account that did <strong>not</strong> have permission to add administrators.</p><p>The request was still accepted.</p><p>The API successfully performed the operation and added the target user as an administrator.</p><p>The response indicated that the user had been successfully added, for example:</p><pre>&lt;target-user&gt; has been added as an admin</pre><p>This demonstrated that the backend was authorizing the mutation based on authentication rather than verifying whether the authenticated user had the required privilege to execute that function.</p><h3>Why This Is a Security Issue</h3><p>The important point is that this was not simply an API endpoint being exposed.</p><p>The application already had a privilege distinction:</p><p><strong>Owner ≠ lower-privileged Admin</strong></p><p>The lower-privileged Admin was intentionally not supposed to have the ability to invite/add administrators.</p><p>However, the backend accepted the same privileged operation when it was called directly through GraphQL.</p><p>This is a classic example of <strong>Broken Function Level Authorization (BFLA)</strong>.</p><p>The authorization check should have been performed against the function being requested, not merely against whether the requester was authenticated or belonged to the account.</p><h3>Impact</h3><p>An attacker who compromises or controls a lower-privileged Admin account could potentially use this authorization flaw to perform administrative actions reserved for the Owner.</p><p>In this case, the attacker could add another user as an administrator despite not having the required permission.</p><p>Depending on the application’s administrative capabilities, this could allow:</p><ul><li>Unauthorized administrator creation</li><li>Privilege escalation</li><li>Expansion of attacker-controlled access</li><li>Persistence through additional administrator accounts</li><li>Potential compromise of the entire workspace/account</li></ul><p>The demonstrated impact was the unauthorized creation of an administrator using a session that did not have permission to perform that operation.</p><h3>Root Cause</h3><p>The GraphQL mutation did not correctly enforce function-level authorization.</p><p>The backend appeared to verify that the request was associated with an authenticated account, but failed to verify that the authenticated user’s role was authorized to execute the specific administrative mutation.</p><p>Authentication answers:</p><blockquote><em>“Who is this user?”</em></blockquote><p>Authorization must additionally answer:</p><blockquote><em>“Is this user allowed to perform this specific operation?”</em></blockquote><p>The second check was missing or insufficient.</p><h3>How It Should Be Fixed</h3><p>The server should enforce authorization inside the resolver responsible for the mutation.</p><p>Before performing the operation, the backend should verify:</p><ol><li>The requester is authenticated.</li><li>The requester belongs to the relevant account/workspace.</li><li>The requester’s role has permission to invite/add administrators.</li><li>The requested target account/resource belongs to the same authorized scope.</li><li>The requested operation is permitted for that role.</li></ol><p>For example, conceptually:</p><pre>Authenticated user<br>        ↓<br>Resolve account/workspace<br>        ↓<br>Resolve user&#39;s role<br>        ↓<br>Check permission for &quot;invite administrator&quot;<br>        ↓<br>Allow or reject mutation</pre><p>The authorization decision must happen server-side and must not depend on whether the operation is hidden from the frontend UI.</p><h3>Conclusion</h3><p>This vulnerability highlights an important lesson when testing GraphQL APIs:</p><p><strong>Never assume that hiding a privileged function from a lower-privileged user’s UI is sufficient authorization.</strong></p><p>GraphQL makes this particularly interesting because mutations that are not exposed through the normal UI can often still be called directly if the schema and endpoint are accessible.</p><p>In this case, a lower-privileged Admin could directly invoke a mutation intended for the Owner and successfully add another administrator.</p><p>The proper security boundary must therefore be enforced inside the backend resolver itself, regardless of how the request was generated.</p><h3>Key Takeaway for Pentesters</h3><p>When testing role-based authorization, don’t only test:</p><blockquote><em>“Can this user access this page?”</em></blockquote><p>Also test:</p><blockquote><em>“Can this user directly invoke functions that belong to a higher privilege level?”</em></blockquote><p>For GraphQL applications, enumerate mutations and compare their behavior across different roles.</p><p>A useful methodology is to capture the same privileged operation using an Owner account and then replay it using a lower-privileged account.</p><p>If the lower-privileged session can successfully execute the operation, you may have a <strong>Broken Function Level Authorization</strong> vulnerability.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d53185b3693" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server-Side reCAPTCHA Validation Bypass on /services/request-send.php]]></title>
            <link>https://medium.com/@apop69166/server-side-recaptcha-validation-bypass-on-services-request-send-php-0e74076636f2?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e74076636f2</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Thu, 01 Oct 2026 14:33:15 GMT</pubDate>
            <atom:updated>2026-10-01T14:33:15.172Z</atom:updated>
            <content:encoded><![CDATA[<h3>Summary</h3><p>The endpoint /services/request-send.php on birdviewpsa.com does not enforce server-side validation of the reCAPTCHA token before processing form submissions.</p><p>Although the web form requires a CAPTCHA on the client side, an unauthenticated attacker can send a direct HTTP POST request with an empty g-recaptcha-response parameter.</p><p>The server still processes the request successfully, creates the corresponding lead/request, assigns the request to sales and technical personnel, and triggers notification emails.</p><h3>Vulnerable Endpoint</h3><p><strong>Method:</strong> POST</p><p><strong>Endpoint:</strong></p><p><a href="https://birdviewpsa.com/services/request-send.php">https://birdviewpsa.com/services/request-send.php</a></p><p><strong>Authentication:</strong> Not required</p><p><strong>Affected parameter:</strong></p><p>g-recaptcha-response</p><h3>Steps to Reproduce</h3><ol><li>Open the affected form on birdviewpsa.com.</li><li>Intercept the legitimate form submission using Burp Suite.</li><li>Send the request to Burp Repeater.</li><li>Remove the CAPTCHA token by changing:</li></ol><pre>g-recaptcha-response=&lt;valid-token&gt;</pre><p>to:</p><pre>g-recaptcha-response=</pre><ol><li>Send the request.</li></ol><p>The request is processed successfully despite the missing CAPTCHA token.</p><h3>Proof of Concept</h3><p>Example request:</p><pre>POST /services/request-send.php HTTP/2<br>Host: birdviewpsa.com<br>Content-Type: application/x-www-form-urlencoded; charset=UTF-8<br>X-Requested-With: XMLHttpRequest</pre><pre>typerequest=Trial&amp;page=https%3A%2F%2Fbirdviewpsa.com%2Fcompany%2Fvulnerability-reward-program%2F&amp;country=Egypt&amp;state=Qalyubia&amp;country_code=EG&amp;meeting-url=NA&amp;form-place=Header&amp;fullname=Test+User&amp;firstname=Test&amp;lastname=User&amp;email=attacker%40example.com&amp;users=100&amp;phone-code=20&amp;phone=1234567890&amp;company=TestCompany&amp;comment=&amp;g-recaptcha-response=&amp;is_first_visit=true</pre><p>The server responds with:</p><pre>{<br>  &quot;Validation&quot;: {<br>    &quot;Account&quot;: false,<br>    &quot;Captcha&quot;: false,<br>    &quot;CaptchaForm&quot;: false<br>  },<br>  &quot;Success&quot;: true,<br>  &quot;Mail&quot;: {<br>    &quot;RequestSale&quot;: {<br>      &quot;Success&quot;: &quot;Sales: true&quot;<br>    },<br>    &quot;RequestTechnical&quot;: {<br>      &quot;Success&quot;: &quot;Technical: true&quot;<br>    }<br>  }<br>}</pre><p>The important observation is that the server reports the CAPTCHA validation as unsuccessful while simultaneously returning:</p><pre>&quot;Success&quot;: true</pre><p>and executing the downstream processing.</p><h3>Security Impact</h3><p>An unauthenticated attacker can bypass the intended CAPTCHA protection and submit requests programmatically without completing the CAPTCHA challenge.</p><p>This can allow:</p><ul><li>Automated creation of fraudulent/spam leads.</li><li>Pollution of the CRM/lead pipeline.</li><li>Automated triggering of sales and technical notification emails.</li><li>Increased processing and notification volume.</li><li>Potential degradation of email reputation if abused at scale.</li></ul><p>The demonstrated impact is therefore primarily <strong>abuse of an unauthenticated form and CAPTCHA-protected workflow</strong>, rather than an authentication bypass.</p><h3>Expected Behavior</h3><p>Requests containing a missing, invalid, expired, or otherwise unsuccessful CAPTCHA verification should be rejected before any lead creation, CRM processing, or email notification occurs.</p><p>For example:</p><pre>Missing/Invalid CAPTCHA<br>        ↓<br>Reject request<br>        ↓<br>No lead creation<br>No email notification</pre><h3>Remediation</h3><p>Perform CAPTCHA verification entirely on the server before executing any downstream functionality.</p><p>The backend should:</p><ol><li>Require g-recaptcha-response.</li><li>Send the token to Google’s reCAPTCHA verification endpoint.</li><li>Verify that the response is valid and applicable to the expected site/action.</li><li>Reject missing, invalid, expired, or failed CAPTCHA tokens.</li><li>Perform this validation before creating leads or sending notification emails.</li><li>Add rate limiting as a secondary defense against automated abuse.</li></ol><p>CAPTCHA should be treated as a <strong>server-side security control</strong>, not merely a client-side form validation mechanism.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e74076636f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Session Fixation]]></title>
            <link>https://medium.com/@apop69166/session-fixation-b6291b8243f2?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6291b8243f2</guid>
            <category><![CDATA[session-fixation]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 21:06:39 GMT</pubDate>
            <atom:updated>2026-10-01T14:30:05.143Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unverified Email Registration Allows Attacker-Controlled Session to Become Associated With Another User’s Email</h3><h3>Summary</h3><p>The application allows a user to register an account using an email address without verifying ownership of that email address.</p><p>As a result, an attacker can create an account using an email address they do not control and immediately obtain an authenticated session associated with that email.</p><p>When the legitimate owner of the email address later attempts to register using the same email address, the application treats the email as already registered. The attacker-controlled account/session remains active, creating an account ownership conflict.</p><p>If the attacker-controlled session remains valid after the legitimate owner completes the account setup or authentication flow, the attacker can continue accessing the account associated with the victim’s email address.</p><h3>Affected Functionality</h3><p><strong>Host:</strong> api.cleeng.com</p><p><strong>Affected functionality:</strong> Account registration / email ownership verification</p><p><strong>Issue:</strong> Missing email ownership verification during account registration</p><h3>Root Cause</h3><p>The registration flow does not require the user to prove ownership of the supplied email address before creating and authenticating the account.</p><p>The application appears to treat possession of an email address string as sufficient to associate the address with a newly created authenticated account.</p><p>No verification step, such as an email verification link or OTP, is required before the account becomes usable.</p><h3>Steps to Reproduce</h3><h3>Step 1 — Register using an email address</h3><p>Using an email address that is not controlled by the attacker, initiate the registration process.</p><p>For testing purposes, this should be an email account controlled by the tester or a dedicated test account.</p><p>Example:</p><p>victim@example.com</p><p>Complete the registration process.</p><h3>Step 2 — Observe account creation</h3><p>The application creates the account without requiring proof of ownership of victim@example.com.</p><p>No email verification or OTP is required.</p><p>The attacker receives an authenticated session.</p><p>Example:</p><p>PHPSESSID=&lt;attacker-session&gt;</p><h3>Step 3 — Verify authenticated access</h3><p>Using the session obtained during registration, access an authenticated endpoint such as:</p><p>/webapi/dashboard/broadcaster/profile</p><p>The server returns authenticated account information.</p><p>This confirms that the unverified email was sufficient to create an authenticated account.</p><h3>Step 4 — Legitimate owner attempts registration</h3><p>Using the legitimate owner account for the same email address, attempt to register using:</p><p>victim@example.com</p><p>The application reports that the email address is already registered.</p><p>This demonstrates that the attacker was able to reserve an account using an email address without proving ownership.</p><h3>Step 5 — Verify session persistence</h3><p>After the legitimate owner completes the available account setup/authentication flow, test the previously obtained attacker session.</p><p>Use the original session:</p><p>PHPSESSID=&lt;attacker-session&gt;</p><p>Request an authenticated endpoint.</p><p>If the server continues to return the account associated with the email address, the original attacker-controlled session remains authenticated.</p><h3>Observed Result</h3><p>An account can be created and authenticated using an email address without proving ownership of that address.</p><p>The email address subsequently becomes associated with the attacker-created account, preventing the legitimate owner from registering normally.</p><p>Furthermore, the original authenticated session remains usable if the account ownership/authentication flow performed by the legitimate owner does not invalidate the attacker’s existing session.</p><h3>Expected Result</h3><p>The application should not consider an email address verified or establish full account ownership until the user proves control of the email address.</p><p>A secure registration flow should:</p><ol><li>Create the account in an unverified/pending state.</li><li>Send a verification link or OTP to the supplied email address.</li><li>Require successful verification before granting full authenticated access.</li><li>Prevent unverified registrations from permanently claiming an email address.</li><li>Invalidate or rotate existing sessions when account ownership or authentication state changes.</li></ol><h3>Security Impact</h3><p>This behavior can allow an attacker to claim an account using an email address they do not control.</p><p>Depending on the affected account functionality, this can result in:</p><ul><li>Unauthorized association of an email address with an attacker-controlled account.</li><li>Account ownership conflicts.</li><li>Persistence of an attacker-controlled authenticated session.</li><li>Potential unauthorized access to the account associated with the email address.</li><li>Potential Account Takeover if the attacker’s session remains authenticated after the legitimate owner completes registration or authentication.</li></ul><h3>Proof of Concept</h3><p>The attached video demonstrates the complete flow using test accounts controlled by the researcher:</p><ol><li>Registration using an unverified email address.</li><li>Immediate creation of an authenticated attacker session.</li><li>The email becomes registered without ownership verification.</li><li>The legitimate owner encounters an existing-account state.</li><li>The original attacker session remains authenticated and can access authenticated functionality.</li></ol><h3>Remediation</h3><p>The registration process should require email ownership verification before granting full account access.</p><p>Recommended changes:</p><ul><li>Require email verification before activating the account.</li><li>Keep newly registered accounts in an unverified state.</li><li>Do not grant full authenticated privileges before verification.</li><li>Do not permanently reserve an email address based solely on an unverified registration.</li><li>Invalidate existing sessions when account ownership or authentication credentials are established or changed.</li><li>Review account recovery and password-reset flows to ensure email ownership is consistently verified.</li></ul><h3>Security Note</h3><p>The issue should be considered separately from the reported session-fixation vulnerability. The session-fixation issue concerns session identifier lifecycle and regeneration, while this issue concerns the application’s failure to establish ownership of the email address during registration.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6291b8243f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Captcha Bypass]]></title>
            <link>https://medium.com/@apop69166/captcha-bypass-33fe3ff229a6?source=rss-95ae346e00c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/33fe3ff229a6</guid>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bypass-captcha]]></category>
            <dc:creator><![CDATA[Ahemd ashraf]]></dc:creator>
            <pubDate>Tue, 07 Jul 2026 21:04:57 GMT</pubDate>
            <atom:updated>2026-07-07T21:04:57.967Z</atom:updated>
            <content:encoded><![CDATA[<p>Title: Complete Captcha Bypass on Publisher Registration Endpoint /webapi/auth/publisher leading to Mass Account Creation</p><p>Vulnerability Type: Improper Authentication / Business Logic Flaw</p><p>Description: The application implements Google reCAPTCHA on the publisher registration page ([<a href="https://srm.cleeng.com/](https://srm.cleeng.com/))">https://srm.cleeng.com/](https://srm.cleeng.com/))</a> to prevent automated account creation. However, the backend server at api.cleeng.com fails to validate the g-recaptcha-response parameter. An attacker can intercept the registration request, leave the captcha parameter completely empty (“”), and successfully register an unlimited number of publisher accounts automatically.</p><p>Steps to Reproduce:</p><p>Navigate to the publisher registration page.</p><p>Fill in the registration details and intercept the request using Burp Suite before solving the captcha.</p><p>In the intercepted POST request to /webapi/auth/publisher, modify the payload to make the captcha parameter empty: “g-recaptcha-response”: “”</p><p>Change the email address to a new one and send the request.</p><p>Notice that the server responds with HTTP/2 200 OK and successfully creates the account, returning a new publisherId (e.g., 654631087), completely bypassing the captcha restriction.</p><p>Impact: An attacker can utilize a simple script to register thousands of automated publisher accounts. This can lead to database inflation, business logic disruption, and financial/resource exhaustion on the underlying AWS API Gateway infrastructure.</p><p>Remediation: The backend code must strictly validate the g-recaptcha-response token on the server-side by making a server-to-server request to Google’s reCAPTCHA API ([<a href="https://www.google.com/recaptcha/api/siteverify](https://www.google.com/recaptcha/api/siteverify)).">https://www.google.com/recaptcha/api/siteverify](https://www.google.com/recaptcha/api/siteverify)).</a> If the token is empty, missing, or invalid, the request must be rejected with an HTTP 400 or 403 Forbidden erro</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33fe3ff229a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>