9일차

루트가 주인 
st.kr >/home/st/public_html
st : 192.168.0.208/~st
yys.kr > /home/yys/pubilc_html
yys : 192.168.0.208/~yys

제일 취약 한 곳 : web

st.kr이 연결이 되도록 설정하기
만드는 건 주말에... 

xshell 
ssh 192.168.0.208:22

cd /etc/apache2 > 여기서 설정해야 도매인으로 접속 가능
ls
cd apache2.conf | more

cd apache2/sites-available
nano /etc/apache2/sites-available/hosting.conf

 DocumentRoot /home/st/public_html
 ServerName st.kr
 ServerAdmin st@st.kr
 ErrorLog /home/st/public_html/logs/error.log
 CustomLog /home/st/public_html/logs/access.log combined

저장 후
su
123456

a2ensite hosting
systemctl reload apache2
해준 뒤 gns에서 서버 재시작 하기

칼리로 서버 접속
ssh master@10.0.2.102

칼리에서 한글 깨짐 현상
sudo apt update
sudo apt -y install fctitx-lib*
sudo apt -y install fcitx-hangul
sudo apt -y install fonts-nanum

웹서버 취약점 찾기
nmap -v
nikto -host 10.0.2.102
hydra -L user.txt -P passwd.txt 10.0.2.102

도메인 서버는 길을 찾는 역할

칼리는 아이피를 DHCP로 설정

칼리에서 nslookup st.kr를 입력하면
10.0.2.15로 물어보아 접속이 불가하므로 10.0.2.101로 접속 할 수 있게 해주기
> 방화벽에서 DHCP DNS 서버를 10.0.2.101로 변경하기


cd /etc/bind
nano /etc/bind/named.conf.options에 들어가서


이후 nano /etc/bind/named.conf.default-zones에서

named-checkconf 적용


미션
102 서버 정보수집하기

su
123456
cd /home/st/public_html
ls
cd logs
tail -f access.log

비번 찾기 칼리에서 입력
nmap -v

nano user.txt
nano passwd.txt

nikto -host 10.0.2.102 > /var/www/html
nikto -host intra.st.kr > /var/st/public_html
hydra -L user.txt -P passwd.txt intra.st.kr http-post-form"login_chk.php:id=^USER^&pw=^PASS^:fail" -V


사전공격 가능한 포트
21
22
23
80(웹 로그린 기능에 기능)
3306(데이터 베이스가 외부 연결이 가능할 경우)

미션2
본인 이니셜 도메인으로 웹사이트 접속 가능하도록 설정하기
일번적으로 만들어지는 폴더는 웹스캔 긴으로 확인이 가능하다
예 : auth, login, includes 기타 등등
예 : lsw.kr


domin 서버에서
su
123456
cd /etc/apache2
nano sites-available/hosting.conf   > yys.kr 추가                                                                                                                                                   	
cp db.local yys.kr.zone
nano yys.kr.zone > 이니셜로 모두 변경
systemctl restart apache2
amed-checkzone yys.kr yys.kr.zone 연결 확인




내일은 이메일 공격해보기

2025 산대특