정보보안기사/실기 23회 D-26

정보보안기사 실기 D-2 목요일

멋쟁이천재사자 2023. 7. 27. 05:49

개인정보처리방침에 포함되어야 할 항목은 목보.항만.제위국.파미대안 입니다

목. 개인정보의 처리 목적
보. 개인정보의 처리 및 보유기간
항. 처리하는 개인정보의 항목
만. 만 14세 미만 아동의 개인정보 처리
제. 개인정보의 제3자 제공
위. 개인정보 처리의 위탁
국. 개인정보의 국외이전
파. 개인정보의 파기절차 및 방법
미. 미이용자의 개인정보 파기 등에 관한 조치
대. 정보주체와 법정대리인의 권리, 의무 및 행사 방법
안. 개인정보의 안전성 확보조치 등

두음 업데이트
https://it-freelancer.tistory.com/1268

 

정보보안기사 두음

클로버더빙으로 들을 때 자연스럽도록 다소 변형된 표현들이 있음. 양자암호 주요기술은 광양난양.분통콜키 입니다 대칭키는 파디씨.에스에이아.스알 입니다 비대칭키는 소알.이엘디.타이 입

it-freelancer.tistory.com




오늘도 사무실에 도착하면 기출 블로그 자료를 보자. 퇴근 셔틀에서는 두음 더빙 파일을 듣거나 유튜브 들을 것이고, 퇴근하면 실습이다.

작년 초부터 몇 가지 자격증 공부를 해오고 있는데 이번 정보보안기사가 준비 기간이 가장 짧은 것 같다. 고작 1개월 공부한 기술사는 합격과는 무관하게 오직 공부 목적이었으니 논외다.

실기 준비에 1개월은 역시 부족했다. 리눅스 설치. 환경 구성. sendmail dns등 각종 서버 설치. 취약점 만들기 또는 공격 실습 등을 해보고 싶었고, 이제 반틈 정도 진도가 나가고 있는 것 같은데 시험이 코앞이다.


암기노트 추가하자
cr lf %0d %0a
access-list 100 permit udp 192.168.1.0 0.0.0.255 any
interface FastEthernet 0/0
ip directed-broadcast 100


궁금증 연구하자
acct/pacct 든 명령어 기록 wtmp
IGRP EIGRP
https://youtu.be/zLo7J3UISok


cp -p  ...
zone 파일 자기 도메인과 아이피
항상 뒤에다 쩜 찍어야
설치시 도메인 어디에?

두음 추가하자
정량적 위험분석 방법은
과거자료분석법 확률분포법 몬테카를로시뮬레이션 수학공식접근법


실습 script
snort limit both threshold
iptables을 사용해서 동일한 발신자 IP가 동시에 5개 이상 초과하면 차단하는 Rule
iptables -A INPUT -p tcp --syn--dport 80-m connlimit --connlimit-above 5 -j DROP
• connlimit 모듈 : 동일한 IP 또는 IP 대역의 동시 연결 개수를 제한한다.
• connlimit-above: n개를 초과하는 동시 연결을 제한한다.

http://manual-snort-org.s3-website-us-east-1.amazonaws.com/node31.html

 

3.4 General Rule Options

Subsections The msg rule option tells the logging and alerting engine the message to print along with a packet dump or to an alert. It is a simple text string that utilizes the \ as an escape character to indicate a discrete character that might otherwise

manual-snort-org.s3-website-us-east-1.amazonaws.com



alert tcp any any -> any 80 (content:"BOB"; sid:1000983; rev:1;)
alert tcp any any -> any 21 {content:”anonymous”; nocase; msg:”Anonymous FTP attempt”;sid:1000012}



https://blog.naver.com/stereok2?categoryNo=29

 

온계절의 IT전문가를 꿈꾸는 이를 위한 성공 나침반 : 네이버 블로그

IT스페셜 리스트(기술사, 금융보안전문가, 정보보안기사, ISMS-P인증심사원) / 자기계발, 동기부여, 멘토링, 코칭 전문가 / 독서와 열정이 만드는 나비효과를 신봉하며, 인문과 기술이 균형잡힌 융

blog.naver.com

온계절님의 블로그를 쭈욱 훑어보며 끄적인다.

좀더 공부할 것들
퍼지행렬법 설명
바운스. 반사가 아니었다. FTP Bounce
실습 가능할까
stateful 방화벽과 stateless 방하벽
iptables 는 어디에 해당?

가능하면 실습해볼 것
iptables -j REJECT --reject-with tcp-reset
pwunconv
ifconfig eth0 -promisc


현재시각. 오후 4시 35분.
언제나 즐거운 퇴근 시각이 다가오고 있다.

 

 

실습진행

시간 구분 세부 내용
19:55 kali
promisc
간단 실습
ifconfig eth0 -promisc
ifconfig eth0 promisc

eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
20:04 centOS
pwunconv
pwunconv

 

┌──(root㉿kali)-[/etc/apache2]
└─# ifconfig eth0
eth0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        inet 192.168.35.67  netmask 255.255.255.0  broadcast 192.168.35.255
        inet6 fe80::4c1a:8a7:959:a95e  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:59:ac:84  txqueuelen 1000  (Ethernet)
        RX packets 9307  bytes 1727223 (1.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3169  bytes 447976 (437.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  base 0xd240

┌──(root㉿kali)-[/etc/apache2]
└─# ifconfig eth0 -promisc

┌──(root㉿kali)-[/etc/apache2]
└─# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.35.67  netmask 255.255.255.0  broadcast 192.168.35.255
        inet6 fe80::4c1a:8a7:959:a95e  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:59:ac:84  txqueuelen 1000  (Ethernet)
        RX packets 9329  bytes 1733309 (1.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3169  bytes 447976 (437.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 16  base 0xd240

 

 

 

[root@centos etc]# grep root passwd
root:x:0:0:root:/root:/bin/bash
operator:x:11:0:operator:/root:/sbin/nologin
[root@centos etc]# grep root shadow
root:$6$bxGpgYispfnRbT6Z$0sgq/T6i8RycsEWakt4ZcMtQzIJWJsFe9cgrQMIZisUg3tJq7BM1ai35prBpIycZGF8ejJrXw3vMq7IeO1rMz.::0:99999:7:::
[root@centos etc]# pwunconv
[root@centos etc]# grep root passwd
root:$6$bxGpgYispfnRbT6Z$0sgq/T6i8RycsEWakt4ZcMtQzIJWJsFe9cgrQMIZisUg3tJq7BM1ai35prBpIycZGF8ejJrXw3vMq7IeO1rMz.:0:0:root:/root:/bin/bash
operator:*:11:0:operator:/root:/sbin/nologin
[root@centos etc]# grep root shadow
grep: shadow: 그런 파일이나 디렉터리가 없습니다
[root@centos etc]# pwconv
[root@centos etc]#  grep root shadow
root:$6$bxGpgYispfnRbT6Z$0sgq/T6i8RycsEWakt4ZcMtQzIJWJsFe9cgrQMIZisUg3tJq7BM1ai35prBpIycZGF8ejJrXw3vMq7IeO1rMz.:19565:0:99999:7:::

 

 

시간 구분  
20:14 centOS
snort
snort
alert tcp any any -> any 80 (content:"BOB"; sid:1000983; rev:1;)


Commencing packet processing (pid=7748)
alert tcp any any -> any 80 (content:"BOB"; sid:1000983; rev:1;)
WARNING: No preprocessors configured for policy 0.
WARNING: No preprocessors configured for policy 0.
07/27-20:14:30.633587 10.0.2.16:51672 -> 3.36.253.109:123
UDP TTL:64 TOS:0x0 ID:20727 IpLen:20 DgmLen:76 DF

별도 추가 스터디하자
20:21 iptables 
CentOS
iptables -A INPUT -p tcp --syn --dport 80 -m connlimit --connlimit-above 5 -j DROP
20:25 httpd
CentOS
yum install httpd
systemctl start httpd
20:30
~
20:38
iptables 
CentOS
http://192.168.35.166/ 접속 가능

iptables -A INPUT -p tcp --syn --dport 80 -j REJECT --reject-with tcp-reset

http://192.168.35.166/ 접속 차단
-- 특정 소스 조건을 주거나 응답을 확인하는 방법등 공부하자
     
22:00 iptables  https://it-freelancer.tistory.com/1367
Guest -> CentOS : http://192.168.35.166/
ip.dst == 192.168.35.166 || ip.src == 192.168.35.166
--reject-with tcp-reset 유무에 따른 wireshark 확인
22:17 Anonymous
FTP
https://it-freelancer.tistory.com/1368
-- kali : 192.168.35.67
service vsftpd start
익명 FTP 접속 및 wireshark 확인
https://it-freelancer.tistory.com/1368
snort 탐지 보완 later
22:35 ACK Scan kali -> CentOS 192.168.35.166

nmap -sA -p 1-1023 192.168.35.166


CentOS

PORT    STATE    SERVICE
22/tcp  open     ssh
25/tcp  open     smtp
53/tcp  open     domain
80/tcp  filtered http
111/tcp open     rpcbind
631/tcp open     ipp


┌──(root㉿kali)-[/etc/apache2]
└─# nmap -sA -p 1-1023 192.168.35.166
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-27 09:33 EDT
Nmap scan report for 192.168.35.166
Host is up (0.00033s latency).
All 1023 scanned ports on 192.168.35.166 are in ignored states.
Not shown: 1023 unfiltered tcp ports (reset)
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 0.44 seconds

 

 

 

구분    
-j DROP All 1000 scanned ports on 192.168.35.166 are in ignored states.
Not shown: 1000 filtered tcp ports (no-response)
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 21.41 seconds
iptables -F Host is up (0.00029s latency).
Not shown: 996 closed tcp ports (reset)
PORT    STATE SERVICE
22/tcp  open  ssh
53/tcp  open  domain
80/tcp  open  http
111/tcp open  rpcbind
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)


┌──(root㉿kali)-[/etc/apache2]
└─# nmap -sA -p 1-1023 192.168.35.166
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-27 10:06 EDT
Nmap scan report for 192.168.35.166
Host is up (0.00016s latency).
All 1023 scanned ports on 192.168.35.166 are in ignored states.
Not shown: 1023 unfiltered tcp ports (reset)
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 0.43 seconds
-j REJECT Nmap scan report for 192.168.35.166
Host is up (0.00055s latency).
All 1000 scanned ports on 192.168.35.166 are in ignored states.
Not shown: 989 filtered tcp ports (no-response), 11 filtered tcp ports (port-unreach)
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)


┌──(root㉿kali)-[/etc/apache2]
└─# nmap -sA -p 1-1023 192.168.35.166
Starting Nmap 7.93 ( https://nmap.org ) at 2023-07-27 10:08 EDT
Nmap scan report for 192.168.35.166
Host is up (0.00093s latency).
All 1023 scanned ports on 192.168.35.166 are in ignored states.
Not shown: 1013 filtered tcp ports (no-response), 10 filtered tcp ports (port-unreach)
MAC Address: 08:00:27:C0:EB:AC (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 5.33 seconds