목록CTF (59)
개발세발보안중

파일을 열면 플래그가 나오는 것 같은데 서버가 안열린다 넷캣을 설치한다. netcat은 TCP또는 UDP를 이용하여 데이터를 읽고 쓰는 유틸리티이다. 흠.. 아무튼 넷캣 설치하고 서버 열면 플래그가 뜰 것 같다.

https://dreamhack.io/wargame/challenges/413 Command Injection Advanced Description Exercise: Command Injection Advanced에서 실습하는 문제입니다. 문제 수정 내역 2023.07.27 Dockerfile 제공 dreamhack.io escapeshellcmd() 함수를 통해 문자를 필터링하는 코드이다. shell_exec()함수로 curl명령에 입력받은 인자를 실행한다. chache folder에서 md5(url)로 파일을 만들고 내용을 넣는다. curl 명령어에 -o 옵션을 사용하면 임시 파일을 생성할 수 있다. -o /var/www/html/cache/webshell.php http://host3.dreamha..

https://dreamhack.io/wargame/challenges/768 command-injection-chatgpt 특정 Host에 ping 패킷을 보내는 서비스입니다. Command Injection을 통해 플래그를 획득하세요. 플래그는 flag.py에 있습니다. chatGPT와 함께 풀어보세요! Reference Introduction of Webhacking dreamhack.io 서버 생성해서 들어가면 다음과 같은 화면이 나온다 flag.py에 flag가 있으므로 command injection으로 파일을 읽는 명령어를 입력해본다.

if ($_SERVER["REQUEST_METHOD"] == "POST") { $input_name = $_POST["input1"] ? $_POST["input1"] : ""; $input_pw = $_POST["input2"] ? $_POST["input2"] : ""; // pw filtering if (preg_match("/[a-zA-Z]/", $input_pw)) { echo "alphabet in the pw :("; } else{ $name = preg_replace("/nyang/i", "", $input_name); $pw = preg_replace("/\d*\@\d{2,3}(31)+[^0-8]\!/", "d4y0r50ng", $input_pw); if ($name === "dnyang..
보호되어 있는 글입니다.