# H4K-IT CTF 2020 ![](https://i.imgur.com/uw9czmG.png) ### **First Challenge: ROT** We're given a zipfile and when we unzip we get a txt file with some rotated text and a hint that states the flagformat. ``` ┌──(mugenjutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ cat rot.txt as easy as : z4c{c33hk_j0lslafy}al flag format h4k{string}it ``` Based on the challenge name, i thought of trying out ROT13, but that wasn't it. So i decided to use caesar instead to loop through all the 26 rotations. And if you don't have rot13 or caesar, you can get the `bsdgames` package. `sudo apt install bsdgames` Alright, let's do it. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ for i in {1..26}; do echo -n "rot$i: "; echo "z4c{c33hk_j0lslafy}al" | caesar $i; done rot1: a4d{d33il_k0mtmbgz}bm rot2: b4e{e33jm_l0nuncha}cn rot3: c4f{f33kn_m0ovodib}do rot4: d4g{g33lo_n0pwpejc}ep rot5: e4h{h33mp_o0qxqfkd}fq rot6: f4i{i33nq_p0ryrgle}gr rot7: g4j{j33or_q0szshmf}hs rot8: h4k{k33ps_r0tating}it rot9: i4l{l33qt_s0ubujoh}ju rot10: j4m{m33ru_t0vcvkpi}kv rot11: k4n{n33sv_u0wdwlqj}lw rot12: l4o{o33tw_v0xexmrk}mx rot13: m4p{p33ux_w0yfynsl}ny rot14: n4q{q33vy_x0zgzotm}oz rot15: o4r{r33wz_y0ahapun}pa rot16: p4s{s33xa_z0bibqvo}qb rot17: q4t{t33yb_a0cjcrwp}rc rot18: r4u{u33zc_b0dkdsxq}sd rot19: s4v{v33ad_c0eletyr}te rot20: t4w{w33be_d0fmfuzs}uf rot21: u4x{x33cf_e0gngvat}vg rot22: v4y{y33dg_f0hohwbu}wh rot23: w4z{z33eh_g0ipixcv}xi rot24: x4a{a33fi_h0jqjydw}yj rot25: y4b{b33gj_i0krkzex}zk rot26: z4c{c33hk_j0lslafy}al ``` We get the flag at the 8th rotation. So, my way of doing this was using `rotpro`, which is a huuuge function i've been scripting for a week...you throw numbers and letters at it and it gives you the flag...nuuuh i'm kiddin xD. What it does is, it will look through the entire dir for the flagformat specified, ignoring an actual format e.g a hint with a flag description and do the rotation with caesar, grep the flag out and print it for you on terminal. Hope that makes sense. The syntax for this function is `rotpro <placement> <flagformat>`. Placement is, the order in which the flag format appears to be e.g `flag{.*}` or `flag{.*}text`. If the placement is one numerical only, then it knows the format is `flag{.*}`, and when the placement is two numericals, then it knows the flag format is `flag{.*}text`. In this case, the placement will be 3,2 coz the flag format is `h4k{.*}it`. Hope that makes sense. Cool, let's try it out. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ ls rot.txt rot.zip ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ cat rot.txt as easy as : z4c{c33hk_j0lslafy}al flag format h4k{string}it ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ rotpro 3,2 h4k h4k{k33ps_r0tating}it ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/rot_COMPLETE] └─$ ls flag rot.txt rot.zip ``` Easy! It will also save the flag in a file, just for future reference. ### **Second Challenge: Exfil** We're given a zipfile, and when you unzip, you get a txt file with some weird text. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ cat challenge1.txt UEsDBDMDAQBjACeRh1EAAAAALAAAABgAAAAIAAsAZmxhZy50eHQBmQcAAgBBRQEAACEQrnERJbHL DofiJcxRHEOADyj2dDqDBDerbEtnJZciDnWyZSx+vXyYudZOUEsBAj8DMwMBAGMAJ5GHUQAAAAAs AAAAGAAAAAgALwAAAAAAAAAggKSBAAAAAGZsYWcudHh0CgAgAAAAAAABABgAgPIA7KrM1gEAgeq8 qszWAYDyAOyqzNYBAZkHAAIAQUUBAABQSwUGAAAAAAEAAQBlAAAAXQAAAAAA ``` Tried to base64 decode the text aaand... ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ base64 -d challenge1.txt PK3c'��Q, flag.txt�AE!�q%����%�QC�(�t:�7�lKg%�"u�e,~�|���NPK?3c'��Q/ ���flag.txt ������꼪��������AEPKe ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ base64 -d challenge1.txt > extracted.zip ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ file extracted.zip extracted.zip: Zip archive data, at least v5.1 to extract ``` We get a zipfile. When you do a bunch of CTFs, you can tell that it's a zipfile coz of the `PK` header. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ unzip extracted.zip Archive: extracted.zip skipping: flag.txt need PK compat. v5.1 (can do v4.6) ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/Exfil_COMPLETE] └─$ 7z e extracted.zip 81 ⨯ 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (40651),ASM,AES-NI) Scanning the drive for archives: 1 file, 216 bytes (1 KiB) Extracting archive: extracted.zip -- Path = extracted.zip Type = zip Physical Size = 216 Enter password (will not be echoed): ERROR: Wrong password : flag.txt Sub items Errors: 1 Archives with Errors: 1 Sub items Errors: 1 ``` Unzip doesn't extract the file because of the file version but 7z does and interestingly enough, the file is encrypted. I have a custom tool(still in dev) that automatically cracks zipfiles. ``` mug3njutsu🧑‍💻⛩ ~> czip Using default input encoding: UTF-8 Will run 4 OpenMP threads Press Ctrl-C to abort, or send SIGUSR1 to john process for status 1g 0:00:00:00 DONE (2022-04-05 20:18) 1.538g/s 12603p/s 12603c/s 12603C/s 123456..total90 Use the "--show" option to display all of the cracked passwords reliably Session completed. 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i3-4005U CPU @ 1.70GHz (40651),ASM,AES-NI) Scanning the drive for archives: 1 file, 216 bytes (1 KiB) Extracting archive: extracted.zip -- Path = extracted.zip Type = zip Physical Size = 216 Everything is Ok Size: 24 Compressed: 216 challenge1.txt flag.txt hash pass mug3njutsu🧑‍💻⛩ ~> !cat flag.txt h4k{easy_exfiltration}it ``` Nice and easy! ### **Third Challenge: Etator** This is more straight forward than Exfil. Coz you just extract a zip file and it will give you a txt file that kinda has the flag. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ unzip Etator.zip Archive: Etator.zip extracting: flag.txt ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ cat flag.txt u4x{a0vp3_j0eX_s1aqvat_z3_u3e3} ``` Let's try ROT13 as a low hanging fruit..it might work. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ cat flag.txt| rot13 h9k{n5ic8_w5rK_f6nding_m8_h8r8} ``` Yeap! I fell for this at first..lmao. That's not the flag. When i use caesar though, i get the actual flag. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ for i in {1..26}; do echo -n "rot$i: "; echo "u4x{a0vp3_j0eX_s1aqvat_z3_u3e3}" | caesar $i; done rot1: v4y{b0wq3_k0fY_t1brwbu_a3_v3f3} rot2: w4z{c0xr3_l0gZ_u1csxcv_b3_w3g3} rot3: x4a{d0ys3_m0hA_v1dtydw_c3_x3h3} rot4: y4b{e0zt3_n0iB_w1euzex_d3_y3i3} rot5: z4c{f0au3_o0jC_x1fvafy_e3_z3j3} rot6: a4d{g0bv3_p0kD_y1gwbgz_f3_a3k3} rot7: b4e{h0cw3_q0lE_z1hxcha_g3_b3l3} rot8: c4f{i0dx3_r0mF_a1iydib_h3_c3m3} rot9: d4g{j0ey3_s0nG_b1jzejc_i3_d3n3} rot10: e4h{k0fz3_t0oH_c1kafkd_j3_e3o3} rot11: f4i{l0ga3_u0pI_d1lbgle_k3_f3p3} rot12: g4j{m0hb3_v0qJ_e1mchmf_l3_g3q3} rot13: h4k{n0ic3_w0rK_f1nding_m3_h3r3} rot14: i4l{o0jd3_x0sL_g1oejoh_n3_i3s3} rot15: j4m{p0ke3_y0tM_h1pfkpi_o3_j3t3} rot16: k4n{q0lf3_z0uN_i1qglqj_p3_k3u3} rot17: l4o{r0mg3_a0vO_j1rhmrk_q3_l3v3} rot18: m4p{s0nh3_b0wP_k1sinsl_r3_m3w3} rot19: n4q{t0oi3_c0xQ_l1tjotm_s3_n3x3} rot20: o4r{u0pj3_d0yR_m1ukpun_t3_o3y3} rot21: p4s{v0qk3_e0zS_n1vlqvo_u3_p3z3} rot22: q4t{w0rl3_f0aT_o1wmrwp_v3_q3a3} rot23: r4u{x0sm3_g0bU_p1xnsxq_w3_r3b3} rot24: s4v{y0tn3_h0cV_q1yotyr_x3_s3c3} rot25: t4w{z0uo3_i0dW_r1zpuzs_y3_t3d3} rot26: u4x{a0vp3_j0eX_s1aqvat_z3_u3e3} ``` To be honest, i have no clue what's going on here..maybe the letters keep rotating, i don't know. Let's use `rotpro`. And for this, i'm going to use a function called `cord` that just runs `strings -n 8 $filename` and it tags along `rotpro` at times coz it doesn't work as expected when there's a file that has the flag in the metadata...like when i run strings on the zipfile, i get the same flag that's in the txt file. I'll have to work my way around that. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ ls Etator.zip flag.txt ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ cat flag.txt u4x{a0vp3_j0eX_s1aqvat_z3_u3e3} ┌──(codaholikid㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/etator_COMPLETE] └─$ cord flag.txt rotpro 3 h4k h4k{n0ic3_w0rK_f1nding_m3_h3r3} Classic! ``` ### **Fourth Challenge: Pass Me** For this we're given a java file. ```java= import java.util.*; class Vault { public static void main(String arg[]) { Vault vault = new Vault(); Scanner scanner = new Scanner(System.in); System.out.println("Enter the password: "); String userInput = scanner.next(); String input = userInput.substring("h4k{".length(),userInput.length()-1); if (vault.checkPassword(input)) { System.out.println("Access Granted"); } else { System.out.println("Access Denied"); } } //I came up with a more secure way to check the password without putting //the password itself in the source code. I think this is going to be UNHACKABLE! //I hope Dr.XPLOITER agrees.... // // xploiter#0291 public boolean checkPassword(String password) { return password.length() == 10 && password.charAt(0) == "d" && password.charAt(10) == "}" && password.charAt(2) == "5" && password.charAt(5) == "a" && password.charAt(1) == "3" && password.charAt(3) == "c" && password.charAt(7) == "b" && password.charAt(9) == "3" && password.charAt(4) == "r" && password.charAt(6) == "m" && password.charAt(8) == "l"; } } ``` What i'm most interested in is the string input and the return function. ```java= String input = userInput.substring("h4k{".length(),userInput.length()-1); ``` From my understanding, this says that the password starts with "h4k{" and the rest of the password is of a certain length that we don't know yet. But when you look at the return function... ```java= return password.length() == 10 && password.charAt(0) == "d" && password.charAt(10) == "}" && password.charAt(2) == "5" && password.charAt(5) == "a" && password.charAt(1) == "3" && password.charAt(3) == "c" && password.charAt(7) == "b" && password.charAt(9) == "3" && password.charAt(4) == "r" && password.charAt(6) == "m" && password.charAt(8) == "l"; ``` From this, we know that the password length is 11 because it starts from zero, and that's inclusive of the closing squiggly bracket. Alright, let's script this. ```python= #!/usr/bin/env python3 # @author : mug3njutsu password = [0]*11 password[0] = "d" password[10] = "}" password[2] = "5" password[5] = "a" password[1] = "3" password[3] = "c" password[7] = "b" password[9] = "3" password[4] = "r" password[6] = "m" password[8] = "l" print("h4k{%s" % "".join(password)) ``` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/pass me_COMPLETE] └─$ python3 ape.py h4k{d35crambl3} ``` And just like that, you get the flag. ### **Fifth Challenge: Canvas** We're given a png file. I ran everything from exiftool to look for a comment, zsteg, binwalk, stegoveritas and found an interesting output from `zsteg` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/canvas_COMPLETE] └─$ zsteg -a canvas.png b1,r,lsb,xy .. text: "BBBFFBBBBFFFFFFFBFFBBFBFFBFFBFFFFFFFFBFFFFBBFBBFBBFBBFFFFFFFFBBBB@" b1,r,msb,xy .. text: "BBBbbBBBBbbbbbbbBbbBBbBbbBbbBbbbbbbbbBbbbbBBbBBbBBbBBbbbbbbbbBBBB" b1,rgb,lsb,xy .. text: "00100010 01101000 00110100 01101011 01111011 01010011 01110100 01100101 01100111 01100001 01011111 01101001 01110011 01011111 00110001 00110011 00110011 00110111 01111101 01101001 01110100 00100010" ``` We get some binary. Let's decode that with python. ```python= #!/usr/bin/env python3 # @author: mug3njutsu binary = "00100010 01101000 00110100 01101011 01111011 01010011 01110100 01100101 01100111 01100001 01011111 01101001 01110011 01011111 00110001 00110011 00110011 00110111 01111101 01101001 01110100 00100010".split() flag = [int(a, 2) for a in binary] print("".join(map(chr, flag))) ``` Running this, gives us the flag! ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/canvas_COMPLETE] └─$ python3 ape.py "h4k{Stega_is_1337}it" ``` ### **Sixth Challenge: Dig_Mal** We're given a zipfile, and when we unzip, we get a jpg file. First thing i like to do is running binwalk, and this will tell me if i have to run like `steghide` or i need to extract the contents using binwalk. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ binwalk mal.jpeg DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 0 0x0 JPEG image data, JFIF standard 1.01 ``` When you do a bunch of ctfs, you'll notice that, challenges that involve `steghide` or `stegseek` and the likes, have such output. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ steghide --extract -sf mal.jpeg Enter passphrase: wrote extracted data to "flag.txt". ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ cat flag.txt I am based on area 64 , then I will rotate to any rotation I need so as to unveil my self! YTRke2tobXRteF9mM19tMF9uZ28zYmVfZjN9Cg== Good LUCK! ``` Running that with an empty password, extracts a file called flag.txt with a base64 encoded text. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ echo -n "YTRke2tobXRteF9mM19tMF9uZ28zYmVfZjN9Cg==" | base64 -d a4d{khmtmx_f3_m0_ngo3be_f3} ``` Decoding it you get a rotated text. As always, i'll use caesar to loop through the 26 rotations. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ for i in {1..26}; do echo -n "rot$i: "; echo "a4d{khmtmx_f3_m0_ngo3be_f3}" | caesar $i; done rot1: b4e{linuny_g3_n0_ohp3cf_g3} rot2: c4f{mjovoz_h3_o0_piq3dg_h3} rot3: d4g{nkpwpa_i3_p0_qjr3eh_i3} rot4: e4h{olqxqb_j3_q0_rks3fi_j3} rot5: f4i{pmryrc_k3_r0_slt3gj_k3} rot6: g4j{qnszsd_l3_s0_tmu3hk_l3} rot7: h4k{rotate_m3_t0_unv3il_m3} rot8: i4l{spubuf_n3_u0_vow3jm_n3} rot9: j4m{tqvcvg_o3_v0_wpx3kn_o3} rot10: k4n{urwdwh_p3_w0_xqy3lo_p3} rot11: l4o{vsxexi_q3_x0_yrz3mp_q3} rot12: m4p{wtyfyj_r3_y0_zsa3nq_r3} rot13: n4q{xuzgzk_s3_z0_atb3or_s3} rot14: o4r{yvahal_t3_a0_buc3ps_t3} rot15: p4s{zwbibm_u3_b0_cvd3qt_u3} rot16: q4t{axcjcn_v3_c0_dwe3ru_v3} rot17: r4u{bydkdo_w3_d0_exf3sv_w3} rot18: s4v{czelep_x3_e0_fyg3tw_x3} rot19: t4w{dafmfq_y3_f0_gzh3ux_y3} rot20: u4x{ebgngr_z3_g0_hai3vy_z3} rot21: v4y{fchohs_a3_h0_ibj3wz_a3} rot22: w4z{gdipit_b3_i0_jck3xa_b3} rot23: x4a{hejqju_c3_j0_kdl3yb_c3} rot24: y4b{ifkrkv_d3_k0_lem3zc_d3} rot25: z4c{jglslw_e3_l0_mfn3ad_e3} rot26: a4d{khmtmx_f3_m0_ngo3be_f3} ``` `rotpro`..why not. Again, just coz there's a zipfile, i'm going to tag along `cord`. The placement here is 3 coz just because the flagformat is `h4k{.*}` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ echo -n "YTRke2tobXRteF9mM19tMF9uZ28zYmVfZjN9Cg==" | base64 -d > rotated ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/dig_mal_COMPLETE] └─$ cord rotated rotpro 3 h4k h4k{rotate_m3_t0_unv3il_m3} Classic! ``` ### **Seventh Challenge: Hide** We're given a zipfile with a jpg file. Like before, i'll run binwalk just to know what the challenge entails. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/hide_COMPLETE] └─$ binwalk download.jpeg DECIMAL HEXADECIMAL DESCRIPTION -------------------------------------------------------------------------------- 0 0x0 JPEG image data, JFIF standard 1.01 ``` It seems it's a steghide challenge. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/hide_COMPLETE] └─$ steghide --extract -sf download.jpeg Enter passphrase: steghide: could not extract any data with that passphrase! ``` But we need a password to extract the contents. I'll use `stegseek` just because it's incredibly first and no other tool gets close to its capabilities. And if you want to know, have a look at this: | password | Line | Stegseek | StegCracker | StegBrute | | -------- | ---- | -------- | ----------- | --------- | |"cassandra" | 1 000 | 0.05s | 3.1s | 0.7s | | "kupal" | 10 000 | 0.05s | 14.4s | 7.1s | | "sagar" | 100 000 | 0.09s | 2m23.0s | 1m21.9s | | "budakid1" | 1 000 000 | 0.73s | [p] 23m50.0s | 13m45.7s | ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/hide_COMPLETE] └─$ stegseek download.jpeg /usr/share/wordlists/rockyou.txt -xf flag.txt StegSeek version 0.5 Progress: 0.00% (0 bytes) [i] --> Found passphrase: "1234" [i] Original filename: "flag.txt" [i] Extracting to "flag.txt" ┌──(codaholikid㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/hide_COMPLETE] └─$ cat flag.txt h4k{1337_flag}it ``` Easy! ### **Eighth Challenge: Invisible** We're given a zipfile and when we unzip we get a txt file with whitespace in it. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/invisible_COMPLETE] └─$ cat invisible.txt Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ``` Yeap...stegsnow! ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/invisible_COMPLETE] └─$ stegsnow -C invisible.txt h4k{invisible}it ``` Done! ### **Ninth Challenge: f3rn3t_python** We're given a zipfile and when we unzip, we get a txt file with some random strings. ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/f3rn3t_python_COMPLETE] └─$ cat flag.txt b'5EPXqeTFk_WglhfwbVxRtHg_whDDFFG4s5W3FSeYsvI=' b'gAAAAABfxnv03ivN35q72kVIJGlOwwHNEd_eRUZstGO1IndH3FBG4dFE5uDDgKdswUykXDTHd3CZ6Tb5cFYOuvj0uW6hgCOSYo-zvbue2iqL6vSZgiYJtlE=' ``` Made a quick and easy python script to decode this and get the flag. ```python= #!/usr/bin/env python3 # @author: mug3njutsu from cryptography.fernet import Fernet key = b"5EPXqeTFk_WglhfwbVxRtHg_whDDFFG4s5W3FSeYsvI=" f = Fernet(key) token = b"gAAAAABfxnv03ivN35q72kVIJGlOwwHNEd_eRUZstGO1IndH3FBG4dFE5uDDgKdswUykXDTHd3CZ6Tb5cFYOuvj0uW6hgCOSYo-zvbue2iqL6vSZgiYJtlE=" flag = f.decrypt(token) print(flag.decode()) ``` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/f3rn3t_python_COMPLETE] └─$ python3 ape.py h4k{I_am_F3rnet_m4st3r_n0w} ``` You could also use this resource <a href="https://asecuritysite.com/encryption/ferdecode">Fernet Decode</a> to get the flag. ### **Tenth Challenge: Payload** You're given a zipfile and unzipping it gives you an apk file. I just ran strings..lmao. But, if you wanted to decompile the apk, you could run `apktool d <apkfile>` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/payload_COMPLETE] └─$ strings -n 8 payload.apk AndroidManifest.xml resources.arsccb classes.dex the flag is donw below b'nAIje_Gt2cCmfMskzX_lP8-CHvfLb02ZCdej85V1Mg0=' b'gAAAAABf0T3KM0KVOV9BMirSenGH_aJl10s4PpjYX7p_emYwLGCop9dOPsiJsI7CqAlvSEy4YHQIn-SbG8c7w_rn3H1Sizx8fmvRd7kf06nvV7Psv5_xFpw=' F&`1UU[U Look for f3rn3t@n M8aDy(/W META-INF/PK META-INF/MANIFEST.MF] META-INF/SIGNFILE.SF] META-INF/SIGNFILE.RSA3hb #V(>-t=7 AndroidManifest.xmlPK resources.arscPK classes.dexPK META-INF/PK META-INF/MANIFEST.MFPK META-INF/SIGNFILE.SFPK META-INF/SIGNFILE.RSAPK ``` Looks like fernet again. Used the script from the other challenge to get the flag. ```python= #!/usr/bin/env python3 # @author: mug3njutsu from cryptography.fernet import Fernet key = b'nAIje_Gt2cCmfMskzX_lP8-CHvfLb02ZCdej85V1Mg0=' f = Fernet(key) token = b'gAAAAABf0T3KM0KVOV9BMirSenGH_aJl10s4PpjYX7p_emYwLGCop9dOPsiJsI7CqAlvSEy4YHQIn-SbG8c7w_rn3H1Sizx8fmvRd7kf06nvV7Psv5_xFpw=' flag = f.decrypt(token) print(flag.decode()) ``` ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/payload_COMPLETE] └─$ python3 ape.py h4k{n0ic3_f0r3ns1cs_sk1ll5} ``` Easy stuff! ### **Eleventh Challenge: Hash** We're given a hint that says: ```I hashed h4k{[word]}it - my word has a captial letter, two lowercase letters, a number, and an underscore. Here's the md5 hash : 7c046d807e3e0d026ae22f2a3d1b60f8``` I've seen the exact challenge before in a writeup, and the solution was a ruby script that will guess, quote in quote, more like iterate, the string that's inbetween the flag format. ```ruby= #!/usr/bin/env ruby require 'digest/md5' $my_hash = "7c046d807e3e0d026ae22f2a3d1b60f8" def attempt(guess) if Digest::MD5.hexdigest("h4k{#{guess}}it") == $my_hash then puts "Flag: h4k{#{guess}}it" exit end end #A capital letter, two lowercase letters, a number, and an underscore. e = '_' for a in "A".."Z" for b in "a".."z" for c in "a".."z" for d in "0".."9" permutes = [a, b, c, d, e].permutation.map &:join for guess in permutes attempt(guess) end end end end puts "a=" + a end ``` Like so. And when we run this... ``` ┌──(mug3njutsu㉿Lenovo-Ideapad)-[~/ctf/h4k-it ctf/hash_COMPLETE] └─$ ruby ape.rb a=A a=B a=C a=D Flag: h4k{w0w_E}it ``` I wanted to use crunch for this, but, considering that the hint never said that the flag is in that order, i just went with the script. <a href="https://www.buymeacoffee.com/mug3njutsu"><img class="bounce" src="https://img.buymeacoffee.com/button-api/?text=Buy me a coffee&emoji=&slug=vsalguero&button_colour=BD5FFF&font_colour=ffffff&font_family=Cookie&outline_colour=000000&coffee_colour=FFDD00"></a> <style> /*Bounce*/ @keyframes bounce { 0%, 5%, 15%, 25% { -webkit-transform: translateY(0); transform: translateY(0); } 10% { -webkit-transform: translateY(-20px); transform: translateY(-20px); } 20% { -webkit-transform: translateY(-10px); transform: translateY(-10px); } } .bounce{ animation: bounce 5s infinite; } </style> <style> .twitter a { font-family: "Roboto", "Noto Sans", "Open Sans", "sans-serif"; display: inline-flex; color: #fff; border-radius: 5px; background: #1b95e0; padding: .4em .8em; text-decoration: none; font-weight: bold; text-align: left; position: absolute; bottom: 138px; left: 300px; } </style> <div class="twitter" style="height: 35px; width: 300px;"><a target="_blank" rel="noopener noreferrer" href="https://twitter.com/mug3njutsu"> <svg height="20px" width="20px" style="margin-right: 5px; fill: #fff;" viewBox="0 0 512 512" preserveAspectRatio="none"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z" /></a></div> <style> body[style], body[style*="background-color: white;"] { background-color: #1e1e1e !important; } body { color: #abb2bf; } .ui-view-area, .markdown-body, .ui-content { background: #1e1e1e; color: #abb2bf; } h1, h2, h3, h4, h5, h6, p { color: #ddd; } /* form */ .form-control { background: #333; color: #fff; border-color: #8e8e8e; } .form-control::placeholder, .form-control::-webkit-input-placeholder, .form-control:-moz-placeholder, .form-control::-moz-placeholder, .form-control:-ms-input-placeholder { color: #eee; } /*--------------- navbar ---------------*/ .header { background-color: #0e0e0e; border-color: #0e0e0e; } .navbar { background-color: #0e0e0e; border-color: #0e0e0e; } .navbar a { color: #eee !important; } .navbar .btn-group label { background-color: #0e0e0e; color: #eee; border-color: #555; } .navbar .btn-group label.btn-default:focus, .navbar .btn-group label.btn-default:hover { background-color: #2a2a2a; color: #eee; border-color: #555; } .navbar .btn-group label.active { background-color: #555; color: #eee; border-color: #555; } .navbar .btn-group label.active:focus, .navbar .btn-group label.active:hover { background-color: #555; color: #eee; border-color: #555; } .navbar-default .btn-link:focus, .navbar-default .btn-link:hover { color: #eee; } .navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover { background-color: #555; } .dropdown-header { color: #eee; } .dropdown-menu { background-color: #222; border: 1px solid #555; border-top: none; } .dropdown-menu>li>a { color: #eee; } .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover { background-color: #555555; color: #eee; } .dropdown-menu .divider { background-color: #555; } .header .open .dropdown-menu { background-color: #202020; } .ui-share-menu .ui-share-copy, .ui-share-menu .ui-share-preview { border-color: #6d6d6d !important; background-color: #333 !important; color: #FFF !important; } .ui-share-menu .ui-share-copy:hover, .ui-share-menu .ui-share-copy:focus, .ui-share-menu .ui-share-preview:hover, .ui-share-menu .ui-share-preview:focus { background-color: #737373 !important; color: #FFF !important; } .permission-dropdown .ui-more-settings, .permission-dropdown .sidenav-trigger { color: #7bf; } .public-published-toggle .unpublish:hover { background-color: #286090; } .menuitem-dropdown .menuitem-dropdown-trigger { border-color: #8e8e8e; } .menuitem-dropdown .menuitem-dropdown-trigger:hover, .menuitem-dropdown .menuitem-dropdown-trigger:focus { background-color: #3e4045; } .navbar .announcement-popover { background: #4F4F4F; } .navbar .announcement-popover .announcement-popover-header { background: #2e2e2e; border-bottom: 1px solid #2e2e2e; } .navbar .announcement-popover .announcement-popover-body { background: #4F4F4F; color: #eee; } .navbar .announcement-popover .announcement-popover-footer { background: #4F4F4F; } .navbar .announcement-area .caption.inverse { color: #eee; } .label-warning { background-color: #ffc107; color: #212529; } /*--------------- history / recent ---------------*/ .list.row-layout li .item { border-color: #696c7d; } .list.row-layout li:nth-last-of-type(1) .item { border-bottom: none; } .list li .item { background: #1c1c1c; color: #fff; } .list li:hover .item, .list li:focus .item { background: #404040; } .list li .item h4 { color: #fff; } .list li p { color: #ccc; } .list li p i { font-style: normal; } .list li .item .content .tags span { background: #555; } .list li .item.wide .content .title a, .list li .item.wide .content .title a:focus, .list li .item.wide .content .title a:hover { color: #ddd; } .ui-item { color: #fff; opacity: 0.7; } .ui-item:hover, .ui-item:focus { opacity: 1; color: #fff; } .list li .item.wide hr { border-color: #6d6d6d; } .overview-widget-group .btn, .multi-select-dropdown-menu .ui-dropdown-label, .multi-select-dropdown-menu .dropdown-options, .form-control { border-color: #8e8e8e; } .multi-select-dropdown-menu .dropdown-options .ui-option:hover { background-color: #4d4d4d; color: #eee; } #overview-control-form #overview-keyword-input-container .select2-container { background-color: #3e4045 !important; } #overview-control-form #overview-keyword-input-container .select2-container .select2-choices { background-color: #3e4045; } .search { background-color: #3e4045; color: #eee; } .btn.btn-gray { background: #1b1b1b; } .btn.btn-gray:hover { background: #4d4d4d; color: #eee; } .search::placeholder, .search::-webkit-input-placeholder, .search:-moz-placeholder, .search::-moz-placeholder, .search:-ms-input-placeholder { color: #eee; } .btn.btn-gray { border-color: #6d6d6d; background: #333; color: #eee; } .select2-default { color: #eee !important; } .select2-results .select2-highlighted { background: #4d4d4d; color: #eee; } .select2-container-multi .select2-choices { background: #3e4045; } .select2-container-multi .select2-choices .select2-search-choice { background: #131313; color: #eee; border-color: #555; box-shadow: none; } .btn-default, .btn-default:focus { color: #eee; background-color: #2e2e2e; border-color: #6a6a6a; } .btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open>.dropdown-toggle.btn-default.focus, .open>.dropdown-toggle.btn-default:focus, .open>.dropdown-toggle.btn-default:hover { background: #737373; } .btn-default:hover { color: #fff; background-color: #7d7d7d; border-color: #6a6a6a; } .overview-widget-group .btn.active { background-color: #6a6a6a; color: #eee; } .overview-widget-group .btn:hover { background-color: #7d7d7d; color: #eee; border-color: #636363; } .overview-widget-group .slider.round { border-color: #ccc; } .overview-widget-group .slider.round:before { border-color: #ccc; } .overview-widget-group input:checked+.slider { background-color: #ccc; } .ui-category-description-icon a { color: #eee; } .item .ui-history-pin.active { color: #f00; } .ui-history-close { color: #eee; opacity: 0.5; } .pagination>li>a, .pagination>li>span { color: #eee; background-color: #2e2e2e; border-color: #6a6a6a; } .pagination>li>a:hover { color: #fff; background-color: #7d7d7d; border-color: #6a6a6a; } .pagination>.disabled>a, .pagination>.disabled>a:focus, .pagination>.disabled>a:hover, .pagination>.disabled>span, .pagination>.disabled>span:focus, .pagination>.disabled>span:hover { color: #eee; background-color: #2e2e2e; border-color: #6a6a6a; } .pagination.dark>li>a, .pagination.dark>li>span { color: #aaa; } /*--------------- new overview ---------------*/ .overview-component .list li .item { background: #1c1c1c; color: #fff; } .overview-component .list li:hover .item, .overview-component .list li:focus .item { background: #404040; } .overview-component .list li p { color: #ccc; } .overview-component .list li .item { color: #888888; } .overview-component .ui-overview-pin { opacity: 1; } /*--------------- settings ---------------*/ .section .form-horizontal .form-group .btn-default { font-size: 16px; border-color: #6d6d6d; background-color: #333; color: #FFF; } .section .form-horizontal .form-group .btn-default:hover, .section .form-horizontal .form-group .btn-default:focus { background-color: #737373; color: #FFF; } .section .form-horizontal .form-control:focus { border-color: #bbb; } /*--------------- share view ---------------*/ #notificationLabel, .ui-infobar .btn.ui-edit { color: #eee; border-color: #6a6a6a; } .ui-infobar__user-info li { color: #bbb; } footer { background: #101010; color: #bbb; border-top: 1px solid #454545; } footer a { color: #bbb; } /*--------------- doc view ---------------*/ .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6, #doc>h1 { color: #ddd; border-color: #777 !important; } .markdown-body hr { background-color: #7e7e7e; } .h1 .small, .h1 small, .h2 .small, .h2 small, .h3 .small, .h3 small, .h4 .small, .h4 small, .h5 .small, .h5 small, .h6 .small, .h6 small, h1 .small, h1 small, h2 .small, h2 small, h3 .small, h3 small, h4 .small, h4 small, h5 .small, h5 small, h6 .small, h6 small { color: #ddd; } .markdown-body p { color: #ddd; } .markdown-body a { color: #7bf; } .markdown-body a code { color: #7bf !important; } .markdown-body ul li, .markdown-body ol li { color: #ddd; } .markdown-body blockquote { color: #ddd; border-left-color: #777; font-size: 16px; } .markdown-body code, code { color: #dfdfdf !important; background-color: #424a55; } .markdown-body code { padding: 1px 2px; } .markdown-body pre { background-color: #1e1e1e; border: 1px solid #555 !important; color: #dfdfdf; } .markdown-body details { margin-bottom: 16px; } blockquote .small, blockquote footer, blockquote small { color: #bbb; } .mark, mark { background-color: rgba(255, 255, 0, 0.32) !important; color: #ddd; margin: .1em; padding: .1em .2em; } /* Todo list */ .task-list-item-checkbox { margin: 0.18em 0 0.2em -1.3em !important; } .task-list-item input[type=checkbox] { -webkit-appearance: none; -moz-appearance: none; appearance: none; position: relative; top: -1px; margin: 0 1rem 0 0; cursor: pointer; } .task-list-item input[type=checkbox]::before { -webkit-transition: all 0.1s ease-in-out; -moz-transition: all 0.1s ease-in-out; transition: all 0.1s ease-in-out; content: ""; position: absolute; left: 0; z-index: 1; width: 16px; height: 16px; border: 2px solid #F44336; } .task-list-item input[type=checkbox]:checked::before { -webkit-transform: rotate(-48deg); -moz-transform: rotate(-48deg); -ms-transform: rotate(-48deg); -o-transform: rotate(-48deg); transform: rotate(-48deg); height: 9px; border-color: #00E676; border-top-style: none; border-right-style: none; } .task-list-item input[type=checkbox]::after { content: ""; position: absolute; top: -0.125rem; left: 0; width: 16px; height: 16px; background: #333; cursor: pointer; } /* table */ .markdown-body table tr { background-color: #1e1e1e; border-color: #626262; } .markdown-body table tr:last-child { border-bottom: 1px solid #626262; } .markdown-body table tr:nth-child(2n) { background-color: #333; } .markdown-body table tr th { color: #64B5F6; } .markdown-body table th, .markdown-body table td { border: none; border-color: #626262; } .markdown-body table tr td { color: #ddd; } .markdown-body table tr th:first-child, .markdown-body table tr td:first-child { border-left: 1px solid #626262; } .markdown-body table tr th:last-child, .markdown-body table tr td:last-child { border-right: 1px solid #626262; } .markdown-body pre.flow-chart, .markdown-body pre.sequence-diagram, .markdown-body pre.graphviz, .markdown-body pre.mermaid, .markdown-body pre.abc { background-color: #fff !important; } /* alert */ .alert-danger h1, .alert-danger h2, .alert-danger h3, .alert-danger h4, .alert-danger h5, .alert-danger h6, .alert-danger p, .alert-danger mark, .alert-danger ul li, .alert-danger ol li { color: #721c24; } .alert-danger hr { background-color: #721c24; } .alert-warning h1, .alert-warning h2, .alert-warning h3, .alert-warning h4, .alert-warning h5, .alert-warning h6, .alert-warning p, .alert-warning mark, .alert-warning ul li, .alert-warning ol li { color: #856404; } .alert-warning hr { background-color: #856404; } .alert-success h1, .alert-success h2, .alert-success h3, .alert-success h4, .alert-success h5, .alert-success h6, .alert-success p, .alert-success mark, .alert-success ul li, .alert-success ol li { color: #155724; } .alert-success hr { background-color: #155724; } .alert-info h1, .alert-info h2, .alert-info h3, .alert-info h4, .alert-info h5, .alert-info h6, .alert-info p, .alert-info mark, .alert-info ul li, .alert-info ol li { color: #004085; } .alert-info hr { background-color: #004085; } .alert a { color: #002752; font-weight: 700; } .alert h1:first-child, .alert h2:first-child, .alert h3:first-child, .alert h4:first-child, .alert h5:first-child, .alert h6:first-child { margin-top: 0; } .markdown-body .alert>p { margin-top: 0px; margin-bottom: 10px; } .markdown-body .alert>ul, .markdown-body .alert>ol { margin-bottom: 16px; } .markdown-body .alert>*:last-child { margin-bottom: 0; } .alert-warning { background-color: #fff3cd; border-color: #ffeeba; } .alert-danger mark { background-color: #ffb7b7 !important; } .alert-warning mark { background-color: #ffe966 !important; } .alert-success mark { background-color: #b9e990 !important; } .alert-info mark { background-color: #b1d6ff !important; } /* scroll bar */ .ui-edit-area .ui-resizable-handle.ui-resizable-e { background-color: #303030; border: 1px solid #303030; box-shadow: none; } /* info bar */ .ui-infobar { color: #999; } /* permission */ .permission-popover-btn-group .btn.focus, .permission-popover-btn-group .btn:active, .permission-popover-btn-group .btn:focus, .permission-popover-btn-group .btn.active { background-color: #6a6a6a !important; color: #eee !important; border-color: #555 !important; } .permission-popover-btn-group .btn:hover, .permission-popover-btn-group .btn.active:hover { background-color: #7d7d7d !important; color: #eee !important; border-color: #636363 !important; } .ui-delete-note:hover, .ui-delete-note:focus, .ui-delete-note:active { background-color: #dc3545 !important; } .ui-invitee-invite { border-color: #8e8e8e !important; } .ui-invitee-invite:hover, .ui-invitee-invite:focus { background-color: #737373; color: #eee !important; } .ui-no-invitee-label { color: #ccc !important; } .select2-container { background: #202020; } .select2-container-multi .select2-choices .select2-search-field input { color: #eee; } .select2-container-multi .select2-choices .select2-search-field input.select2-active { color: #000; } .select2-drop { background: #202020; color: #eee; } .select2-results .select2-no-results, .select2-results .select2-searching, .select2-results .select2-ajax-error, .select2-results .select2-selection-limit { background: #202020; } /* table of contents block*/ .ui-toc-dropdown { width: 42vw; max-height: 90vh; overflow: auto; text-align: inherit; } /* table of contents text*/ .ui-toc-dropdown .nav>li>a { font-size: 14px; font-weight: bold; color: #ddd; } /* table of contents text: active*/ .ui-toc-dropdown .nav>.active:focus>a, .ui-toc-dropdown .nav>.active:hover>a, .ui-toc-dropdown .nav>.active>a { color: #7bf; border-left-color: #7bf; } /* table of contents text: focus, hover*/ .ui-toc-dropdown .nav>li>a:focus, .ui-toc-dropdown .nav>li>a:hover { color: #7bf; border-left-color: #7bf; } /* drop down floating table of contents */ .ui-toc-dropdown.dropdown-menu { background: #333; } .toc-menu a { color: #ddd; } .toc-menu a:focus, .toc-menu a:hover { color: #7bf; } /*--------------- editor ---------------*/ .cm-m-markdown { color: #ddd; } .cm-s-one-dark .cm-header, .cm-m-xml.cm-attribute { color: #ffa653; } .cm-m-markdown.cm-variable-3 { color: #ff7e7e; } .cm-s-one-dark .cm-string, .cm-s-one-dark .cm-variable-2, .cm-s-one-dark .cm-m-markdown.cm-url{ color: #7bf; } .cm-s-one-dark .cm-m-markdown.cm-link { color: #b0ee83; } .cm-s-one-dark .CodeMirror-linenumber { color: #666; } .cm-strong { color: #f4511e; } .cm-s-one-dark .cm-comment { color: #a9a9a9; } .cm-matchhighlight { color: #ffea00; } .cm-positive { color: #11bf64; } .cm-negative { color: #ff3e3e; } .dropdown-menu.CodeMirror-other-cursor { border: 2px solid #4d4d4d; background-color: #202020; } .dropdown-menu.CodeMirror-other-cursor li a { color: #ececec; } /*--------------- book mode ---------------*/ .topbar { background: #1e1e1e; } .btn.focus, .btn:focus, .btn:hover { color: #fff; background-color: #333; } .summary { background: #1e1e1e; } .summary, .toolbar { background: #1e1e1e !important; border-color: #4d4d4d !important; } .toolbar i { color: #fff; } .summary h1, .summary h2, .summary h3 .summary hr { color: #ddd; border-color: #777 !important; } .summary .nav>li>a { color: #7bf; } .summary .nav-pills>li.active>a, .summary .nav-pills>li.active>a:focus, .summary .nav-pills>li.active>a:hover { color: #ff9100; } .ui-summary-search { font-size: 16px; border: 1px solid #6D6D6D; background-color: #333; color: #FFF; } .summary h1, .summary h2, .summary h3, .summary h4, .summary h5, .summary h6 { border-color: #454545; } /* fix body background color to dark */ div[class$=container-mask] { background: #1e1e1e; z-index: 1; display: block; } /* notification */ .dropdown.ui-notification .ui-notification-label, .dropdown.ui-invitee .ui-invitee-label { color: #eee; border-color: #6a6a6a; } .ui-notification .dropdown-menu { border-top: 1px solid #555; } /*--------------- help ---------------*/ .modal-header { background-color: #2a2a2a; } .panel-default { border-color: #6d6d6d; } .panel-default>.panel-heading { background-color: #2a2a2a; color: #eee; border-color: #6d6d6d; } .panel-body { background: #2e2e2e; } .panel-body a { color: #7bf; } .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th { border-color: #6d6d6d; } /*--------------- comment ---------------*/ .ui-comment-container .ui-comment-header { background-color: #2a2a2a; color: #eee; border-color: #6d6d6d; } .ui-comment-container { background-color: #2e2e2e; border-color: #6d6d6d; } .ui-comment-container .ui-comments-container .ui-comment .comment-author { color: #eee; } .ui-comment-container .ui-comments-container .ui-comment .timestamp { color: #aaa; } .ui-comment-container .ui-comments-container .ui-comment .comment-content { color: #eee; } .ui-comment-container .ui-comments-container .ui-comment .comment-menu { color: #eee; } .ui-comment-container .ui-comments-container .ui-comment .comment-menu .comment-dropdown-menu { background: #222; color: #eee; border-color: #555; } .ui-comment-container .ui-comments-container .ui-comment .comment-menu .comment-dropdown-menu>div:hover { background-color: #555555; color: #eee; } .ui-comment-container .ui-comments-container .ui-comment .comment-menu:hover, .ui-comment-container .ui-comments-container .ui-comment .comment-menu:active, .ui-comment-container .ui-comments-container .ui-comment .comment-menu.active { background-color: #737373; color: #eee; } .ui-comment-container .ui-comment-input-container { background-color: #3c3c3c; } .ui-comment-container textarea { background-color: #3e4045; color: #eee; border: 1px solid #6d6d6d; } .ui-comment-container textarea::placeholder, .ui-comment-container textarea::-webkit-input-placeholder, .ui-comment-container textarea:-moz-placeholder, .ui-comment-container textarea::-moz-placeholder, .ui-comment-container textarea:-ms-input-placeholder { color: #eee; } @keyframes highlight { 0% { background-color: #3c3c3c; } 30% { background-color: #3c3c3c; } 100% { background-color: transparent; } } /*--------------- template ---------------*/ .template-content .modal-header { background: #2a2a2a; } .template-content .close { color: #fff; } .template-content .modal-title { color: #eee; } .template-content .ui-templates-container { border-color: #6d6d6d; } .ui-templates-container .ui-create-template-btn { background: #446fab; color: #fff; } .ui-template-list-filter .ui-template-list-filter-label, .ui-template-list-filter .ui-template-list-filter-label:hover { color: #eee; } .ui-template-list .list-group-item.active { background: #4d4d4d; } .ui-template-list .list-group-item.active:focus { background: #4d4d4d !important; } .list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover { color: #eee; } .ui-template-list .list-group-item .list-group-item-heading { color: #eee; } .ui-template-list .list-group-item.active .list-group-item-heading { color: #eee; } .ui-template-list .list-group-item:hover { background: #4d4d4d !important; } .ui-template-item-menu { color: #eee !important; } .ui-template-list .list-group-item { color: #fff; } .ui-template-list .list-group-item .dropdown-container.open { background-color: #2a2a2a; } .ui-template-list .list-group-item .dropdown-container:hover { background-color: #2a2a2a !important; } .template-menu .more-template { border-color: #6d6d6d; } .template-menu .more-template:hover { color: #eee; border-color: #6d6d6d; } /*--------------- code mirror ---------------*/ .modal-content { background: #1f2226; } .modal-header { border-bottom: 1px solid #46484f; } .modal-footer { border-top: 1px solid #46484f; } a.list-group-item { background: #1f2226; color: #ddd; border: 1px solid #46484f; } a.list-group-item .list-group-item-heading { color: #ddd; } a.list-group-item:focus, a.list-group-item:hover { background: #434651; color: #ddd; } button.close { color: #ddd; opacity: .5; } .close:focus, .close:hover { color: #fff; opacity: .8; } .CodeMirror { background: #1f2226; } .CodeMirror-gutters { background: #1f2226; border-right: 1px solid rgba(204, 217, 255, 0.1); } .cm-s-default .cm-comment { color: #888; } .cm-s-default .cm-quote { color: #ddd; } .cm-s-default .cm-header { color: #ffa653; } .cm-s-default .cm-link { color: #b0ee83; } .cm-s-default .cm-string, .cm-s-default .cm-variable-2 { color: #7bf; } .cm-s-default .cm-def { color: #c678dd; } .cm-s-default .cm-number, .cm-s-default .cm-attribute, .cm-s-default .cm-qualifier, .cm-s-default .cm-plus, .cm-s-default .cm-atom { color: #eda35e; } .cm-s-default .cm-property, .cm-s-default .cm-variable, .cm-s-default .cm-variable-3, .cm-s-default .cm-operator, .cm-s-default .cm-bracket { color: #f76e79; } .cm-s-default .cm-keyword, .cm-s-default .cm-builtin, .cm-s-default .cm-tag { color: #98c379; } .modal-title { color: #ccc; } .modal-body { color: #ccc !important; } div[contenteditable]:empty:not(:focus):before { color: #aaa; } .CodeMirror pre { color: #ddd; } .CodeMirror pre span[style^="background-color: rgb(221, 251, 230)"] { background-color: #288c27 !important; } .CodeMirror pre span[style^="background-color: rgb(249, 215, 220)"] { background-color: #a52721 !important; } /*------- code highlight: Visual Stutdio Code theme for highlight.js -------*/ .hljs { background: #1E1E1E; color: #DCDCDC; } .hljs-keyword, .hljs-literal, .hljs-symbol, .hljs-name { color: #569CD6; } .hljs-link { color: #569CD6; text-decoration: underline; } .hljs-built_in, .hljs-type { color: #4EC9B0; } .hljs-number, .hljs-class { color: #B8D7A3; } .hljs-string, .hljs-meta-string { color: #D69D85; } .hljs-regexp, .hljs-template-tag { color: #d16969; } .hljs-title { color: #dcdcaa; } .hljs-subst, .hljs-function, .hljs-formula { color: #DCDCDC; } .hljs-comment, .hljs-quote { color: #57A64A; } .hljs-doctag { color: #608B4E; } .hljs-meta, .hljs-meta-keyword, .hljs-tag { color: #9B9B9B; } .hljs-variable, .hljs-template-variable { color: #BD63C5; } .hljs-params, .hljs-attr, .hljs-attribute, .hljs-builtin-name { color: #9CDCFE; } .hljs-section { color: gold; } .hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: bold; } /* .hljs-code { font-family:'Monospace'; } */ .hljs-bullet, .hljs-selector-tag, .hljs-selector-id, .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo { color: #D7BA7D; } .hljs-addition { background-color: #155a36; color: #dfdfdf; display: inline-block; width: 100%; } .hljs-deletion { background-color: #872e2e; color: #dfdfdf; display: inline-block; width: 100%; } /*---------- code highlight: Visual Stutdio Code theme for Prism.js ----------*/ code[class*="language-"], pre[class*="language-"] { color: #DCDCDC; } :not(pre)>code[class*="language-"], pre[class*="language-"] { background: #1E1E1E; } .token.comment, .token.block-comment, .token.prolog, .token.cdata { color: #57A64A; } .token.doctype, .token.punctuation { color: #9B9B9B; } .token.tag, .token.entity { color: #569CD6; } .token.attr-name, .token.namespace, .token.deleted, .token.property, .token.builtin { color: #9CDCFE; } .token.function, .token.function-name { color: #dcdcaa; } .token.boolean, .token.keyword, .token.important { color: #569CD6; } .token.number { color: #B8D7A3; } .token.class-name, .token.constant { color: #4EC9B0; } .token.symbol { color: #f8c555; } .token.rule { color: #c586c0; } .token.selector { color: #D7BA7D; } .token.atrule { color: #cc99cd; } .token.string, .token.attr-value { color: #D69D85; } .token.char { color: #7ec699; } .token.variable { color: #BD63C5; } .token.regex { color: #d16969; } .token.operator { color: #DCDCDC; background: transparent; } .token.url { color: #67cdcc; } .token.important, .token.bold { font-weight: bold; } .token.italic { font-style: italic; } .token.entity { cursor: help; } .token.inserted { color: green; } /*---------- code highlight: dark theme for Gist ----------*/ .gist .gist-file { border: 1px solid #555; } .gist .gist-data { background-color: #1e1e1e; border-bottom: 1px solid #555; } .gist .gist-meta { background-color: #424a55; color: #eee; } .gist .gist-meta a { color: #eee; } .gist .highlight { color: #eee; background-color: #1e1e1e; } .gist .blob-num { color: #afafaf; } .gist .blob-code-inner { color: #dfdfdf; } .pl-mb { color: #fff !important; } .pl-c { color: #57A64A !important; } /* comment */ .pl-ent { color: #569CD6 !important; } /* entity */ .pl-e { color: #9CDCFE !important; } .pl-en { color: #4EC9B0 !important; } /* entity attribute */ .pl-smi { color: #9CDCFE !important; } .pl-k { color: #569cd6 !important; } .pl-c1, .pl-s .pl-v { color: #4EC9B0 !important; } .pl-pds, .pl-s, .pl-s .pl-pse .pl-s1, .pl-sr, .pl-sr .pl-cce, .pl-sr .pl-sra, .pl-sr .pl-sre, .pl-s .pl-s1 { color: #D69D85 !important; } .pl-s .pl-s1 .pl-pse { color: #c5dbff !important; } /* strings */ .diff-table .pl-c, .diff-table .pl-ent, .diff-table .pl-e, .diff-table .pl-en, .diff-table .pl-pds, .diff-table .pl-s, .diff-table .pl-s .pl-s1, .diff-table .pl-s .pl-pse .pl-s1, .diff-table .pl-sr, .diff-table .pl-sr .pl-cce, .diff-table .pl-sr .pl-sra, .diff-table .pl-sr .pl-sre, .diff-table .pl-k, .diff-table .pl-smi, .diff-table .pl-c1, .diff-table .pl-v { color: #eee !important; } </style>