방화벽
10.10.10.1 > st.kr 22001로 접속 가능하도록 설정
10.10.10.2 > str.kr 22002
10.10.10.3 > st.kr 22003으로 접속 가능하도록 설정
15:00까지 시나리오1
분석완료후 분석 내용 보고서 작성
문제와 분석 내용 정리
미션1
st.kr의 index.html을 수정하라!
분석일지를 만들어라!
서버 모니터링 시스템 설치
apt -y install netdata
vi /etc/netdata/netdata.conf
bind socket to IP = 0.0.0.0
apt -y install awstats
확인하려면 웹 10.10.10.1/cgi-bin/awstats.pl
apt -y install sysstat
apt -y install prometheus prometheus-node-exporter
apt -y install aide
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-3+ubuntu22.04_all.deb
dpkg -i zabbix-release_6.0-3+ubuntu22.04_all.deb
apt update
apt -y install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent2 php-mysql php-gd php-bcmath php-net-socket
create database zabbix character set utf8 collate utf8_bin;
create user zabbix@localhost identified by '123456';
grant all privileges on zabbix.* to zabbix@localhost;
quit;
디스크 용량 늘리는 방법
물리적인 디스크를 추가해주고
fdisk -l
fdisk /dev/sdh
n
p
w
mkfs.ext4 /dev/sdh1
vgs 로 여유공간 확인
pvcreate /dev/sdh1
y
vgextend /dev/ubuntu-vg /dev/sdh1
lvextend -L +30G /dev/ubuntu-vg/ubuntu-lv
resize2fs /dev/ubuntu-vg/ubuntu-lv
df -h
미션2
tripwire를 설치하라! (Host Baseed Intrusion Detection System) IDS
apt update
apt-get install tripwire
cd /etc/tripwire
vi twcfg.txt
twadmin -m F -c tw.cfg -S site.key twcfg.txt
vi twpolmake.pl
perl twpolmake.pl twpol.txt > twpol.txt.new
twadmin -m P -c tw.cfg -p tw.pol -S site.key twpol.txt.new
tripwire -m i -s -c tw.cfg
tripwire -m c -s -c /etc/tripwire/tw.cfg
ll /var/lib/tripwire/report
tripwire -m u -a -s -c /etc/tripwire/tw.cfg -r /var/lib/tripwire/report/IP211.st.kr-20250208-121924.twr
tripwire --check --interactive
ll /var/lib/tripwire/report
twprint --print-report --twrfile /var/lib/tripwire/report/IP211.st.kr-20250208-121924.twr
참고 사이트
https://www.server-world.info/en/note?os=Ubuntu_18.04&p=tripwire
http://st.kr
웹 방화벽
mod_security (Web Application Firewall)
apt -y install libapache2-mod-security2
apt -y install roundcube roundcube-mysql
https://st.kr
self https: 자체 인증서
apt -y install openssl
진짜 서버 운영시
공인 인증서 : 대행업체 (letsencrypt.org)
apt -y install certbot
cerbot certonly --webroot -w /home/web1/public_html -d web1.st.kr
시나리오2
1)컴퓨터는 언제 부팅 되었는가
2시41분
2) 사용자는 누구인가?
manager
3) 관리자는 몇번 시스템에 로그인 했는가?
레지스트리 확인
4) 해커가 정보 수집을 하는 시간은 언제인가?
서버 (netdata...) 2시 50분
5) 무슨 정보를 수집하려고 했는가?
> 패킷 분석하기 (방화벽 네트워크 확인
192.168.0.211
naver.com
google.com
6) 공격을 했는가?
7) 공격을 했다면 무슨 흔적들이 남는가?
8) 웹서버에 파일이 업로드 되었는가?
9) 관리자가 파일을 다운로드 받았는가?
10) 받고 실행은 했는가?
웹 보호
웹 필터링
새 필터 동작
웹사이트에 naver.com