├── KCSC Recruit ├── README.md └── EnCryptBoizzz │ ├── real_flag │ ├── source │ ├── attachment.zip │ ├── Dockerfile │ ├── docker-compose.yml │ └── src │ │ ├── config.php │ │ └── index.php │ └── solution │ └── sol.py ├── KCSC-CTF-2022 ├── README.md ├── Create note as a service │ └── chall │ │ ├── challenge │ │ ├── public │ │ │ ├── index.html │ │ │ ├── note.html │ │ │ ├── login.html │ │ │ └── register.html │ │ ├── package.json │ │ ├── database.js │ │ └── index.js │ │ ├── docker-compose.yaml │ │ └── Dockerfile ├── Request as a service │ ├── chall │ │ ├── config.php │ │ └── index.php │ ├── docker-compose.yaml │ └── Dockerfile ├── Leak me if you can │ └── chall │ │ ├── build.sh │ │ ├── challenge │ │ ├── leak-me.db │ │ ├── views │ │ │ ├── report.html │ │ │ ├── index.html │ │ │ └── notes.html │ │ ├── package.json │ │ ├── index.js │ │ ├── bot.js │ │ ├── database.js │ │ └── routes │ │ │ └── index.js │ │ ├── docker-compose.yaml │ │ └── Dockerfile └── Client-side check │ ├── docker-compose.yaml │ ├── Dockerfile │ └── chall │ ├── index.php │ ├── aes.js │ └── index.js ├── Meetup 2020 ├── README.md ├── chall2 │ ├── robots.txt │ ├── images │ │ └── robot.png │ ├── index.php │ └── s3cr3t_fl4g.txt ├── chall3 │ ├── config.php │ ├── images │ │ └── cookie.jpg │ ├── index.html │ ├── index.php │ ├── index.css │ └── error_log └── chall1 │ ├── index.js │ ├── images │ ├── cybersec.jpg │ └── cybersecvn.jpg │ ├── index.html │ └── index.css ├── KCSC Birthday 2021 ├── README.md └── happy_birthday_KCSC │ ├── real_flag │ ├── attachment.zip │ ├── src │ ├── static │ │ └── images │ │ │ ├── login.jpg │ │ │ └── main_bg.png │ ├── flag.php │ ├── config.php │ ├── classes │ │ ├── curl.php │ │ └── chain.php │ ├── api │ │ └── checkUser.php │ ├── admin │ │ └── index.php │ ├── index.php │ └── login.php │ ├── Dockerfile │ ├── database.sql │ └── docker-compose.yml ├── KMACTF 2022 - 2nd ├── README.md ├── inject me │ ├── src │ │ ├── requirements.txt │ │ ├── templates │ │ │ ├── source.html │ │ │ └── index.html │ │ ├── database │ │ │ ├── database.db │ │ │ └── schema.sql │ │ └── app.py │ ├── solution │ │ └── solv.txt │ ├── docker-compose.yml │ └── Dockerfile └── pwn me │ ├── solution │ ├── eval.so │ ├── nhienit.so │ ├── solv.txt │ ├── eval.c │ └── nhienit.c │ ├── docker-compose.yaml │ ├── Dockerfile │ └── src │ └── index.php ├── KMACTF 2022 - 3rd ├── README.md ├── Your Name │ ├── README.md │ ├── build.sh │ ├── challenge │ │ ├── public │ │ │ ├── images │ │ │ │ └── your-name.jpeg │ │ │ ├── css │ │ │ │ └── style.css │ │ │ └── js │ │ │ │ └── app.js │ │ ├── views │ │ │ ├── report.html │ │ │ └── index.html │ │ ├── package.json │ │ ├── index.js │ │ ├── bot.js │ │ └── routes │ │ │ └── index.js │ ├── docker-compose.yaml │ └── Dockerfile └── Yugioh Shop │ ├── README.md │ ├── src │ ├── logout.php │ ├── uploads │ │ ├── 16da72c05aa046876110.jpg │ │ ├── 1d3853d3406edc89a214.jpg │ │ ├── 3e64333da1286ff59369.jpg │ │ ├── 69cb4a730f10e2950245.jpg │ │ ├── 8f0877f9bea6f87c3857.jpg │ │ ├── b32e81b22648eade05db.jpg │ │ ├── e2453d4e5ec1de20faf1.jpg │ │ └── f15e678b31ccfe1071f4.jpg │ ├── index.php │ ├── config.php │ ├── user.php │ ├── buy.php │ ├── database.php │ ├── utils.php │ ├── static │ │ └── css │ │ │ ├── profile.css │ │ │ ├── register.css │ │ │ ├── item.css │ │ │ ├── shop.css │ │ │ └── login.css │ ├── login.php │ ├── register.php │ ├── profile.php │ ├── item.php │ └── home.php │ ├── docker-compose.yml │ ├── Dockerfile │ └── db │ └── schema.sql ├── HDBANK Hackathon 2025 ├── README.md ├── GalaxyNote │ ├── README.md │ ├── Dockerfile │ ├── docker-compose.yml │ ├── challenge │ │ ├── package.json │ │ ├── config.js │ │ ├── db │ │ │ └── init.sql │ │ ├── app.js │ │ └── views │ │ │ ├── create.ejs │ │ │ └── index.ejs │ └── solution │ │ └── exploit.py ├── NinjaStore │ ├── README.md │ ├── challenge │ │ ├── src │ │ │ ├── imgs │ │ │ │ ├── flag.png │ │ │ │ ├── itachi.png │ │ │ │ ├── naruto.png │ │ │ │ ├── sasuke.png │ │ │ │ └── kakashi.png │ │ │ ├── logout.php │ │ │ ├── config.php │ │ │ ├── profile.php │ │ │ ├── login.php │ │ │ ├── index.php │ │ │ └── register.php │ │ ├── Dockerfile │ │ ├── docker-compose.yml │ │ └── db │ │ │ └── db.sql │ └── solver │ │ └── solve.py └── TheOldTrick │ ├── README.md │ └── challenge │ ├── src │ ├── config.php │ ├── logout.php │ ├── index.php │ ├── login.php │ ├── profile.php │ ├── utils.php │ └── views │ │ ├── index.html │ │ ├── profile.html │ │ └── login.html │ ├── flag │ ├── readflag │ ├── docker-compose.yml │ └── Dockerfile └── README.md /KCSC Recruit/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KCSC-CTF-2022/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Meetup 2020/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KCSC Birthday 2021/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KMACTF 2022 - 2nd/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/Your Name/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/GalaxyNote/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/NinjaStore/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/TheOldTrick/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/Yugioh Shop/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /KMACTF 2022 - 2nd/inject me/src/requirements.txt: -------------------------------------------------------------------------------- 1 | Flask==2.1.1 2 | -------------------------------------------------------------------------------- /Meetup 2020/chall2/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disalllow: /s3cr3t_fl4g.txt 3 | -------------------------------------------------------------------------------- /KCSC Birthday 2021/happy_birthday_KCSC/real_flag: -------------------------------------------------------------------------------- 1 | KCSC{D3s3r1al1ze_Vu1_h0n_b4n_ngh1~!!!!!!} -------------------------------------------------------------------------------- /KMACTF 2022 - 2nd/inject me/src/templates/source.html: -------------------------------------------------------------------------------- 1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/KCSC-CTF-2022/Create note as a service/chall/challenge/public/register.html:
--------------------------------------------------------------------------------
1 | Enter your name to order cookie!!!
11 |Lười code UI quá mong các bạn thông cảm :(((
32 |Thật ra mình không giỏi code UI hihi!!
33 | 34 | -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/TheOldTrick/challenge/src/profile.php: -------------------------------------------------------------------------------- 1 | 28 | setTimeout(() => { 29 | window.location.href = "index.php"; 30 | }, 2000); 31 | '; 32 | } 33 | 34 | 35 | ?> -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/TheOldTrick/challenge/src/utils.php: -------------------------------------------------------------------------------- 1 | str = $str; 11 | $this->color = $color; 12 | } 13 | 14 | public function __toString() { 15 | return "color;\">$this->str
"; 16 | 17 | } 18 | } 19 | 20 | 21 | class Red extends Color { 22 | public $str; 23 | public $color; 24 | 25 | public function __construct($str) { 26 | $this->str = $str; 27 | $this->color = "red"; 28 | } 29 | } 30 | 31 | 32 | class Green extends Color { 33 | public $str; 34 | public $color; 35 | 36 | public function __construct($str) { 37 | $this->str = $str; 38 | $this->color = "green"; 39 | } 40 | } 41 | class Blue extends Color { 42 | public $str; 43 | public $color; 44 | 45 | public function __construct($str) { 46 | $this->str = $str; 47 | $this->color = "blue"; 48 | } 49 | } 50 | 51 | 52 | ?> -------------------------------------------------------------------------------- /KCSC-CTF-2022/Create note as a service/chall/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:current-buster-slim 2 | 3 | # Install packages 4 | RUN apt-get update \ 5 | && apt-get install -y wget supervisor gnupg \ 6 | && wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \ 7 | && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \ 8 | && apt-get update \ 9 | && apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ 10 | --no-install-recommends \ 11 | && rm -rf /var/lib/apt/lists/* 12 | 13 | # Setup app 14 | RUN mkdir -p /app 15 | 16 | # Add application 17 | WORKDIR /app 18 | COPY challenge . 19 | 20 | ENV FLAG=KCSC{R3g3x_1nJ3ct1on_t00_3z_t0_Expl0it} 21 | ENV SECRET=super_secret_key_you_cannot_guess_ahihi 22 | # Install dependencies 23 | RUN yarn 24 | 25 | CMD ["npm", "install"] 26 | # Expose the port node-js is reachable on 27 | EXPOSE 80 28 | 29 | # Start the node-js application 30 | CMD ["node", "index.js"] 31 | -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/Your Name/challenge/bot.js: -------------------------------------------------------------------------------- 1 | const puppeteer = require('puppeteer'); 2 | 3 | const browser_options = { 4 | headless: true, 5 | args: [ 6 | '--no-sandbox', 7 | '--disable-background-networking', 8 | '--disable-default-apps', 9 | '--disable-extensions', 10 | '--disable-gpu', 11 | '--disable-sync', 12 | '--disable-translate', 13 | '--hide-scrollbars', 14 | '--metrics-recording-only', 15 | '--mute-audio', 16 | '--no-first-run', 17 | '--safebrowsing-disable-auto-update', 18 | '--js-flags=--noexpose_wasm,--jitless' 19 | ] 20 | }; 21 | 22 | const visitPage = async url => { 23 | const browser = await puppeteer.launch(browser_options); 24 | 25 | let context = await browser.createIncognitoBrowserContext(); 26 | let page = await context.newPage(); 27 | 28 | await page.setCookie({ 29 | 'name': 'Flag', 30 | 'value': 'KMACTF{XSS_W1th_ReC4ptch4_4nd_d0m_cl0bb3r1ng}', 31 | 'domain': '127.0.0.1' 32 | }) 33 | 34 | await page.goto(url, { 35 | waitUntil: 'networkidle2' 36 | }); 37 | 38 | await page.waitForTimeout(7000); 39 | await browser.close(); 40 | }; 41 | 42 | module.exports = { visitPage }; -------------------------------------------------------------------------------- /KCSC Birthday 2021/happy_birthday_KCSC/src/classes/chain.php: -------------------------------------------------------------------------------- 1 | file)) { 8 | include($this->file); 9 | } 10 | return "Ahihhii"; 11 | } 12 | } 13 | 14 | 15 | class Url { 16 | public $url; 17 | 18 | public function __construct($url) { 19 | $this->url = $url; 20 | } 21 | 22 | public function checkUrl() { 23 | if (preg_match('/[http|https]:\/\//', $this->url)) 24 | return true; 25 | else 26 | return false; 27 | } 28 | } 29 | 30 | 31 | class Func1 { 32 | public $param1; 33 | public $param2; 34 | 35 | public function __get($key) { 36 | $key = $this->param2; 37 | return $this->param1->$key(); 38 | } 39 | } 40 | 41 | class Source { 42 | private $source; 43 | 44 | public function __construct($s) { 45 | $this->source = $s; 46 | } 47 | public function __invoke() { 48 | return $this->source->method; 49 | } 50 | } 51 | 52 | 53 | class Func2 { 54 | public $param; 55 | 56 | public function __wakeup() { 57 | $function = $this->param; 58 | return $function(); 59 | } 60 | } 61 | 62 | ?> -------------------------------------------------------------------------------- /HDBANK Hackathon 2025/GalaxyNote/challenge/db/init.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE hackathon; 2 | GO 3 | 4 | USE hackathon; 5 | 6 | CREATE TABLE admin (temp NVARCHAR(255) NULL); 7 | 8 | CREATE TABLE flag ( flag VARCHAR(255) NOT NULL); 9 | 10 | INSERT INTO flag (flag) VALUES ('HDBH{pl4y_w1th_mSSql_s3rv3r_2984a9b27169ae95d8ab005bb2df5924}'); 11 | 12 | 13 | CREATE TABLE notes ( 14 | note_id UNIQUEIDENTIFIER NOT NULL DEFAULT NEWID(), 15 | title NVARCHAR(255) NOT NULL, 16 | content NVARCHAR(MAX) NOT NULL, 17 | created_by NVARCHAR(100) NOT NULL, 18 | created_at DATETIME NOT NULL DEFAULT GETDATE(), 19 | CONSTRAINT PK_notes PRIMARY KEY (note_id) 20 | ); 21 | 22 | INSERT INTO notes (title, content, created_by) 23 | VALUES 24 | (N'Học SQL cơ bản', N'Ôn lại các câu lệnh CREATE, SELECT, INSERT, UPDATE, DELETE trong SQL Server.', N'Nguyễn Văn A'), 25 | 26 | (N'Ý tưởng CTF Challenge', N'Thiết kế một challenge về SQL Injection để kiểm tra kỹ năng khai thác.', N'Trần Thị B'), 27 | 28 | (N'Ghi chú học ExpressJS', N'Tìm hiểu cách tạo REST API bằng ExpressJS, kết nối với MSSQL.', N'Lê Văn C'), 29 | 30 | (N'Ghi chú bảo mật', N'Xem lại cách ngăn chặn IDOR bằng cách filter theo userEmail.', N'Phạm Thị D'), 31 | 32 | (N'Kế hoạch Hackathon 2025', N'Thiết lập MSSQL server, tạo database hackathon và chuẩn bị dataset.', N'Ngô Văn E'); 33 | -------------------------------------------------------------------------------- /KMACTF 2022 - 2nd/pwn me/src/index.php: -------------------------------------------------------------------------------- 1 | 100) { 13 | system("rm uploads/*"); 14 | } 15 | 16 | $fileExt = strtolower(pathinfo($_FILES["file"]["name"],PATHINFO_EXTENSION)); 17 | 18 | if ( preg_match("/ph/i", $fileExt) ) 19 | die("Don't cheat my fen"); 20 | 21 | $fileName = md5(rand(1, 1000000000)).".".$fileExt; 22 | $target_file = "uploads/" . $fileName; 23 | 24 | if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) { 25 | die("Your file: ".getcwd()."/".$target_file); 26 | } else { 27 | die("Something went wrong\n"); 28 | } 29 | 30 | } 31 | // Add enviroment variable 32 | if (isset($_GET["env"])) { 33 | foreach ($_GET["env"] as $key => $value) { 34 | if ( preg_match("/[A-Za-z_]/i", $key) && !preg_match("/bash/i", $key) ) 35 | putenv($key."=".$value); 36 | } 37 | } 38 | 39 | system("echo pwnme!!"); 40 | 41 | ?> 42 | 43 | 48 | 49 | -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/Yugioh Shop/src/utils.php: -------------------------------------------------------------------------------- 1 | baseDir = dirname(__FILE__); 10 | } 11 | 12 | function uploadFile($file) { 13 | $msg = ""; 14 | $is_ok = true; 15 | 16 | $allowed = array('gif', 'png', 'jpg'); 17 | $filename = $file['name']; 18 | 19 | $ext = pathinfo($filename, PATHINFO_EXTENSION); 20 | if (!in_array($ext, $allowed)) { 21 | $msg = 'Only allowed gif, png, jpg'; 22 | $is_ok = false; 23 | } 24 | 25 | if ($file["size"] > 1000000) { 26 | $msg = "Sorry, your file is too large."; 27 | $is_ok = false; 28 | } 29 | 30 | 31 | if ( !getimagesize($file['tmp_name']) ) { 32 | $msg = "Not a valid image"; 33 | $is_ok = false; 34 | } 35 | 36 | $file_name = bin2hex(random_bytes(10)).".jpg"; 37 | $target_file = $this->baseDir."/uploads/".$file_name; 38 | 39 | if (move_uploaded_file($file["tmp_name"], $target_file)) { 40 | $msg = "Your avatar stored at: ". $target_file; 41 | $is_ok = true; 42 | } else { 43 | $msg = "Sorry, there was an error uploading your file."; 44 | $is_ok = false; 45 | } 46 | 47 | return array($is_ok, $msg, $file_name); 48 | } 49 | 50 | function __get($key) { 51 | return ($this->a)($this->b); 52 | } 53 | } 54 | 55 | ?> -------------------------------------------------------------------------------- /KCSC-CTF-2022/Create note as a service/chall/challenge/database.js: -------------------------------------------------------------------------------- 1 | const sqlite = require('sqlite-async'); 2 | 3 | class Database { 4 | constructor(db_file) { 5 | this.db_file = db_file; 6 | this.db = undefined; 7 | } 8 | 9 | async connect() { 10 | this.db = await sqlite.open(this.db_file); 11 | } 12 | 13 | async init() { 14 | return this.db.exec(` 15 | PRAGMA case_sensitive_like=ON; 16 | 17 | DROP TABLE IF EXISTS users; 18 | CREATE TABLE IF NOT EXISTS users ( 19 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 20 | username VARCHAR(255) NOT NULL, 21 | password VARCHAR(255) NOT NULL 22 | ); 23 | 24 | DROP TABLE IF EXISTS notes; 25 | CREATE TABLE IF NOT EXISTS notes ( 26 | id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 27 | note VARCHAR(255) NOT NULL, 28 | userId INTEGER NOT NULL 29 | ); 30 | 31 | DROP TABLE IF EXISTS flag; 32 | CREATE TABLE IF NOT EXISTS flag ( 33 | flag VARCHAR(255) NOT NULL 34 | ); 35 | 36 | INSERT INTO flag (flag) VALUES ('${process.env.FLAG || "KCSC{flag_for_testing}"}'); 37 | `); 38 | } 39 | 40 | } 41 | 42 | module.exports = Database; -------------------------------------------------------------------------------- /KMACTF 2022 - 3rd/Yugioh Shop/db/schema.sql: -------------------------------------------------------------------------------- 1 | use kmactf; 2 | drop table if EXISTS users; 3 | create table users(id int PRIMARY key AUTO_INCREMENT, username varchar(255), password varchar(32), avatar varchar(255)); 4 | 5 | 6 | drop table if EXISTS shop; 7 | create table shop(id int, name varchar(255), price int, url varchar(255)); 8 | insert into shop values(1, "Exodia" ,20000,"https://publish.one37pm.net/wp-content/uploads/2021/02/5-1.jpg?fit=600%2C875"); 9 | insert into shop values(2, "Dark Armed Dragon" ,30000,"https://publish.one37pm.net/wp-content/uploads/2021/02/3-1.jpg?fit=813%2C1185"); 10 | insert into shop values(3, "Obelisk" ,40000,"https://publish.one37pm.net/wp-content/uploads/2021/02/7.png?fit=549%2C800"); 11 | insert into shop values(4, "Slifer The Sky Dragon",50000,"https://publish.one37pm.net/wp-content/uploads/2021/02/8.jpg?fit=600%2C875"); 12 | insert into shop values(5, "Super Quantal Mech King Great Magnus" ,60000,"https://publish.one37pm.net/wp-content/uploads/2021/02/super-quantal.jpg?fit=800%2C1167"); 13 | insert into shop values(6, "The Winged Dragon Of Ra" ,70000,"https://publish.one37pm.net/wp-content/uploads/2021/02/10.jpg?fit=600%2C875"); 14 | insert into shop values(7, "Victory Dragon" ,80000,"https://publish.one37pm.net/wp-content/uploads/2021/02/victory-dragon.jpg?fit=1096%2C1600"); 15 | insert into shop values(8, "The Tyrant Neptune",9000,"https://publish.one37pm.net/wp-content/uploads/2021/02/9.jpg?fit=813%2C1185"); -------------------------------------------------------------------------------- /KCSC Recruit/EnCryptBoizzz/source/src/index.php: -------------------------------------------------------------------------------- 1 | 48 | 49 | 50 |Quote của bạn:
57 |= new $_SESSION["color"]($_SESSION["quote"]) ?>58 |