# PicoCTF 2018 Two-week long competition in Sept/October 2018 Had a fun little game environment for the challenges as well as text based  ## Overview Title | Category | Points | Flag -------------------------------------------------------------------------- | ---------------- | ------ | ------------------------------ [Warmup 1 ](#forensics-50-forensics-warmup-1) | Forensics | 50 | `picoCTF{welcome_to_forensics}` [Warmup 2 ](#forensics-50-forensics-warmup-2) | Forensics | 50 | `picoCTF{extensions_are_a_lie}` [Warmup 1 ](#general-skills-50-warmup-1) | General | 50 | `picoCTF{A}` [Warmup 2 ](#general-skills-50-warmup-2) | General | 50 | `picoCTF{11011}` [Warmup 3 ](#general-skills-50-warmup-3) | General | 50 | `picoCTF{61}` [Resources ](#general-skills-50-resources) | General | 50 | `picoCTF{xiexie_ni_lai_zheli}` [Warmup 1 ](#reversing-50-reversing-warmup-1) | Reversing | 50 | `picoCTF{welc0m3_t0_r3VeRs1nG}` [Warmup 2 ](#reversing-50-reversing-warmup-2) | Reversing | 50 | `picoCTF{th4t_w4s_s1mpL3i}` [Warmup 1 ](#cryptography-75-crypto-warmup-1) | Crypto | 75 | `picoCTF{SECRETMESSAGE}` [Warmup 2 ](#cryptography-75-crypto-warmup-2) | Crypto | 75 | `picoCTF{this_is_crypto!}` [grep 1 ](#general-skills-75-grep-1) | General | 75 | `picoCTF{grep_and_you_will_find_c709fa94}` [net cat ](#general-skills-75-net-cat) | General | 75 | `picoCTF{NEtcat_iS_a_NEcESSiTy_8b6a1fbc}` [HEEEEEEERE'S Johnny! ](#cryptography-100-heeeeeeeres-johnny) | Crypto | 100 | `picoCTF{J0hn_1$_R1pp3d_1b25af80}` [strings 1 ](#general-skills-100-strings) | General | 100 | `picoCTF{sTrIngS_sAVeS_Time_d3ffa29c}` [pipe ](#general-skills-110-pipe) | General | 110 | `picoCTF{almost_like_mario_b797f2b3}` [Inspect Me ](#web-exploitation-125-inspect-me) | Web | 125 | `picoCTF{ur_4_real_1nspect0r_g4dget_b4887011}` [grep 2 ](#general-skills-125-grep-2) | General | 125 | `picoCTF{grep_r_and_you_will_find_8eb84049}` [Aca-Shell-A ](#general-skills-150-aca-shell-a) | General | 150 | `picoCTF{CrUsHeD_It_4e355279}` [Client Side is still Bad ](#web-exploitation-150-client-side-is-still-bad) | Web | 150 | `picoCTF{client_is_bad_040594}` [Desrouleaux ](#forensics-150-desrouleaux) | Forensics | 150 | `picoCTF{J4y_s0n_d3rUUUULo_b6cacd6c}` [Logon ](#web-exploitation-150-logon) | Web | 150 | `picoCTF{l0g1ns_ar3nt_r34l_2a968c11}` [Reading between the eyes ](#forensics-150-reading-between-the-eyes) | Forensics | 150 | `picoCTF{r34d1ng_b37w33n_7h3_by73s}` [Recovering from the snap ](#forensics-150-recovering-from-the-snap) | Forensics | 150 | `picoCTF{th3_5n4p_happ3n3d}` [admin panel ](#forensics-150-admin-panel) | Forensics | 150 | `picoCTF{n0ts3cur3_894a6546}` [assembly-0 ](#reversing-150-assembly-0) | Reversing | 150 | `0x7a` [buffer overflow 0 ](#binary-exploitation-150-buffer-overflow-0) | Binary | 150 | `picoCTF{ov3rfl0ws_ar3nt_that_bad_b49d36d2}` [caesar cipher 1 ](#cryptography-150-caesar-cipher-1) | Crypto | 150 | `picoCTF{justagoodoldcaesarcipherwoyolfpu}` [environ ](#general-skills-150-environ) | General | 150 | `picoCTF{eNv1r0nM3nT_v4r14Bl3_fL4g_3758492}` [hertz ](#cryptography-150-hertz) | Crypto | 150 | `substitution_ciphers_are_solvable_mwettfesvn` [hex editor ](#forensics-150-hex-editor) | Forensics | 150 | `picoCTF{and_thats_how_u_edit_hex_kittos_3E03e57d}` [ssh-keyz ](#general-skills-150-ssh-keyz) | General | 150 | `picoCTF{who_n33ds_p4ssw0rds_38dj21}` [Irish Name Repo ](#web-exploitation-200-irish-name-repo) | Web | 200 | `picoCTF{con4n_r3411y_1snt_1r1sh_f58843c5}` [Mr. Robots ](#web-exploitation-200-mr-robots) | Web | 200 | `picoCTF{th3_w0rld_1s_4_danger0us_pl4c3_3lli0t_30de1}` [No Login ](#web-exploitation-200-no-login) | Web | 200 | `picoCTF{n0l0g0n_n0_pr0bl3m_50e16a5c}` [Secret Agent ](#web-exploitation-200-secret-agent) | Web | 200 | `picoCTF{s3cr3t_ag3nt_m4n_134ecd62}` [Truly an Artist ](#forensics-200-truly-an-artist) | Forensics | 200 | `picoCTF{look_in_image_788a182e}` [assembly-1 ](#reversing-200-assembly-1) | Reversing | 200 | `0x73` [be-quick-or-be-dead-1 ](#reversing-200-be-quick-or-be-dead-1) | Reversing | 200 | `picoCTF{why_bother_doing_unnecessary_computation_27f28e71}` [blaise's cipher ](#cryptography-200-blaises-cipher) | Crypto | 200 | `picoCTF{v1gn3r3_c1ph3rs_ar3n7_bad_cdf08bf0}` [buffer overflow 1 ](#binary-exploitation-200-buffer-overflow-1) | Binary | 200 | `picoCTF{addr3ss3s_ar3_3asy56a7b196}` [hertz 2 ](#cryptography-200-hertz-2) | Crypto | 200 | `picoCTF{substitution_ciphers_are_too_easy_sgsgtnpibo}` [leak-me ](#binary-exploitation-200-leak-me) | Binary | 200 | `picoCTF{aLw4y5_Ch3cK_tHe_bUfF3r_s1z3_d1667872}` [now you don't ](#forensics-200-now-you-dont) | Forensics | 200 | `picoCTF{n0w_y0u_533_m3}` [quackme ](#reversing-200-quackme) | Reversing | 200 | `picoCTF{qu4ckm3_9bcb819e}` [shellcode ](#binary-exploitation-200-shellcode) | Binary | 200 | `picoCTF{shellc0de_w00h00_9ee0edd0}` [what base is this? ](#general-skills-200-what-base-is-this) | General | 200 | `picoCTF{delusions_about_finding_values_602fd280}` [you can't see me ](#general-skills-200-you-cant-see-me) | General | 200 | `picoCTF{j0hn_c3na_paparapaaaaaaa_paparapaaaaaa_22f627d9}` [Buttons ](#web-exploitation-250-buttons) | Web | 250 | `picoCTF{button_button_whose_got_the_button_ed306c10}` [Ext Super Magic ](#forensics-250-ext-super-magic) | Forensics | 250 | `picoCTF{a7DB29eCf7dB9960f0A19Fdde9d00Af0}` [Lying Out ](#forensics-250-lying-out) | Forensics | 250 | `picoCTF{w4y_0ut_ff5bd19c}` [Safe RSA ](#cryptography-250-safe-rsa) | Crypto | 250 | `picoCTF{e_w4y_t00_sm411_81b6559f}` [The Vault ](#web-exploitation-250-the-vault) | Web | 250 | `picoCTF{w3lc0m3_t0_th3_vau1t_e4ca2258}` [What's My Name? ](#forensics-250-whats-my-name) | Forensics | 250 | `picoCTF{w4lt3r_wh1t3_2d6d3c6c75aa3be7f42debed8ad16e3b}` [absolutely relative ](#general-skills-250-absolutely-relative) | General | 250 | `picoCTF{3v3r1ng_1$_r3l3t1v3_a97be50e}` [assembly-2 ](#reversing-250-assembly-2) | Reversing | 250 | `0x188` [buffer overflow 2 ](#binary-exploitation-250-buffer-overflow-2) | Binary | 250 | `picoCTF{addr3ss3s_ar3_3asy1b78b0d8}` [caesar cipher 2 ](#cryptography-250-caesar-cipher-2) | Crypto | 250 | `picoCTF{cAesaR_CiPhErS_juST_aREnT_sEcUrE}` [got-2-learn-libc ](#binary-exploitation-250-got-2-learn-libc) | Binary | 250 | [rsa-madlibs ](#cryptography-250-rsa-madlibs) | Crypto | 250 | `picoCTF{d0_u_kn0w_th3_w@y_2_RS@_5d383e10}` [be-quick-or-be-dead-2 ](#reversing-275-be-quick-or-be-dead-2) | Reversing | 272 | [in out error ](#general-skills-275-in-out-error) | General | 275 | `picoCTF{p1p1ng_1S_4_7h1ng_b6f5a788}` [Artisinal Handcrafted HTTP 3](#web-exploitation-300-artisinal-handcrafted-http-3) | Web | 300 | `picoCTF{0nLY_Us3_n0N_GmO_xF3r_pR0tOcol5_72f2}` [SpyFi ](#cryptography-300-spyfi) | Crypto | 300 | `picoCTF{@g3nt6_1$_th3_c00l3$t_3355197}` [echooo ](#binary-exploitation-300-echooo) | Binary | 300 | `picoCTF{foRm4t_stRinGs_aRe_DanGer0us_254148ae}` [learn gdb ](#general-skills-300-learn-gdb) | General | 300 | `picoCTF{gDb_iS_sUp3r_u53fuL_66d5464d}` [Flaskcards ](#web-exploitation-350-flaskcards) | Web | 350 | `picoCTF{secret_keys_to_the_kingdom_e8a55760}` [Super Safe RSA ](#cryptography-350-super-safe-rsa) | Crypto | 350 | `picoCTF{us3_l@rg3r_pr1m3$_1850}` [authenticate ](#binary-exploitation-350-authenticate) | Binary | 350 | [core ](#forensics-350-core) | Forensics | 350 | `picoCTF{abb6a3b2603654804ed357322c760510}` [got-shell? ](#binary-exploitation-350-got-shell) | Binary | 350 | [rop chain ](#binary-exploitation-350-rop-chain) | Binary | 350 | [roulette ](#general-skills-350-roulette) | General | 350 | [Malware Shops ](#forensics-400-malware-shops) | Forensics | 400 | `picoCTF{w4y_0ut_dea1794b}` [Radix's Terminal ](#reversing-400-radixs-terminal) | Reversing | 400 | `picoCTF{bAsE_64_eNCoDiNg_iS_EAsY_41799451}` [assembly-3 ](#reversing-400-assembly-3) | Reversing | 400 | `0x56a3` [eleCTRic ](#cryptography-400-electric) | Crypto | 400 | `picoCTF{alw4ys_4lways_Always_check_int3grity_c469e9ba}` [fancy-alive-monitoring ](#web-exploitation-400-fancy-alive-monitoring) | Web | 400 | [keygen-me-1 ](#reversing-400-keygen-me-1) | Reversing | 400 | [store ](#general-skills-400-store) | General | 400 | [Super Safe RSA 2 ](#cryptography-425-super-safe-rsa-2) | Crypto | 425 | `picoCTF{w@tch_y0ur_Xp0n3nt$_c@r3fu11y_6498999}` [Magic Padding Oracle ](#cryptography-450-magic-padding-oracle) | Crypto | 450 | [buffer overflow 3 ](#binary-exploitation-450-buffer-overflow-3) | Binary | 450 | [Secure Logon ](#web-exploitation-500-secure-logon) | Web | 500 | `picoCTF{fl1p_4ll_th3_bit3_a6396679}` [script me ](#general-skills-500-script-me) | General | 500 | [LoadSomeBits ](#forensics-550-loadsomebits) | Forensics | 550 | `picoCTF{st0r3d_iN_tH3_l345t_s1gn1f1c4nT_b1t5_882756901}` [assembly-4 ](#reversing-550-assembly-4) | Reversing | 550 | `picoCTF{1_h0p3_y0u_c0mP1l3d_tH15_94698637}` [Flaskcards Skeleton Key ](#web-exploitation-600-flaskcards-skeleton-key)| Web | 600 | `picoCTF{1_id_to_rule_them_all_d77c1ed6} ` [Help Me Reset ](#web-exploitation-600-help-me-reset) | Web | 600 | `picoCTF{i_thought_i_could_remember_those_34745314}` [special-pw ](#reversing-600-special-pw) | Reversing | 600 | [Super Safe RSA 3 ](#cryptography-600-super-safe-rsa-3) | Crypto | 600 | `picoCTF{p_&_q_n0_r_$_t!!_6629910}` [A Simple Question ](#web-exploitation-650-a-simple-question) | Web | 650 | `picoCTF{qu3stions_ar3_h4rd_d3850719}` [James Brahm Returns ](#cryptography-700-james-brahm-returns) | Cryptography | 700 | [LambDash 3 ](#web-exploitation-800-lambdash-3) | Web | 800 | [Dog or Frog ](#general-skills-900-dog-or-frog) | General | 900 | [Flaskcards and Freedom ](#web-exploitation-900-flaskcards-and-freedom)| Web | 900 | `picoCTF{R_C_E_wont_let_me_be_85e92c3a}` ## Forensics 50: Forensics Warmup 1 **Challenge** Can you unzip [this file](writeupfiles/flag.zip) for me and retreive the flag? **Solution** we unzip to find an image:  **Flag** ``` picoCTF{welcome_to_forensics} ``` ## Forensics 50: Forensics Warmup 2 **Challenge** Hmm for some reason I can't open [this PNG](writeupfiles/flag.png)? Any ideas? **Solution** Turns out the file isn't actually a png file (though gimp will open it even with the wrong extension) ```bash $ file flag.png flag.png: JPEG image data, JFIF standard 1.01, resolution (DPI), density 75x75, segment length 16, baseline, precision 8, 909x190, frames 3 ```  **Flag** ``` picoCTF{extensions_are_a_lie} ``` ## General Skills 50: Warmup 1 **Challenge** If I told you your grade was `0x41` in hexadecimal, what would it be in ASCII? **Solution** ```python >>> chr(int('41',16)) 'A' ``` **Flag** ``` picoCTF{A} ``` ## General Skills 50: Warmup 2 **Challenge** **Solution** ```python >>> bin(27) '0b11011' ``` **Flag** ``` picoCTF{11011} ``` ## General Skills 50: Warmup 3 **Challenge** What is 0x3D (base 16) in decimal (base 10). **Solution** ```python >>> int('3D',16) 61 ``` **Flag** ``` picoCTF{61} ``` ## General Skills 50: Resources **Challenge** We put together a bunch of resources to help you out on our website! If you go over there, you might even find a flag! https://picoctf.com/resources **Solution** flag was just written on the page **Flag** ``` picoCTF{xiexie_ni_lai_zheli} ``` ## Reversing 50: Reversing Warmup 1 **Challenge** Throughout your journey you will have to run many programs. Can you navigate to `/problems/reversing-warmup-1_0_f99f89de33522c93964bdec49fb2b838` on the shell server and run [this program](writeupfiles/run) to retreive the flag? **Solution** ```bash $ ssh ysje@2018shell1.picoctf.com picoCTF{who_n33ds_p4ssw0rds_38dj21} Welcome ysje! Your shell server account has been created. Please press enter and reconnect. ``` We see a flag there but its not for this challenge ```bash $ cd /problems/reversing-warmup-1_0_f99f89de33522c93964bdec49fb2b838 $ ./run picoCTF{welc0m3_t0_r3VeRs1nG} ``` or ```bash $ strings run | grep picoCTF picoCTF{welc0m3_t0_r3VeRs1nG} ``` **Flag** ``` picoCTF{welc0m3_t0_r3VeRs1nG} ``` ## Reversing 50: Reversing Warmup 2 **Challenge** Can you decode the following string `dGg0dF93NHNfczFtcEwz` from base64 format to ASCII? **Solution** ```python >>> import base64 >>> base64.b64decode('dGg0dF93NHNfczFtcEwz') 'th4t_w4s_s1mpL3' ``` **Flag** ``` picoCTF{th4t_w4s_s1mpL3} ``` ## Cryptography 75: Crypto Warmup 1 **Challenge** Crpyto can often be done by hand, here's a message you got from a friend, `llkjmlmpadkkc` with the key of `thisisalilkey`. Can you use this table to solve it?. ``` A B C D E F G H I J K L M N O P Q R S T U V W X Y Z +---------------------------------------------------- A | A B C D E F G H I J K L M N O P Q R S T U V W X Y Z B | B C D E F G H I J K L M N O P Q R S T U V W X Y Z A C | C D E F G H I J K L M N O P Q R S T U V W X Y Z A B D | D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E | E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F | F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G | G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H | H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I | I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J | J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K | K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L | L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M | M N O P Q R S T U V W X Y Z A B C D E F G H I J K L N | N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O | O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P | P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q | Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R | R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S | S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T | T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U | U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V | V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W | W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X | X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y | Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z | Z A B C D E F G H I J K L M N O P Q R S T U V W X Y ``` **Solution** Looks like vigenere, **Flag** ``` picoCTF{SECRETMESSAGE} ``` ## Cryptography 75: Crypto Warmup 2 **Challenge** Cryptography doesn't have to be complicated, have you ever heard of something called rot13? `cvpbPGS{guvf_vf_pelcgb!}` **Solution** ```python >>> 'cvpbPGS{guvf_vf_pelcgb!}'.decode('rot13') u'picoCTF{this_is_crypto!}' ``` **Flag** ``` picoCTF{this_is_crypto!} ``` ## General Skills 75: grep 1 **Challenge** Can you find the flag in [file](writeupfiles/file)? This would be really obnoxious to look through by hand, see if you can find a faster way. **Solution** ```bash $ grep "picoCTF" file picoCTF{grep_and_you_will_find_c709fa94} ``` **Flag** ``` picoCTF{grep_and_you_will_find_c709fa94} ``` ## General Skills 75: net cat **Challenge** Using netcat (nc) will be a necessity throughout your adventure. Can you connect to `2018shell1.picoctf.com` at port `49387` to get the flag? **Solution** ```bash $ nc 2018shell1.picoctf.com 49387 That wasn't so hard was it? picoCTF{NEtcat_iS_a_NEcESSiTy_8b6a1fbc} ``` **Flag** ``` picoCTF{NEtcat_iS_a_NEcESSiTy_8b6a1fbc} ``` ## Cryptography 100: HEEEEEEERE'S Johnny! **Challenge** Okay, so we found some important looking files on a linux computer. Maybe they can be used to get a password to the process. Connect with `nc 2018shell1.picoctf.com 40157`. Files can be found here: [passwd](writeupfiles/passwd) [shadow](writeupfiles/shadow). **Solution** We use a combination of unshadow and john the ripper to find the password ``` $ unshadow passwd shadow > crackme $ john crackme Created directory: /home/saskia/.john Loaded 1 password hash (crypt, generic crypt(3) [?/64]) Press 'q' or Ctrl-C to abort, almost any other key for status password1 (root) 1g 0:00:00:01 100% 2/3 0.5102g/s 469.3p/s 469.3c/s 469.3C/s 123456..pepper Use the "--show" option to display all of the cracked passwords reliably Session completed ``` So we know the password for the root user is `password1`. We use that to log into the server ```bash $ nc 2018shell1.picoctf.com 40157 Username: root Password: password1 picoCTF{J0hn_1$_R1pp3d_1b25af80} ``` **Flag** ``` picoCTF{J0hn_1$_R1pp3d_1b25af80} ``` ## General Skills 100: strings **Challenge** Can you find the flag in [this file](writeupfiles/strings) without actually running it? You can also find the file in `/problems/strings_4_40d221755b4a0b134c2a7a2e825ef95f` on the shell server. **Solution** ```bash $ strings strings | grep picoCTF picoCTF{sTrIngS_sAVeS_Time_d3ffa29c} ``` **Flag** ``` picoCTF{sTrIngS_sAVeS_Time_d3ffa29c} ``` ## GEneral Skills 110: pipe **Challenge** During your dventure, you will likely encounter a situation where you need to process data that you receive over the network rather than through a file. Can you find a way to save the output from this program and search for the flag? Connect with `2018shell1.picoctf.com 34532`. **Solution** We connect via netcat and are flooded with messages ```bash $ nc 2018shell1.picoctf.com 34532 Unfortunately this is also not a flag This is not a flag This is not a flag I'm sorry you're going to have to look at another line I'm sorry you're going to have to look at another line I'm sorry you're going to have to look at another line Unfortunately this is also not a flag I'm sorry you're going to have to look at another line I'm sorry you're going to have to look at another line I'm sorry you're going to have to look at another line Unfortunately this is also not a flag I'm sorry you're going to have to look at another line Unfortunately this is also not a flag This is not a flag [..] ``` So we do a grep: ```bash $ nc 2018shell1.picoctf.com 34532 | grep picoCTF picoCTF{almost_like_mario_b797f2b3} ``` **Flag** ``` picoCTF{almost_like_mario_b797f2b3} ``` ## Web Exploitation 125: Inspect Me **Challenge** **Solution** We check the source: ```html
This is my first website!
These are the web skills I've been practicing:
HTML
CSS
JS (JavaScript)
Welcome to the Secure Login Server.
Please enter your credentials to proceed
Flag: picoCTF{s3cr3t_ag3nt_m4n_134ecd62}
Your flag is: $FLAG
"; } else { echo "Hello Real Business Employee! Today's flag is: picoCTF{0nLY_Us3_n0N_GmO_xF3r_pR0tOcol5_72f2}
.