PicoCTF Exclusive

Pico GYM repractice Starting : 12/2/2024 Finish : 13/2/2024

General Skill

First Find

Description Unzip this archive and find the file named 'uber-secret.txt'

Unzip the file and use gio tree

┌──(sofarz㉿badboy)-[~/Desktop/CTF/Pico/Exclusive]
└─$ gio tree -h files 
file:///home/sofarz/Desktop/CTF/Pico/Exclusive/files
|-- 13771.txt.utf-8
|-- 14789.txt.utf-8
|-- acceptable_books
|   |-- 17879.txt.utf-8
|   |-- 17880.txt.utf-8
|   `-- more_books
|       `-- 40723.txt.utf-8
|-- adequate_books
|   |-- 44578.txt.utf-8
|   |-- 46804-0.txt
|   `-- more_books
|       |-- .secret
|       |   `-- deeper_secrets
|       |       `-- deepest_secrets
|       |           `-- uber-secret.txt
|       `-- 1023.txt.utf-8
`-- satisfactory_books
    |-- 16021.txt.utf-8
    |-- 23765.txt.utf-8
    `-- more_books
        `-- 37121.txt.utf-8

==picoCTF{f1nd_15_f457_ab443fd1}==


Big Zip

Description Unzip this archive and find the flag.

==picoCTF{gr3p_15_m4g1c_ef8790dc}==


ASCII Numbers

Description

Convert the following string of ASCII numbers into a readable string:

First anaylis it was hex. Convert it into ASCII.

==picoCTF{45c11_n0_qu35710n5_1ll_t311_y3_n0_l135_445d4180}==

Web

JAuth

Description Most web application developers use third party components without testing their security. Some of the past affected companies are:

Can you identify the components and exploit the vulnerable one? The website is running here. Can you become an admin? You can log in as test with the password Test123! to get started.

Initial Analysis

We can login user test:Test123! . Checking via cookies, it was a Jason Web Token (JWT)

It also mentions past vulnerabilities where it can tamper roles from user to admin.

When I initially encountered this problem, I noticed that the second hint mentioned two parts. Upon reviewing my JWT token, I realized it only consisted of one part. How can I make it two parts? The solution is to separate it with a dot (.).

==picoCTF{succ3ss_@u7h3nt1c@710n_72bf8bd5}==

RE

ASCII FTW

Description This program has constructed the flag using hex ASCII values. Identify the flag text by disassembling the program. You can download the file from here.

By understanding how this program works and looking into ghidra, it can conclude that this assembly never been call but it contains flags.

==picoCTF{ASCII_IS_EASY_3CF4BFAD}==


Bit-O-Asm-1

Description Can you figure out what is in the eax register? Put your answer in the picoCTF flag format: picoCTF{n} where n is the contents of the eax register in the decimal number base. If the answer was 0x11 your flag would be picoCTF{17}. Download the assembly dump here.

The first top line was dummy since it not touch any value in EAX, Then mov eax,0x30. which mean copy value 0x30 into EAX. The answer is 0x30 (48)

==picoCTF{48}==


Bit-O-Asm-2

Description Can you figure out what is in the eax register? Put your answer in the picoCTF flag format: picoCTF{n} where n is the contents of the eax register in the decimal number base. If the answer was 0x11 your flag would be picoCTF{17}. Download the assembly dump here.

Same as previous, but this time it refer to [rbp-0x4]. Refer to line 15, it copy the value 0x9fe1a(654874).

==picoCTF{654874}==


Bit-O-Asm-3

Description Can you figure out what is in the eax register? Put your answer in the picoCTF flag format: picoCTF{n} where n is the contents of the eax register in the decimal number base. If the answer was 0x11 your flag would be picoCTF{17}. Download the assembly dump here.

Focus on line 14,22,29,32,36

==picoCTF{2619997}==


Bit-O-Asm-4

Description Can you figure out what is in the eax register? Put your answer in the picoCTF flag format: picoCTF{n} where n is the contents of the eax register in the decimal number base. If the answer was 0x11 your flag would be picoCTF{17}. Download the assembly dump here.

This time it include comparism between value.

==picoCTF{654773}==


Picker I

Description This service can provide you with a random number, but can it do anything else? Connect to the program with netcat: $ nc saturn.picoctf.net 55986 The program's source code can be downloaded here.

This code is vulnerable because it uses eval(). Looking into win() and that is our target.

Simple script,

==picoCTF{4_d14m0nd_1n_7h3_r0ugh_b523b2a1}==


Picker II

Description Can you figure out how this program works to get the flag?

Same as picker-I, but this time the word WIN is being filtered. Bypass the function by calling the flag directly.

==picoCTF{f1l73r5_f41l_c0d3_r3f4c70r_m1gh7_5ucc33d_b924e8e5}==


Picker III

Description Can you figure out how this program works to get the flag?

From what can conclude, we cannot put previous payload since it to long. But there is some bug that i can use where create a new variable and run the variable.

That is how it will work, but im stucking in displaying the flag.

TODO


GDB baby step 1

Description Can you figure out what is in the eax register at the end of the main function? Put your answer in the picoCTF flag format: picoCTF{n} where n is the contents of the eax register in the decimal number base. If the answer was 0x11 your flag would be picoCTF{17}. Disassemble this.

Checking into dissamble, the value 0x86342 being pass into eax.

==picoCTF{549698}==

GDB Baby Step 2

Simple words, open the gdb and set to Intel.

==picoCTF{307019}==

Forensics

WPA-ing Out

Description I thought that my password was super-secret, but it turns out that passwords passed over the AIR can be CRACKED, especially if I used the same wireless network password as one in the rockyou.txt credential dump. Use this 'pcap file' and the rockyou wordlist. The flag should be entered in the picoCTF{XXXXXX} format.

Initial Analysis

Open the pcap file and we notice protocol 802.11 which mean this is networking (Wi-Fi).

The challenge mention about password and wireless. We can use aircrack-ng to crack the password. aircrack-ng wpa-ing_out.pcap -w /usr/share/wordlists/rockyou.txt

==picoCTF{mickeymouse}==

Binary/Pwn

Local Target

Description Smash the stack Can you overflow the buffer and modify the other local variable? The program is available here. You can view the source here. And connect with it using: nc saturn.picoctf.net 57499

Initial Analysis

There was a condition to meet where the num need to be 65. But there was no input/call for variable num. Only have input for strings.

  1. Exploit directly using 16 + 8(since this 64 byte) = 24 char

  1. Using GDB (still new to me)

==picoCTF{l0c4l5_1n_5c0p3_fee8ef05}==


Picker IV

Description Can you figure out how this program works to get the flag? Connect to the program with netcat: $ nc saturn.picoctf.net 63096 The program's source code can be downloaded here. The binary can be downloaded here.

The PIE is unable which means the memory address will be fix every time program run.

Checking the source code

Got 2 function name as main and win. Briefly checking the main function, we known that we need to specifically enter address to jump/call.

It was direct and can be done using objdump objdump -d picker-IV| grep win

Supply the address to the input.

Using GDB

Payload will look like

==picoCTF{n3v3r_jump_t0_u53r_5uppl13d_4ddr35535_01672a61}==

Resources

Last updated