본문 바로가기

IT 엔지니어/Linux server

(49)
Web security 취약점 [IP 별 접근통제]welcome.conf 주석 처리/etc/httpd/conf/httpd.conf var/www/htmlindexesall deniedRequire ip 192.168.10.200 192.168.10.150 192.168.10.0/24환경 설정 파일에 index 설정이므로 index.html 파일 없을 시 in.html 존재 시디렉터리 리스팅 확인 index 설정 삭제 시 거부됨 AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require all granted Require ***not***..
Web Security 사용자별 가상호스팅vi /etc/httpd/conf.d/userdir.conf AllowOverride FileInfo AuthConfig Limit Indexes Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec Require method GET POST OPTIONSuserdir public_html //// 주석 해제     아파치 디렉터리 리스팅 서비스 해제/etc/httpd/conf.d/userdir.conf1. index 옵션 삭제2. index.html 파일 생성  vi /etc/httpd/conf.d/welcome.conf[테스팅 화면] Options -Indexes -> 테스팅 화면 /// - 삭제, 전..
SSL/TLS dnf -y install httpd bind openssl mod_ssl# cd /etc/pki/tls/certs  [개인키 생성]# openssl genrsa -out http.key 2048lrwxrwxrwx. 1 root root 49 8월 22 2024 ca-bundle.crt -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pemlrwxrwxrwx. 1 root root 55 8월 22 2024 ca-bundle.trust.crt -> /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt-rw-------. 1 root root 1704 3월 26 17:08 http.key[CSR 인증서 발급..
TOMCAT dnf -y install tomcat* java* 251 netstat -tuna | grep java 252 lsof -i tcp:8080---------------------------------------# cd /usr/share/tomcat/webapps/ROOT# cd /usr/share/tomcat/webapps/conf# vi /etc/tomcat/tomcat-users.xml# cd /usr/share/tomcat/conf :symboliclink -------------------------------- 61,65번 주석 해제 password='123456' 변경    cd /usr/share/tomcat/webapss/ROOT-------------------------..
Web Security [웹 아키텍쳐] 웹 클라이언트 - 웹 서버 - WAS - DB 웹 프록시서버 과부하 방지인증 및 캐싱 저장    URL URIURL protocol doman fqdn port path parameterURI protocol doman fqdn port path parameterSSL / TLS -transport- application까지  [TCP header]src / dessequenceack numurg ack psh rst syn fin [window] size  3 way 4 way3way SSL TLSclient helloserver hellopre,asterfinisehedfisnishedexcahnge messagese[HTTP 프로토콜]클라이언트 서버 구조무상태성 - 요청에 대한 응답..
KAIL linux & UTM KAIL(공격) ↔ UTM ↔ Rocky Server[UTM]네트워크 보호 - 침입 방지 - TCP SYN Flooding- UDP Flooding- ICMP Flooding[WEB Flooding=TCP SYN 플러딩 ]hping3 -a 100.100.100.100 192.168.20.150 -S -p 80 --flood-S : SYN -p : port -a : 출발지 주소 [UDP Flooding]hping3 -a 100.100.100.100 192.168.20.150 -d 65000 -p 53 --flood[ICMP Flooding]hping3 -1 --flood 192.168.20.150hping3 -1 -S -a 8.8.8.8 --flood 192.168.20.150[실시간 추적]tcpdu..
Security Protection dnf -y updatednf -y install curldnf -y install gitdnf -y install pcre*울dnf -y config-manager --set-enabled crbdnf -y install dnf-plugins-corednf -y install epel-releasednf -y upgrade# vi /etc/ld.so.conf.d/local.conf추가 입력/usr/local/lib/usr/local/lib64 # ldconfig[ Snort 3 ]snort 설치git clone 컴파일 및 설치cd centos9-snort3sh installer.sh셸 파일 실행허가권 변경chmod +x installer.shdnf install -y cmake gcc gcc-c++ f..
Snort [snort rule]***[룰 헤더]*** [옵션]***alert icmp any any -> any any*** (msg:"Detected";sid:1000001;rev:1;)Action Protocol 출발지 호스트/포트 -> 목적지 호스트/포트 (옵션)1. Action 유형alert - 경고 발생 및 로그 기록drop - 패킷 차단 및 로그 기록reject - 패킷 차단 및 로그 기록log - 로그 기록pass - 패킷 무시2. 옵션 종류msg - 탐지 시 출력 메시지content - 패킷 포함된 문자열로 탐지nocase- 대소문자 무시offset- 패킷의 상대적 길이sid - snort id - 고유 식별자rev - 룰 변경 시 수정snort.org - download rules - commnu..