2024년 2월 22일
#hacker 라우터 config t hostname Korea interface FastEthernet0/0 ip address 100.100.100.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.1 255.255.255.252 no shutdown exit ip route 220.87.199.0 255.255.255.0 1.1.1.2 exit show running-config #호주라우터 config t hostname Australia interface FastEthernet0/0 ip address 220.87.199.254 255.255.255.0 no shutdown exit interface Serial1/0 ip address 1.1.1.2 255.255.255.252 no shutdown exit ip route 100.100.100.0 255.255.255.0 1.1.1.1 #라우터보안조치 config t security passwords min-length 8 line consol 0 password 12345678 login service password-encryption enable secret 12345678 line vty 0 4 password 12345678 login enable password 12345678 enable secret 12345678 config t hostname Korea ip domain-name st.au crypto key generate rsa 2048 ip ssh time-out ip ssh version 2 ip ssh authentication-retries 3 line vty 0 4 transport input ssh login local exit username admin password 12345678 exit 미션1 utm9의 outSide의 ping 반응을 차단하라!! 미션2 nslookup st.au가 반응되도록 설정하라! 반응 확인 후 2.2.2.1로 응답하는 IP를 변경하라!! 몇번으로?? -> 20.20.20.1 웹서버에 접속하라! 악성코드를 만들어서 메일로 보내라! [메일서버 세팅] 이메일설정 master@3.3.3.2 SMTP(Simple Mail Transfer Protocol) : 보낼때 사용 sendmail <---> postfix sudo apt -y install sendmail sudo nano /etc/bind sudo nano /etc/mail 보내는 설정 kali@mail.st.au master@mail.st.au sudo nano /etc/hostname mail > mail.st.au (가장 중요) sudo nano /etc/mail/local-host-names mail.st.au sudo nano /etc/mail/sendmail.cf Cwlocalhost > Cwst.au SMTP daemon options Addr=127.0.0.1 Addr=127.0.0.1 sudo nano /etc/mail/access makemap hash /etc/mail/access < /etc/mail/access ssh 접속시 메일서버를 이용해서 알람 nano /etc/profile > .profile,.bashrc #add IP="$(echo $SSH_CONNECTION | cut -d " " -f 1)" HOSTNAME=$(hostname) NOW=$(date +"%e %b %Y, %a %r") echo 'Someone from '$IP' logged into Main1 '$HOSTNAME' on '$NOW'.' | mail -s 'SSH Login Notification' master@mail.st.au sudo apt -y install mailutils 설치후 메일이 정상적으로 오는지 확인하기 받는 설정 nano /etc/dovecot/dovecot.conf listen = *,:: base_dir disable_plaintext_auth = no nano /etc/dovecot/conf.d/10-mail.conf mail_access_groups = mail lock_method=fcntl systemctl start sendmail systemctl start dovecot systemctl enable sendmail systemctl enable dovecot adduser kali passwd kali > kali 칼리에 sudo apt update sudo apt -y install thunderbird sudo apt -y install evolution 메일 점검 방법 cd /var/log/mail