Without a Break

[WebGoat] Command Injection 본문

Web/Wargame

[WebGoat] Command Injection

와븨 2024. 8. 26. 08:45

문제

 

 


'[/bin/sh, -c, cat "/root/.extract/webapps/WebGoat/plugin_extracted/plugin/CommandInjection/resources/AccessControlMatrix.html"]'

 

밑의 코드를 살펴보면 선택한 view 값이 파란 부분에 들어간다.

 

 

버프 스위트로 인터셉트를 켜서 view 버튼을 누른다.

 

HelpFile에 입력값이 들어가기 때문에, HelpFile을 이용해서 문자열을 추가한다.

 

'[/bin/sh, -c, cat "/root/.extract/webapps/WebGoat/plugin_extracted/plugin/CommandInjection/resources/AccessControlMatrix.html"";ls]'

"를 넣어 html 뒤의 "와 연결시켜 주고, ;로 명령문을 끝내준 후 실행할 명령어를 추가했다.

 

 

'Web > Wargame' 카테고리의 다른 글

[WebGoat] Stored XSS Attacks  (0) 2024.08.26
[WebGoat] Spoof an Authentication Cookie  (0) 2024.08.26
[WebGoat] Blind String SQL Injection  (0) 2024.08.25
[WebGoat] Blind Numeric SQL Injection  (0) 2024.08.25
[WebGoat] Stage 3: Numeric SQL Injection  (0) 2024.08.25