# ์ฌ์ฉํ์ง ์์ผ๋ฉด ์ค๋ณต๋ ๊ฐ์ด ๋ฐ ๋ ์ค๋ฅ๊ฐ ์๊ธด๋ค
cat /root/.john/john.pot
rm /root/.john/john.pot
# md5๋ก ์ํธํ๋ ๊ฒ ํ์ธ
cat /etc/shadow | grep root
$6$ : ํด์ํจ์๋ก ์ํธํ // 18605 : ๋น๋ฐ๋ฒํธ ์์ฑ ์๊ธฐ ํ๊ธฐ // 0 : ๋น๋ฐ๋ฒํธ๋ฅผ ๋ณ๊ฒฝํ ์ ์ด ์๋ค ( ๋น๋ฐ๋ฒํธ ๋ณ๊ฒฝํ ํ ํ๋ฅธ ์๊ธฐ ) // 99999 : 99999์ผ ๋์ ๋น๋ฐ๋ฒํธ ์ฌ์ฉ ๊ฐ๋ฅ // 7 : ๋น๋ฐ๋ฒํธ ๋ง๋ฃ ๋๊ธฐ 7์ผ์ ์ ์๋ ค์ค๋ค
john the ripper์ ์ ๋ณด ํ์ธ
# passwdํ์ผ๊ณผ shadow ํ์ผ์ ํฉ์ณ์ /tmp/password.txt.๋ก ์ ์ฅ
unshadow /etc/passwd /etc/shadow > /tmp/password.txt
# crype : ์ ๋์ค/๋ฆฌ๋
์ค์์ ์ฌ์ฉ ๊ฐ๋ฅ // wordlist : ๋ ์ธ๋ณด์ฐ ํ
์ด๋ธ ๊ฐ๋
# python์ด๋ผ๋ ๊ณ์ ์ ๋น๋ฐ๋ฒํธ 1234 ๋ณต์ // root๋ผ๋ ๊ณ์ ์ ๋น๋ฐ๋ฒํธ 1234 ๋ณต์
john --format=crypt --wordlist=/usr/share/john/password.lst /tmp/password.txt
๋ฆฌ๋
์ค์์ ์ฌ์ฉ๊ฐ๋ฅํ ๋ช
๋ น์ด // ์ต์
์ ๋ช
์ํ๊ฒ๋ณด๋ค ์๊ฐ์ด ๋๋ฆฌ๋ค
# ํด์๊ฐ์ ํ์ด์ ์๋ณธ์ ์ํ๋ก ๋ณต์ํด์ ํ์ธ ๊ฐ๋ฅ
john --show /tmp/password.txt
# root์ ํด๋นํ๋๊ฒ๋ง ๋ณต์ ์๋ํ๋ค
john --users=root /tmp/password.txt
cat > malware.c
include <stdio.h>
int main() {
printf("Hello, world!\n");
return 0;
}
apt-get install gcc-mingw-w64
gcc -g -o malware malware.c
i686-w64-mingw32-gcc -o malware.exe malware.c
chmod 777 malware.exe
malware : ๋ฆฌ๋
์ค์์ ์ธ ์
์ฑ์ฝ๋ // malware.exe : ์๋์ฐ์์ ์ธ ์
์ฑ์ฝ๋ ์ ์