교내대회 Old school whitebox

<?php error_reporting(0); require_once 'config.php'; if(isset($_GET['username'], $_GET['password'])) { $username = addslashes($_GET['username']); $password = password($_GET['password']); $username = mb_convert_encoding($username ,'utf-8','euc-kr'); if(preg_match('/union.*select/i', $username)) { die('<h3>(つ゚⊿゚)つ Hey Nope!</h3>'); }…

Read More
Categories CTF Write ups Research

Hack.lu CTF 2018 – Baby PHP

<?php require_once('flag.php'); error_reporting(0); if(!isset($_GET['msg'])){ highlight_file(__FILE__); die(); } @$msg = $_GET['msg']; if(@file_get_contents($msg)!=="Hello Challenge!"){ die('Wow so rude!!!!1'); } echo "Hello Hacker! Have a look around.\n"; @$k1=$_GET['key1'];…

Read More
Categories Research

mysql jail

mysql console jail http://withphp.com:33306/ 원래 문제로 만들 생각은 없었는데 어쩌다보니 만들게 됨 문제가 아니더라도 평소에 online mysql 로 이용하면 좋을 거 같다.

Read More
Categories Research Web hacking

open_basedir bypass 정리

open_basedir 옵션은 PHP에서 접근할 수 있는 디렉토리에 제한을 두는 옵션이다. 이 옵션을 우회할 수 있는 방법이 여러가지 있는데, 일단 해캠에서 발표했던 내용만 정리한다. 해킹캠프18에서…

Read More