DVWA Training - Command Injection
Command Injection(๋ช ๋ น์ด ์ฝ์ ๊ณต๊ฒฉ)
์ ์
๐กCmd(/bin/bash, SetUID, etc..)์ ์คํ ๊ถํ์ผ๋ก ๋ช ๋ น์ด๋ฅผ ์ฝ์ /๊ณต๊ฒฉ ํ์
syscall๊ณผ ๊ฐ์ shell ์คํ ๊ถํ์ด ์๋ ๊ธฐ๋ฅ์ ์ด์ฉํ์ฌ ๊ณต๊ฒฉ ๋ช
๋ น์ด๋ฅผ ์ฝ์
/๊ณต๊ฒฉํ๋ ํ์์ด๋ฉฐ,
์์คํ
ํจ์์์ ์ฃผ๋ก ์ฌ์ฉ๋ฉ๋๋ค.(์ฐํ ์ ๊ฐ๋ฐ ๋์ด๋ ↑ ์๋๋ ๊ฒฝ์ฐ๋ ์๊ณ ..)
CI์ด๋ผ๊ณ ๋ถ๋ฆฌ๋ฉฐ, ์ด์ ์๋ง์ ์ฐ๊ณ ์ทจ์ฝ์ ์ผ๋ก๋ ์ด์ด์ง๋๋ค.
์ด ๋ถ๋ถ์ ๋ค๋ฅธ OWASP10๊ณผ ์ฐ๊ด์ด ๋์ด ์๊ธฐ๋ ํ๋ ์ด ๋ถ๋ถ์ ์๋ก ์ด๋ฏธ์ง๋ก ํ์ธํด๋ด
์๋ค.
๊ณต๊ฒฉ ์ ํ
์ผ๋ฐ์ ์ผ๋ก syscall์ ์ทจ์ฝํ ํจ์์์ ์ด์ฉํฉ๋๋ค. ์ด๋ค ์์ผ๋ก ์ ๊ทผํ๋์ง ์ข ๋ฅ๋ก ๋๋๋ค๋ฉด..
์๋ฐ์ ์ก
๐ก๋ฐ์ธ๋ ์[Bind Shell]
: Server์์ ํฌํธ๊ฐ ์ด๋ ค์์ผ๋ฉฐ, ํด๋ผ์ธก์ด ์ ์ํด ์์ ํ๋
- ์ผ๋ฐ์ ์ผ๋ก ๊ฐ์ฅ ๋ง์ด ํต์ฉ๋๋ ๋ฐฉ์(Ex. SSH, Telnet, nc, etc..)
๐ก๋ฆฌ๋ฒ์ค ์[Reverse Shell]
: ํด๋ผ ์ธก์ด ์๋ฒ๋ฅผ ์ด๊ณ ์๋ฒ์์ ์ ์ํ๋ ํํ
- ๋ฐฉํ๋ฒฝ์ ์ํ์ฌ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๊ฐ ๋ค๋ฐ์ด๋ฉฐ, ๋ฐฉํ๋ฒฝ์ ์ฝ์ ์ ๊ณต๊ฒฉํจ
L ์ธ๋ถ → ๋ด๋ถ๋ ๋ณดํธ/ ๋ด๋ถ → ์ธ๋ถ ๋ณดํธ X ๊ฒฝํฅ
CI์ ํต์ฌ์ ์์ ํ๋ํ์ฌ ์ปค๋์ ์กฐ์ํ๋ ๋ฐฉ์์ด๋ฏ๋ก ์์คํ
๋ณด์ ๊ด์ ์์๋
์ ์ฌํ๊ฒ ๋ณผ ์ ์์ต๋๋ค. ์ด์ ๋น์ทํ ๋ฐฉ์์ ๊ตฌ์กฐ(๋คํธ์ํฌ ๊ด์ ์ด๋ผ ๋ค ๋น์ทํ๋ค์)
์๋ก ๋งํฌ์ ์์ผ๋ ์ฐธ๊ณ ๋ก ๋ณด์
๋ ์ข์ ๋ฏ ์ถ๋ค์
Proxy meaning
ํ๋ก์(Proxy)๋? ์๋ฌธ ์๋ฏธ๋ก "๋๋ฆฌ"๋ผ๋ ์๋ฏธ๋ฅผ ๊ฐ์ ํ๋ก์ ์๋ฒ๋ก์จ Client๊ฐ ์์ ์ ํตํด์ ๋ค๋ฅธ ๋คํธ์ํฌ ์๋น์ค๋ฅผ ๊ฐ์ ์ ์ผ๋ก ์ ์ํ ์ ์๋๋ก ํด์ฃผ๋ ์ปดํจํฐ ์์คํ ์ด๋ ์์ฉ ํ๋ก๊ทธ๋จ์
dystopia050119.tistory.com
WriteUp
์์ ๊ฐ์ด ์คํํ์๊ณ .. ์๋๋๋ก ์คํ์ ํ๋ค๋ฉด Ping a device(IP addr connetcion)
CI์ ์ทจ์ฝ์ ์ ํ์ฉํ์ฌ ๊ฐ์ CI ๊ณต๊ฒฉ์ ์ทจํ ๋ชจ์ต์
๋๋ค.
์ด ๋ถ๋ถ์ ์ ๊ฐ Hacker School FTZ์ ๊ฐ์ ๊ณณ์์ ์์ฃผ ํ ๋ถ๋ถ์ด๋ผ์..
HackerSchool_level3
Level3 ๋ฌธ์ ํ์ด Keyword : System() func weakness ๋ฌธ์ ํ์ ์ด์ ์ด๋ ๋น๊ตํ๋ฉด ํ๋ค์ด๋ณด์ด๋ค์ ใ ์ ์ฝ๋๋ฅผ ๋ฏ์ด๋ด ์๋น~ ์ด์ ์ ์ C์ธ์ด์ ์์ค์ฝ๋์ ์๋ ์์๋ฅผ ์์๊ณ autodig ํ์ผ ์ฐพ์๊น์? autodig
dystopia050119.tistory.com
์์ ์๋ฃ๋ฅผ ์ฐธ๊ณ ํ์๊ธธ ๋ฐ๋๋๋น ใ
php๋ฅผ ์ ์๋๊ฑด ์๋์ง๋ง ์ด๋์ ๋์ ์ค๋ ฅ์ผ๋ก ๋ถ์ํ์๋ฉด..
- ์ฌ์ฉ์์ ์
๋ ฅ์ ๊ทธ๋๋ก ๋ฐ์(POST ๋ฐฉ์)
- ๋ฐ์ ์์ฒญ์ target์ ๋ฃ์ด์ค(์ค๊ฐ ํํฐ๋ง X)
- cmd ์ ํจ์์ ํด๋น ๋ช ๋ น์ด๋ฅผ ์คํ
์ด์ ๊ฐ์ด ์ทจ์ฝ์ ์ ํ์ธ ํ ์ ์์ต๋๋ค.
Exploit code
How to Brute Force DVWA login with Python
In this article, I want to show you one of the most known attacks in the cybersecurity field. And as
stackzero.net
์์ ์๋ฃ๋ฅผ ๋ณด๊ณ ์์ฑํ์์ต๋๋ค.
์น ๋ณด์์ ๋ํ์ฌ ๊ณต๋ถ๋ฅผ ๋ง์ด ๋ชปํ ์ํ๋ผ์.. ใ
์ถํ์ ๊ณต๋ถ ํ ๋ ์ ๋ฆฌํด๋ด์ผ๊ฒ ๋ค์
(ํดํค๋๊ฐ ๋๋ฉด ์๋๋๊น์)
Exploit code
ํด๋น ๊ตฌ์ฑ ์์๋ burp suite์์ ํ์ธ ํ ์ ์์์ผ๋ฉฐ, ๊ธฐ์ด์ ์ธ ํ์ ์์ ๋งํฌ ๋ณด๊ณ ์ฐธ๊ณ ํ์ต๋๋ค.
์์งํ ํ์ด์ฌ ์ข ๋... ๋ฐฐ์์ผํ ๊ฑฐ ๊ฐ์์ ใ
๋ณด์ ๋ฐฉ์
์ด ๋ถ๋ถ์ ์๋ฌด๋๋ ํฌ๊ฒ ์ํธํ ๋น๋ฒ์ ๋ณต์ก๋๋ฅผ ํฅ์์ํจ๋ค๋์ง,
์ง์ฐ ์๊ฐ์ ์ฃผ๋์ง, ์
๋ ฅ ํ์ ์ ํ ๋ฑ์ ๋ฐฉ์์ด ์๊ฒ ์ฃ ?
์ ํํ ๋ถ๋ถ์ PHP ์ฝ๋๋ฅผ ํ์ธํด์ผ์ง๋ง.. High ๋ฌธ์ ํ๋ฉด์ ๊ฐ์ด ์์๋ณผ๊ป์
How Secure Is My Password? | Password Strength Checker
Data breaches and identity theft are on the rise, and the cause is often compromised passwords. After stealing credentials, cybercriminals can use passwords to
www.security.org
์ฐ๋ฆฌ์ ๋น๋ฒ์ผ๋ก๋ 10^-24s ๋ง์ ํ๋ ค๋ฒ๋ฆฐ๋ค๊ณ ํ๋ค์
์ฐธ๊ณ ์๋ฃ
What is command injection and how to exploit it
In this article I want to introduce you to command injection with a very simple practical example.I also suggest you
stackzero.net
์ฐธ๊ณ ์ด๋ฏธ์ง
What is OS command injection, and how to prevent it? | Web Security Academy
In this section, we'll explain what OS command injection is, describe how vulnerabilities can be detected and exploited, spell out some useful commands and ...
portswigger.net