Page cover

3108 Bahtera Siber 2025

Full Writeup for 30/37 Question
Table of Content

Miscellaneous

Kotak Angkasa

Question

“Di dalam ruang angkasa, di tengah gelap galaksi, tersembunyi sebuah kotak misteri. Kotak ini tidak sekadar permainan biasa – ia menyimpan rahsia yang hanya dapat dipecahkan oleh minda tajam dan tangan yang cekap.

Sebagai pewaris ilmu Dr. Sheikh Muszaphar Shukor, angkasawan pertama Malaysia, Perwira ditugaskan untuk menyelesaikan teka-teki ini. Hanya mereka yang mampu menyusun Kotak Angkasa ke bentuk asalnya akan menemui koordinat rahsia untuk membuka kunci bendera kejayaan.”

http://5.223.66.228:3001/

Solution
  1. Record the video of scrambling

  2. Slowly follow back the step in reverse to solve the Rubic Cube

Flag: 3108{Sh31kh_MuZ4ph4r_5p4c3_73219}


Komik

Question

Dalam ni ada Flag, tinggal copy paste dan ____ je.

https://www.dcode.fr/

File Given komik.txt

Tags: #unicode-steganography #invisible-characters #misc #3108ctf2025 #zero-width-characters #quaternary-encoding #binary-decoding

Solution

First, I examined all the provided files:

Key Observations:

  • komik.txt contains Malaysian text about a comic book called "Fried Rice" by Erica Eng

  • The file appears larger than expected for the visible text content, suggesting hidden data

The suspiciously large file size compared to visible content suggested Unicode steganography - a technique where invisible/zero-width Unicode characters are used to hide data within normal text. To investigate, I examined the Unicode codepoints in the file.

Common invisible Unicode characters:

  • U+200C - Zero Width Non-Joiner (ZWNJ)

  • U+200D - Zero Width Joiner (ZWJ)

  • U+FEFF - Byte Order Mark (BOM) / Zero Width No-Break Space

  • U+202C - Pop Directional Formatting (PDF)

I created a Python script to analyze the invisible characters embedded in the text:

Results:

  • Found 176 invisible characters total

  • Character frequency distribution:

    • U+200C (ZWNJ): 114 occurrences

    • U+FEFF (BOM): 26 occurrences

    • U+200D (ZWJ): 23 occurrences

    • U+202C (PDF): 13 occurrences

With 4 different invisible characters, I assume this was a quaternary encoding system (base-4) where each character represents a 2-bit value.

I developed multiple decoding strategies:

Character Mapping:

  • \u200c (U+200C) → 00

  • \u200d (U+200D) → 01

  • \u202c (U+202C) → 10

  • \ufeff (U+FEFF) → 11

Complete Solution Script

Decoding Process:

  1. Extract all 176 invisible characters in sequence

  2. Map each character to its 2-bit binary representation

  3. Concatenate all bits to form one long binary string (352 bits total)

  4. Split into 8-bit bytes and convert to ASCII characters

Decoded Output:

Where [0] represents null bytes (0x00).

Removing the null bytes revealed the flag:

Flag: 3108{e1sner_r1c3_b00k}


Permainan Lagenda

Question

Di sinilah bermulanya era permainan video sebelum wujudnya MLBB, PUBG, CSGO dan lain-lain. Bantu Soloz dalam permainan ini untuk mendapatkan flag.

https://ular.bahterasiber.my

Solution
  1. The goals is to get 400 Points

  2. Each food give you 10 point

  3. Found snake_score at local storage

  4. Change the value to 390 then continue play to get 400 point and flag revealed

Flag: 3108{ul4r_l3gend}


Ke Makam Bonda

Question

Sebuah puisi agung dari Almarhum Dato' Usman Awang kini bersemadi dalam bentuk alunan suara. Irama dan kata menyimpan dua bahagian rahsia :–

Yang awal terzahir jika dipandang, bukan didengar; Yang akhir terkunci dalam gema yang lebih dalam, hanya dibuka oleh nama pena seorang sasterawan negara.

Temui kedua-dua bahagian bendera, dan satukanlah.

File Given: UNIC-Ke_Makam_Bonda.wav, README.md

Tags: steganography audio-analysis spectrogram steghide malaysian-literature multi-layer id3-metadata

Solution

File Analysis:

README Content:

Part 1

Based on the hint "lihat dengan mata bukan telinga", we need to analyze the audio visually.

  1. Throw the audio to audacity

  2. Change the view to spectrogram

  3. Examining the spectrogram revealed text patterns 3108{Bondaku_Y4ng_Disayangi


Part 2

The hint mentioned "Nama pena-nya di alam sastera, dua kata"

  • Research revealed Usman Awang used the pseudonym "Tongkat Warrant"

  • This consists of exactly two words as hinted

  1. Try detect steghide and use passphrase: Tongkat Warrant

  2. Confirmed something embedded and extract hidden content

  3. Analyze the Usman Awang.pdf and get the second half of the flag _Sem0ga_Dirahmati}

Flag: 3108{Bondaku_Y4ng_Disayangi_Sem0ga_Dirahmati}


Seniman Agung

Question

"Di sebalik kehebatan filem-filem P. Ramlee, ada satu rahsia tersembunyi yang hanya peminat tegar mampu temui. Laman web penghormatan ini kelihatan biasa sahaja, tetapi seni dan nostalgia yang terpampang sebenarnya menyimpan sesuatu yang bernilai. Adakah anda mampu menghayati karya agung beliau dan membongkar rahsianya?"

Instance: http://host:port

Tags: web-exploitation hidden-content bruteforce search-functionality blind-search

Solution

Analyzing the Web Application

The challenge presents a P. Ramlee themed website with a search functionality. The page contains:

The hint mentions "taip 4 huruf", suggesting the search requires exactly 4 characters.

API Endpoint Discovery

Through examining the JavaScript code, I identified two main API endpoints:

  1. GET /api/posts - Returns all posts

  2. POST /api/search - Searches posts with a query

Step 3: Examining the Data Structure

Response reveals 10 posts, including:

Post ID 3 contains asterisks that likely hide content.


Testing Search Functionality

  • Search requires exactly 4 characters

  • Queries with < 4 or > 4 characters return: {"error":"Query must be 4 characters."}

Discovery

When testing the challenge name "3108":

  • Post ID 3 (with asterisks) appeared in results, despite "3108" not being visible in the displayed content!

  • The asterisks are hiding content that contains "3108".

  • Testing revealed that "108{" also matched post ID 3:

  • This confirmed the hidden content follows the flag format: 3108{...}


Bruteforce

Since we need exactly 4-character substrings and know the flag starts with "3108{", I developed a systematic approach:

  1. Find the character after "08{" (3 chars + 1 new = 4 chars total)

  2. Continue with next 4-char substring

  3. Repeat until complete flag is discovered

Result: 08{B matched post ID 3!

Step 9: Automated Flag Discovery


Character-by-Character Discovery:

  1. "08{B" → Found 'B'

  2. "8{Bu" → Found 'u'

  3. "{Buj" → Found 'j'

  4. "Buj4" → Found '4'

  5. "uj4n" → Found 'n'

  6. "j4ng" → Found 'g'

  7. "4ngL" → Found 'L'

  8. "ngL4" → Found '4'

  9. "gL4p" → Found 'p'

  10. "L4p0" → Found '0'

  11. "4p0k" → Found 'k'

  12. "p0k_" → Found '_'

  13. "0k_M" → Found 'M'

  14. "k_M3" → Found '3'

  15. "_M3r" → Found 'r'

  16. "M3rd" → Found 'd'

  17. "3rd3" → Found '3'

  18. "rd3k" → Found 'k'

  19. "d3k4" → Found '4'

  20. "3k4}" → Found '}' (End!)

Flag: 3108{Buj4ngL4p0k_M3rd3k4}


Kotak Angkasa 2

Question

Untuk menakluki cabaran ini, Perwira perlu menguasai bukan sahaja logik dan strategi, tetapi juga kesabaran seorang angkasawan yang mengembara di ruang kosong tanpa sempadan. Mampukah anda mengembalikan keseimbangan Kotak Angkasa ini dan membongkar rahsia bendera tersembunyi?”

Instance: nc host port

Tags: rubiks-cube kociemba algorithm malaysia-space network-service misc cube-solving

Solution
  1. This is a Rubik's Cube solving challenge

  2. The cube is displayed in an unfolded net format

  3. We need to input moves in standard notation (R, U, F, etc.)

Understanding the Cube Format

The cube is shown in this layout:

Where:

  • U = Up face (top)

  • L = Left face

  • F = Front face

  • R = Right face

  • B = Back face

  • D = Down face (bottom)

Kociemba Algorithm

After researching Rubik's cube CTF challenges, I discovered that these often require professional-grade solvers like the Kociemba algorithm.

Manual patterns don't work because:

  1. The cube states are randomly generated

  2. Each connection gives a different scrambled state

  3. Only an optimal solving algorithm can handle arbitrary scrambles


Solution Script

Execution

Flag: 3108{9a618248b64db62d15b300a07b00580b}


Web

SuperMokh

Question

Di padang hijau berlari laju, SuperMokh gol tiada terhenti, Walau zaman sudah berlalu, Adakah anda peminat sejati?

https://supermokh.bahterasiber.my

Tags: jwt-vulnerability algorithm-confusion none-algorithm authentication-bypass web-exploitation base64-decoding session-manipulation

Solution

First, I accessed the website and examined the source code:

Hidden base64 string in HTML comment:

Output: guest:Selangor1972_1987

  • guest = username

  • Selangor1972_1987 = password


Logging in as Guest User

  • Successful login with 302 redirect to dashboard.php

  • Received JWT token in auth_token cookie

  • Also got PHPSESSID for session management

JWT Token Received:

Decoding the JWT payload:


Testing Dashboard Endpoint

Direct Flag Access Attempt

  • Access denied - confirms need for "SuperMokh" username.

  • Application checks username specifically for "SuperMokh"

  • Need to forge a JWT token with different username

  • JWT manipulation might be possible


JWT Header Analysis

The original JWT header (base64 decoded):

  • Application uses HMAC SHA-256 algorithm

  • Common JWT vulnerabilities:

    1. Algorithm confusion (RS256 → HS256)

    2. None algorithm bypass

    3. Weak secret key

    4. Missing signature verification

Testing "None" Algorithm Attack

Vulnerability: Many JWT implementations improperly handle the "none" algorithm, allowing unsigned tokens.

  1. Create JWT with "alg": "none"

  2. Set username to "SuperMokh"

  3. Remove signature (empty signature section)

Implementation:

Generated Forged JWT:


Replace the original JWT token in the cookie file:

Testing Forged Token

Capturing the Flag

Flag Retrieved:

Flag: 3108{m0kht4r_d4h4r1_l3g3nd_n3v3r_d13s}


Pemimpin

Question

Perdana Menteri merupakan ketua kerajaan Malaysia dan memainkan peranan penting dalam menentukan hala tuju negara dan memastikan tanah air terus melangkah ke arah pembangunan serta kesejahteraan rakyat sejak detik kemerdekaan. Persoalannya, adakah anda kenal siapa mereka semua?

https://pemimpin.bahterasiber.my

Tags: #web #ctf #client-side #cookies #tampering #javascript #devtools #polling #insecure-design

Solution

Opening DevTools and reading the bundled files reveals two components:

  • index.html: displays PM cards and includes client.js.

  • client.js: contains all the client logic (and even a comment shouting NO FLAG HERE).

  • Cookies are explicitly initialized to false on load and reset again by the “Mula Semula” button.

  • The entire correct answer (PM order) is hardcoded in correctSequence.

  • Two backend endpoints exist:

    • /validate-sequence — validates the order you submit.

    • /validate-flag — returns the flag iff quizCompleted is true and the Merdeka date cookies are correct.

  • A polling loop is started on page load to call /validate-flag every 2 seconds but only when quizCompleted === true.

So, there are two gates we must meet on the client:

  1. quizCompleted = true (set when the sequence check succeeds), and

  2. Cookies: tahun_merdeka=1957; bulan_merdeka=8; hari_merdeka=31.


  1. Bypass user interaction by setting the selection state directly from the built-in correctSequence:

    • selectedSequence = correctSequence.slice();

    • Call UI updater: updateSequenceDisplay();

  2. Trigger the “check” to flip quizCompleted to true and start the flag poller:

    • checkSequence();

  3. Satisfy the cookie check by overwriting the three cookies with the Merdeka date:

    • tahun_merdeka=1957 (year), bulan_merdeka=8 (month), hari_merdeka=31 (day).

  4. Sit back— the 2-second poll to /validate-flag returns JSON with the flag, and the banner prints it to the page and logs it in the console.


  1. Open the challenge, press F12 → Console.

  2. Paste and run the following:

Flag: 3188{p3m1mp1n_m4l4ysI4}


Pelumba Negara

Question

Arkib digital ini telah dibangunkan untuk pemandu F1 pertama Malaysia. Walau bagaimanapun, sistem ini ada kelemahan dan dapatkah anda untuk mengumpul semua serpihan maklumat bersejarah yang disembunyikan?

Instance: http://host:port

Tags: #ssti #template-injection #jinja2 #rce #file-enumeration #multi-part-flag #web-exploitation

Solution

The application appeared to be an archive system for Alex Yoong, Malaysia's first Formula 1 driver, with a form that accepts user input.

I tested for Server-Side Template Injection (SSTI) by submitting template syntax in the form:

Initial Test Payload:

When the application returned 49 instead of {{ 7*7 }}, this confirmed the presence of SSTI vulnerability, likely using Jinja2 template engine (common in Flask applications).

I escalated the SSTI to RCE using the following payload to access Python's os module through Jinja2's global objects:

RCE Test Payload:

Output:

I found a .env file which typically contains configuration and sensitive information:

Command:

.env Contents:

This revealed three important file paths that likely contained flag fragments!

Collecting Flag Fragments

Based on the .env file, I systematically read each flag file:

Fragment 1: /tmp/f1.txt

Fragment Found: 3108{d4r1_Kud14_Lumpur_k3

Fragment 2: /var/malaysia.txt

Fragment Found: _p3nt4s_duni4_Alex_Y00ng_

Fragment 3: /usr/1976.txt

Fragment Found: f1rst_M4l4ysi4n_F1_dr1v3r}

Combining all three fragments in the correct order:

Flag: 3108{d4r1_Kud14_Lumpur_k3_p3nt4s_duni4_Alex_Y00ng_f1rst_M4l4ysi4n_F1_dr1v3r}


COMMANDer

Question

Terminal lama ini menyimpan biodata seseorang bersama rahsianya. Namun, rahsia itu hanya akan terbuka kepada mereka yang tahu menggunakan arahan yang tepat. Mampukah anda menguasai terminal ini untuk membongkar kebenaran?

https://komander.bahterasiber.my

Tags: #api-enumeration #javascript-analysis #hidden-functionality #source-code-analysis #endpoint-discovery #security-through-obscurity

Solution

We're presented with a web-based terminal emulator that appears to be a quiz game about "Jeneral (B) Tun Ibrahim Ismail".

The terminal interface presents itself as a simple quiz game with standard commands:

  • mula - Start/Begin

  • bantuan - Help

  • kosongkan - Clear

  • Other basic terminal commands


Source Code

  1. main.js - Main application logic

  2. commands.js - Command handling logic

Upon examining the JavaScript files, several important discoveries were made:

This indicated that there were hidden "secret" commands not visible in the normal game interface.

The code revealed that the terminal fetched available commands from:


The API response revealed not just the standard quiz commands, but also hidden secret commands that weren't displayed in the normal terminal interface.

The /api/pilihan endpoint revealed the existence of secret commands, specifically:

This was the breakthrough moment - realizing that "OperationOatmeal" was likely referring to "Operation Oatmeal", which could be connected to the historical figure mentioned in the challenge.

Flag: 3108{0p3R4T10n_O@Tm34l_1bR4h1M_1sM@1L}


Bendera

Question

Tengah cari bendera ke tuu

https://bendera.bahterasiber.my

Tags: #sql-injection #waf-bypass #mixed-case-bypass #information-schema #union-injection #mysql

Solution

When examining the provided source code, several critical observations were made:

  • WAF configuration file hint: /config/waf_config.txt

  • SQL query structure revealed: SELECT * FROM tokoh WHERE nama='$namaTokoh'

  • Search parameter: cari

WAF Configuration Discovery

First step was to check if the WAF configuration was accessible:

  • WAF blocks common SQL injection keywords (both lowercase and uppercase)

  • Blocks SQL comments (-- and /*)

  • Blocks logical operators (OR)

  • Weakness: Only checks exact case matches, not mixed case


SQL Injection Testing

Testing for basic SQL injection with a single quote:

  • SQL injection vulnerability confirmed

  • Direct insertion of user input into query

  • MySQL database backend

  • Query breaks with syntax error revealing injection point


WAF Bypass

Since the WAF only checks for exact case matches, the bypass strategy involved:

  • Mixed Case Keywords: UnIoN instead of UNION, SeLeCt instead of SELECT

  • Alternative Comments: # instead of blocked --

  • URL Encoding: When necessary for special characters

Testing UNION injection to determine the number of columns:

The query returns 3 columns, and the 3rd column is displayed on the webpage.

Database Name Discovery

Result: Database name is bahtera

Table Enumeration

Result: Found table tokoh

Column Enumeration

Result: Columns are bendera,id,nama

Result: Shows Jalur Gemilang (not the flag format)

Complete Data Extraction

Flag: Jalur Gemilang,3108{d4_jUmP@_b3nD3eR4_k3??}


FH7 (not solved)

Question

Solution


LCW JAGUH DUNIA !! (not solved)

Question

Solution


Forensic

Operation Nyet

Question

Pada suatu hari, ketika Khairul Aming meninggalkan laptopnya tanpa pengawasan, seorang staf menyambungkan USB miliknya ke laptop tersebut dan melakukan sesuatu.

Beberapa saat kemudian, dia mencabut USB itu dan beredar. Tindakannya tidak disedari Khairul Aming, namun sempat diperhatikan oleh seorang rakan sekerja yang berasa curiga.

Beberapa jam kemudian, USB tersebut secara cuai ditinggalkan di atas mejanya. Rakan sekerja itu mengambil USB tersebut kerana ingin mengetahui rahsia di dalamnya.

Kini, tugas anda adalah untuk menyiasat isi kandungan USB tersebut melalui fail imej forensik yang diberikan (.E01).

File Given: USB.E01

Tags: usb-analysis e01-image data-exfiltration base64-decoding batch-script-analysis obfuscation

Solution

Verify file type of the forensic image:

Mounting the E01 Image

  • Use ewfmount from ewf-tools package to access the raw disk image

  • Once mounted, we can analyze the filesystem structure

Analyze filesystem structure:

  • Filesystem: FAT32

  • Volume Label: "USB DRIVE"

  • OEM Name: MSDOS5.0

  • Total Size: ~15GB

  • Status: Contains allocated clusters indicating files present

File Discovery

  • Use fls to list all files including deleted ones

  • Look for suspicious file names, especially batch scripts or executables

  • Two suspicious batch files found: USBBackup___.bat and obf.bat

Extract USBBackup___.bat (inode 9):

Analysis of USBBackup___.bat:

Extract obf.bat (inode 10):

  • The scripts show a clear data exfiltration attack

  • Check the OperationNyet directory for stolen files

The NYET variable in the batch script contains base64 encoded components

Reconstruct the encoded string:

Result: MzEwOHtueWV0X255ZXRfcmFoc2lhX255ZXRfbnlldH0=

Flag: 3108{nyet_nyet_rahsia_nyet_nyet}


Tok Janggut

Question

Pada tahun 1915, Tok Janggut bangkit menentang penjajahan British di Kelantan. Selepas pertempuran tragis di Pasir Puteh, satu-satunya gambar terakhir beliau disimpan dalam bentuk digital oleh seorang sejarawan moden.

Namun, gambar bersejarah ini telah diubah oleh pihak tidak bertanggungjawab, dipercayai untuk memadam bukti perjuangan beliau.

Sebagai penyiasat forensik, tugas anda adalah untuk membaik pulih fail ini dan mengesan mesej rahsia yang tersembunyi dalam gambar tersebut.

File Given: Tok_Janggut

Tags: forensic file-corruption header-repair jpeg steganography

Solution
  • ExifTool shows "TIFF-like data after unknown 30-byte header"

  • This suggests the file has a corrupted header but contains valid image data

  • The presence of EXIF data indicates this is likely a JPEG file

Examining File Structure

  1. Bytes 0-7: 12 34 56 78 90 ab cd ef - Garbage data (corruption)

  2. Bytes 8-9: 49 46 - This should be 54 49 46 46 ("TIFF")

  • First 8 bytes are completely corrupted

  • The TIFF signature is missing "T" characters at the beginning

  • JPEG markers (ff e1, ff db, ff c0, ff c4) are present, confirming this is a JPEG

  • EXIF data is intact

Remove Corrupted Header

Once the image is repaired, opening fixed_image.jpg reveals:

  • A portrait drawing of Tok Janggut

  • Red text overlay at the bottom of the image containing the flag

Flag: 3108{TOK_JANGGUT_P3JU4NG_F1N4D}


Perjanjian Pangkor

Question

Tahun 1874 menyaksikan satu titik perubahan besar dalam sejarah Perak — termeterainya Perjanjian Pangkor antara pihak British dan pembesar Melayu. Di sebalik dokumen rasmi, wujud khabar angin bahawa satu komunikasi rahsia turut berlaku antara pihak tertentu, dihantar melalui saluran tersembunyi.

Satu fail .pcap telah ditemui, dipercayai mengandungi serpihan maklumat penting berkaitan detik bersejarah ini. Kandungannya masih belum diketahui, namun ada pihak mendakwa ia menyimpan rahsia yang boleh mengubah tafsiran kita terhadap sejarah yang sedia ada.

Mampukah anda menelusuri jejak-jejak digital dan membongkar kebenaran yang tersembunyi di sebalik arus masa?

File Given: PERJANJIAN_PANGKOR.pcap, Perjanjian Pangkor.txt

Tags: #forensics #pcap-analysis #tshark #wireshark #vba-macros #docm-analysis #strings #zip-extraction #file-carving #malware-analysis #office-documents

Solution

Perjanjian_Pangkor.txt content:


PCAP Analysis with Tshark

  • HTTP traffic containing file transfers

  • ZIP file download detected in the network stream

  • Extracted files include document.zip

  • PERJANJIAN PANGKOR.docm - Microsoft Word document with macros

  • Contains VBA macros (indicated by .docm extension)

Since DOCM files are essentially ZIP archives, we can extract their internal structure:

  • word/vbaProject.bin - Contains VBA macro code

  • word/vbaData.xml - VBA metadata

Flag: 3108{perjanjian_pangkor_mesej_rahsia}


Pemacu Sebuah Negara (not solved)

Question

Solution


Osint

Malayan Heroine

Question

Her husband nickname was “You Loy-De".

3108{the heroine daughter} *replace space with _, all small letter

Solution
  • Google "Her husband nickname was “You Loy-De""

  • Result: Sybil Kathigasu

  • Went on Wikipedia found the list of children's name

  • Flag: 3108{dawn_kathigasu}


Jejak Taman Ilmu

Question

Seorang tokoh wanita Melayu yang menjadi penaung awal pendidikan untuk anak perempuan Melayu di tanah air. Beliau bukan sahaja pejuang kemerdekaan, malah pengasas kepada sebuah institusi pendidikan wanita yang pertama di zamannya. Melalui jejak digital dan sejarah, cari di mana tapak asal kolej itu mula-mula berdiri.

Format Flag: 3108{X.XXX, X.XXX}

File Given: chall.jpg

Solution
  1. Searched "Seorang tokoh wanita Melayu yang menjadi penaung awal pendidikan untuk anak perempuan Melayu di tanah air." in Google Search.

  2. Amongst the suggested links were, Pustaka Ilmu Arkib Negara Malaysia's webpage on Zainon Munshi Sulaiman or Ibu Zain (https://pustakailmu.arkib.gov.my/index.php/ms/pustaka-ilmu/kenali-tokoh/allahyarham-tan-sri-hajah-zainun-bt-munshi-sulaiman-ibu-zain), of which is written "Akhirnya beliau berjaya menubuhkan Kolej Puteri Tunku Ampuan Mariam...".

  3. Searched "Kolej Puteri Tengku Ampuan Mariam koordinat" on Google Search, which showed a Scribd document titled "Kolej Tunku Ampuan Mariam, Johor Bahru, Johor." as the top link (https://www.scribd.com/document/706922852/KOLEJ-TUNKU-AMPUAN-MARIAM-JOHOR-BAHRU-JOHOR) where the coordinates of the college were written as "1.465656, 103.756697".

  4. As the flag format is only up to 3 decimal places, the final flag was written as 3108{1.465, 103.756}

Flag: 3108{1.465, 103.756}


Dim Sum

Question

Lahh dari Malaysia rupanya… Flag dalam channel dia.

Cara Pertama 1:

Gunakan perkakas ini chef! https://ytcomment.kmcat.uk/

Eh jap apa format flag kita eh? --------------------------------------------------------------------

Cara Kedua 2:

Ada cara kedua nak dapatkan flag, tekan channel commenter di gambar.

Solution
  • Google Malaysian Dimsum chef influencer, Top result: Dimsimlim

  • Went to https://ytcomment.kmcat.uk/ and searched Dimsimlim

  • Searched comment 3108

  • Flag: 3108{d1msum_s3d4p_t4p1_m4hal}


Angkasawan

Question

Someone is using the social media handler of the one of the two final candidate of the angkasawan program.

Solution
  • Identified the final candidate for angkasawan program

  • Go to name checkup and searched for @Drfaizkhaled and @Drsheikhmuszaphar

  • Clicked on twitch and search the social media handler

  • Flag: 3108{m4l4ysi4n_4str0n4ut}


Reverse Engineering

Maznah Legacy

Question

Iron Lady? Adakah itu Iron Man versi wanita? 🤔 Ataupun sebenarnya tokoh lain yang cukup terkenal di Malaysia?

Hanya dengan bedah program ini, anda akan tahu kebenarannya disbalik sosok misteri tersebut...

Files Given: output.txt, kunci_diraja

Tags: #RE #Python #Modulo #FlagRecovery

Solution

Open kunci_diraja using Binary Ninja to read the content

Looking at the pseudocode:

  • Input length must be 39 characters.

  • For each index i, the program:

    • Adds the ASCII value of input[i] with i and 0x2A (42).

    • Takes modulo 0x7F (127).

    • Compares the result against the target array.

If all values match, the program prints a biography of Ungku Abdul Aziz and exits.


From output.txt:

This is the expected result of the transformation. Our task is to invert the transformation.


We need to solve:

Rearranging:

This gives us the original input characters.


Write a quick Python script:

Flag: 3108{P4k_Ungku_Pr0f3s0r_Dir4j4_Ek0n0mi}


Sandiwara Pena

Question

Sebuah karya pena agung kini beralih wajah menjadi baris-baris kod. Setiap bait huruf diselindung menanti untuk dibaca.

Awalnya tampak di sebalik susunan yang teratur. Akhirnya hanya terungkai apabila engkau mengenalinya.

Satukanlah untuk menjadi bendera sebenar.

File Given: sandiwara_pena Tags: #xor #binary-analysis #array-indexing #string-validation

Solution
  • 64-bit ELF executable

  • Position Independent Executable (PIE)

  • Not stripped (symbols available)

  • Linux binary

  • Binary asks for flag input in Malay: "Please enter the flag"

  • Rejects incorrect input with: "Flag or flag length is not correct"


Analyzing the Disassembly

Open the file using Binary Ninja to read their HLIL (High-Level Intermediate Language)

  1. main() - Entry point and user interaction

  2. pemeriksaan_lapisan() - Flag validation function

  3. ekstrak_modul() - Data extraction function

  4. pengenalan() - Introduction message

From the HLIL analysis (lines 665-691):

  • Flag must be exactly 31 characters (0x1f)

  • Main validation happens in pemeriksaan_lapisan()

  • Success message mentions A. Samad Said (Malaysian poet)

From lines 649-663:

  • For each character position i (0 to 30):

  • flag[i] XOR 0x42 must equal ekstrak_modul(i)

  • Therefore: flag[i] = ekstrak_modul(i) XOR 0x42

From lines 638-647:

Data Array Logic:

  • Indices 0-9: Use modul_alpha array

  • Indices 10-19: Use modul_sigma array

  • Indices 20+: Use modul_omega array


From the disassembly data section (lines 946-955):

Complete Arrays:

  • modul_alpha: "qsrz9" + [0x12, 0x76, 0x29, 0x1d, 0x11]

  • modul_sigma: "v/v&" + [0x1d, 0x12, 0x71, 0x28, 0x37, 0x76]

  • modul_omega: [0x2c, 0x25, 0x1d, 0x11, 0x76, 0x31, 0x36, 0x71, 0x30, 0x76, 0x3f]


Writing the Solver Script

Flag: 3108{P4k_S4m4d_P3ju4ng_S4st3r4}


Kunci Diraja

Question

Di balik angka dan aturan sederhana, tersembunyi kisah seorang insan yang pernah mengangkat martabat bangsa. Kod ini bukan sekadar semakan, tetapi kunci untuk membuka lembaran sejarahnya.

Files Given: output.txt, kunci_diraja

Tags: #RE #Python #Modulo #FlagRecovery

Solution

Open kunci_diraja using Binary Ninja to read the content

Looking at the pseudocode:

  • Input length must be 39 characters.

  • For each index i, the program:

    • Adds the ASCII value of input[i] with i and 0x2A (42).

    • Takes modulo 0x7F (127).

    • Compares the result against the target array.

If all values match, the program prints a biography of Ungku Abdul Aziz and exits.


From output.txt:

This is the expected result of the transformation. Our task is to invert the transformation.


We need to solve:

Rearranging:

This gives us the original input characters.


Write a quick Python script:

Flag: 3108{P4k_Ungku_Pr0f3s0r_Dir4j4_Ek0n0mi}


Cryptography

ADI RaSA...

Question

Adi Putra terkenal dengan kehebatan matematik dia sejak kecil lagI. Hasil inspirasi daripada beliau, saya telah menghasilkan formula baharu untuk menyulitkan maklumat misteri. Sebelum anda dapat selesaikan cabaran ini, anda harus buktikan dulu sejauh mana anda mengenali Adi Putra.

Instance: nc host port

File Given: chal.py

Tags: rsa multi-prime-rsa factorization quiz mathematics sympy

Solution

Analyzing the RSA Implementation

  • Multi-Prime RSA: Uses N = p × q × r (3 primes)

  • Small Prime Range: Each prime is 72-73 bits (2^72 to 2^73-1)

  • Total Modulus Size: ~216-219 bits (much smaller than secure RSA)

  • Standard Exponent: e = 65537


Quiz Component

The server presents a quiz about Adi Putra Abdul Ghani with 4 questions. Through trial and error, the correct answers are:

  1. Question 1: A. Adi Putra Abdul Ghani

  2. Question 2: B. Seni Matematik Islam

  3. Question 3: C. Tokoh Matematik Islam Abad Ini

  4. Question 4: A. PWTC sempena Pesta Buku Antarabangsa

After completing the quiz successfully:


RSA Analysis

Multi-Prime RSA Weakness:

  • Small Prime Size: Each prime is only 72-73 bits

  • Total Security: ~216-219 bits (vs standard 2048+ bits)

  • Factorization Feasible: Modern algorithms can factor this size

Mathematical Foundation:

  • For multi-prime RSA: φ(N) = (p-1)(q-1)(r-1)

  • Decryption: m = c^d mod N where d ≡ e^(-1) mod φ(N)


Factorization Strategy

The key vulnerability is the small prime sizes. We can use various factorization methods:

  1. SymPy's factorint() - Handles small factors efficiently

  2. Pollard's Rho Algorithm - For medium-sized factors

  3. Fermat's Method - When factors are close

Implementation Approach


Complete RSA Solver


Flag: 3108{g3n1uS_m4th3MAT1K_D1lUp4k4N}


The Pocket Rocketman

Question

Azizulhasni Awang, legenda lumba basikal trek Malaysia, digelar The Pocket Rocketman kerana tubuhnya kecil tetapi kuasanya luar biasa. Di trek, beliau meluncur pantas dan lincah, memecut dengan kelajuan yang menggerunkan lawan. Dalam perlumbaan keirin, strategi, ketepatan, dan fokus menjadi senjata utamanya – membuktikan bahawa kejayaan bukan bergantung pada saiz, tetapi kecekapan dan teknik.

File Given: thepockerocketman.pdf

Solution
  1. Opened the challenge file and noted the given RSA parameters: $n$, $e$, and ciphertext $c$.

  2. The description hinted that the primes were very close in value, so I used a Fermat factorization script (solve_pocket_rocketman.py) to factorize $n$.

  3. The script successfully produced the prime values $p$ and $q$.

  4. With $p$ and $q$, the script calculated the private key and decrypted the ciphertext.

  5. The decrypted output, when converted to ASCII, revealed the flag as 3108{Muh4mm4d_Az1zulH4sn1_Th3_P0ck3t_R0ck3tm4n_88}

Flag: 3108{Muh4mm4d_Az1zulH4sn1_Th3_P0ck3t_R0ck3tm4n_88}


Shila's Song & City

Question

Shila Amzah dikenali sebagai salah satu penyanyi Malaysia yang berjaya di pentas antarabangsa. Dia lahir di sebuah bandar ibu negara Malaysia dan pernah menghasilkan sebuah lagu popular yang menjadi titik permulaannya di luar negara.

File Given: liriklagu.txt

Solution
  • If you read the liriklagu.txt carefully, you’ll notice that 3108{ already appears on one of the lines.

  • To decode it, copy that line starting from 3108{ up to the closing bracket } and paste it into dcode.fr/cipher-identifier for analysis.

  • Then, choose Skip Cipher and run the Automatic Skip Finder decrypt option. The flag will be revealed.

Flag: 3108{ShaH1l4_Sh1l4_4mz4h_14KL}


Putri Catur Negara (not solved)

Question

Solution


Reversing

Mundurkah kita?

Question

Apakah rahsia yang tersembunyi di alam sebalik mata ini.

File Given: simple_calculator.zip

Tags: windows-pe binary-analysis static-analysis string-analysis hidden-flag

Solution

Understanding the Application Structure

First, I open the .exe in Binary Ninja to examined the HLIL file to understand the application's basic structure:

  • The application is a Windows GUI calculator

  • Main entry point: wWinMain function

  • Window procedure: eadDoubleP6HWND__Rb

  • Core calculation function: gLblOut

Analyzing the Calculator Functionality

Looking at the main window procedure and calculation logic:

  1. Creates a window titled "Gostan" with two input fields

  2. Button with ID 0x44d triggers calculation

  3. gLblOut function:

    • Calls tod(_.bss, &var_21) - gets first number

    • Calls tod(egister_frame, &var_22) - gets second number

    • Validates both inputs are valid numbers

    • Performs addition: zmm0_1.q = zmm0 f+ zmm0_1.q

    • Displays result

Searching for Hidden Content

Since the hint mentioned secrets "behind the eyes," I searched for unusual patterns and strings:

Found the hidden flag in the .rdata section:


Flag: 3108{nothing_beats_the_string_method}


No Name

Question

Cari rahsia tersembunyi dalam file tersebut:

Nama File: noname.tar.gz

Tags: static-analysis binary-analysis flag-extraction rodata-section binary-ninja hlil

Solution
  • Extract the .tar and .gz twice using 7zip to get the file noname

  • Use binary ninja to export the .hlil to analyze whats inside

Looking at the main function in the HLIL:

The main function only prints the message we saw and exits. This is clearly a decoy!

The HLIL analysis reveals multiple functions with MD5 hash names:

These functions contain calls to std::__ostream_insert that would print parts of a string, but they're never called by main.

The key discovery was in the .rodata section:

  • "3108{predictabl" at address 0x201c

  • 7d 00 (hex for }) immediately following

From the analysis, I can see the flag format 3108{predictabl followed by the closing brace }.

However, the word appears to be incomplete. The logical completion would be "predictable" - adding an "e" to complete the word.

Flag: 3108{predictable}


Pwn Exploitation

Sudirman Microphone Tuner

Question

Sudirman? Mikrofon pun boleh jadi senjata.

Instance: nc host port

Files Given: Dockerfile, flag.txt, sudirman_mic

Tags: buffer-overflow stack-alignment x64-pwn ret2win address-leak no-protections

Solution

First, let's examine what we're working with:

  • 64-bit x86-64 architecture

  • Dynamically linked

  • Not stripped (good for analysis!)

Critical findings:

  • No stack canary - Buffer overflows possible

  • NX disabled - Stack is executable (though we won't need this)

  • No PIE - Fixed addresses, no ASLR for executable

  • Partial RELRO - Some GOT entries writable

This binary has minimal security protections - perfect for exploitation!

The strings reveal:

  1. There's a secret_song() function that executes cat /app/flag.txt

  2. The program leaks the address of secret_song()

  3. There's a mic_input() function that likely contains the vulnerability

Let's run the program to understand its behavior:

  • Program leaks secret_song() address: 0x40121b

  • Takes user input after "Enter your lyrics:"

  • Prints back our input in the format string

Let's examine the key functions:

Main Function Flow

Main function calls:

  1. tuner_leak() - Leaks the secret_song address

  2. mic_input() - Takes user input (likely vulnerable)

Secret Song Function (Our Target)

The function calls system() with a string at 0x402008, which contains "cat /app/flag.txt".

Vulnerable Input Function

  • Buffer size: 64 bytes (sub $0x40,%rsp)

  • Read size: 128 bytes (mov $0x80,%edx)

  • Classic buffer overflow! We can read 64 bytes more than the buffer can hold.

Exploitation:

  1. Use the address leak to get secret_song() address

  2. Overflow the buffer to overwrite the return address

  3. Redirect execution to secret_song() function

  4. Handle x64 stack alignment (this is crucial!)

Buffer Layout Analysis

In x64 architecture:

So we need:

  • 64 bytes to fill the buffer

  • 8 bytes to overwrite saved RBP

  • 8 bytes for our target return address

  • Total: 80 bytes (72 bytes padding + 8 bytes return address)

Initial Attempt (Failed)

Result: No flag received. The program doesn't crash but doesn't execute our target function.

In x64 architecture, the stack must be 16-byte aligned before calling functions. When secret_song() calls system(), the stack might not be properly aligned, causing the call to fail silently.

The solution is to use a RET gadget for stack alignment:

Flag: 3108{sud1rm4n_p3ny4ny1_t3rs0h0r}


Pertahanan Terakhir

Question

Leftenan Adnan merupakan antara wira yang sangat disanjungi di kalangan rakyat Malaysia dan Singapura kerana sifat beliau yang berani dan enggan menyerah kalah saat bertempur dengan tentera Jepun pada 1942.

Instance: nc host port

File Given: chall, libc.so.6, Dockerfile

Tags: #buffer-overflow #shellcode #stack-executable #pwn #binary-exploitation #stack-leak

Solution

First, let's examine the provided files:

  • 64-bit ELF binary

  • PIE (Position Independent Executable) enabled

  • Not stripped (symbols available)

  • Dynamically linked

Binary Security Analysis

  • Stack is executable - We can execute shellcode directly

  • No stack canaries - No stack protection

  • PIE enabled - Addresses are randomized

  • Full RELRO - GOT is read-only


Binary Analysis

Let's examine the binary's functions and strings:

Key Functions Identified:

  • main() - Entry point

  • setup() - Initialize buffers

  • banner() - Display banner

  • perang() - Critical function (means "war" in Malay)

Dynamic Analysis

Program Flow:

  1. Displays an ASCII art banner with military theme

  2. Shows message: "Tentera Jepun semaking dekat dan terdapat kebocoran di [ADDRESS]"

  3. Asks for first input (commander's orders)

  4. Asks for second input (counter-attack request)

  5. Responds with "Baik, Tuan!" (Yes, Sir!)

Key Observation: The program leaks a stack address via printf("%p")!

Source Code Analysis (via HLIL)

Open the chall in Binary Ninja to read their HLIL, we can see the perang() function:

Buffer Layout Analysis:


Vulnerability Discovery

The Vulnerability:

  • buf is allocated 64 bytes from rbp

  • fgets() reads up to 90 bytes (0x5a) into buf

  • This allows 26 bytes of overflow past the buffer

Memory Layout:

Overflow Calculation:

  • Distance to return address: 0x40 + 8 = 72 bytes

  • Controllable overflow: 90 - 64 = 26 bytes ✅ (enough to overwrite return address)

What we have:

  1. ✅ Stack address leak (exact location of our buffer)

  2. ✅ Executable stack (can run shellcode)

  3. ✅ Buffer overflow (can control return address)

  4. ✅ No stack canaries (no protection bypass needed)

What we need:

  1. Shellcode to execute /bin/sh or read flag

  2. Calculate proper buffer offset

  3. Return to our shellcode using the leaked address


Exploitation Strategy

Attack Vector: Classic shellcode injection

  1. Leak Capture: Extract the stack address from program output

  2. Shellcode Injection: Place shellcode at the beginning of the buffer

  3. Return Address Overwrite: Overwrite return address with leaked buffer address

  4. Shell Execution: Execute commands to read the flag

Why this works:

  • Stack is executable (no NX bypass needed)

  • We know the exact address to return to (stack leak)

  • No canaries to bypass

  • PIE doesn't matter since we're using leaked addresses


Exploit Development

Shellcode Development

Shellcode Analysis:

  • Length: 27 bytes (fits easily in 64-byte buffer)

  • Standard execve syscall to spawn /bin/sh

  • Self-contained (constructs /bin/sh string on stack)

Payload Construction

Local Testing:

Common Issues Encountered:

  1. Wrong offset calculation - Fixed by careful assembly analysis

  2. Shellcode too long - Optimized to 27 bytes

  3. Address format parsing - Handled hex string conversion properly


Flag Extraction

Output Analysis: The flag was embedded in ASCII art output from /app/flag.txt:

Flag: 3108{l4st_st4nd_4t_buk1t_c4ndu}


Bapa Kemerdekaan (not solved)

Question

Solution


Boot-2-Root

Menara Berkembar KLCC (User) & (Root)

Question

Sebuah pelayan web milik “KLCC Tower” telah diceroboh dan disyaki mengandungi konfigurasi yang tidak selamat. Tugas anda adalah untuk mendapatkan akses ke pelayan ini, bermula dari point permulaan (initial foothold) sehingga mendapatkan kawalan penuh (root access).

Files Given: Ubuntu Server.ovf, Ubuntu_server-disk1.vmdk, Ubuntu Server.mf

Tags: #WebShell #FileUpload #WildcardInjection #PrivilegeEscalation #TarExploit #SudoMisconfiguration #InformationDisclosure #Base64Decoding #SUI

Solution

Open the Server on your Virtual Machine and identified the Machine IP

Identify open services and potential attack vectors

Key Findings:

  • FTP (21): Anonymous access allowed with files

  • SSH (22): Standard OpenSSH service

  • HTTP (80): Apache web server with "KLCC Internal Portal"

FTP Enumeration

Objective: Extract files from anonymous FTP access

Files Retrieved:

  • /file2.txt: "Not all towers lead up. Some files are just floors."

  • /pub/file2.txt: Same content (cryptic hint)

Analysis: The message appears to be a hint about hidden files or directories ("floors" vs "towers").


Initial Web Reconnaissance

Objective: Analyze the web application for vulnerabilities

Critical Discovery in HTML Source:

Upload Vulnerability Discovery

Objective: Test the legacy upload functionality

Vulnerability Assessment: No visible file type restrictions or validation.


Web Shell Creation

Objective: Gain code execution through file upload

Payload Created:

Upload Command:

Response:

Code Execution Testing

Objective: Verify web shell functionality

Result: Successfully gained code execution as www-data user.


File System Exploration

Objective: Discover sensitive files and potential privilege escalation vectors

Key Discovery:

Apache2 Directory Investigation

Explore the protected apache2 directory

Findings:

Security Note: .htaccess file contains Deny from all, protecting web access but not filesystem access.

Credential Discovery

Extract database credentials from mysql directory

Encrypted Content:

Decryption Process:


Credential Validation

Test discovered credentials for user access

Result: Credentials are valid for user john.

SSH Access Establishment

Note: Since the su command worked through the web shell, we effectively have john user access. The challenge demonstrated that we could escalate from www-data to john user.

User Flag Retrieval

Flag: 3108{welcome_to_the_upper_deck}


Root Privilege Escalation

Sudo Privilege Analysis

Identify root escalation vectors

Backup Script Analysis

Analyze the sudo-enabled script for vulnerabilities

Vulnerability Identified: Wildcard injection in tar command - the * wildcard can be exploited by creating files with specific names that tar interprets as command-line options.

Directory Permissions Check

Analysis: Directory is writable by john group, enabling file creation for exploitation.

Wildcard Injection Exploit

Exploit tar wildcard to execute arbitrary commands as root

Exploitation Steps:

  1. Create Payload Script:

  1. Create Malicious Filenames:

Technical Explanation: When tar processes the wildcard *, it includes these filenames as arguments. The --checkpoint options in tar allow executing commands at specified intervals, effectively running our shell script as root.

  1. Execute Exploitation:

  1. Verify SUID Bash:

Root Access Achievement

Flag: 3108{you_conquered_the_towers}


Kapal Bocor (User) & (Root) (not solved)

Question

Solution


Last updated