반응형 전체 글376 리눅스보안 - 필수 보안 조치법 리눅스보안 - 필수 보안 조치법 1. SUID 점검하기.(root 소유의 SetUID및 SetGID 파일들 점검 SetUID find / -user root -perm -4000 -print SetGID find / -user root -perm -2000 -print find / -user root -perm -4000 -print -xdev 2. 파티션별 디스크사용량 점검 df -h 3. 파일무결성 점검. http://weblog.websea.co.kr/tripwire/tripwire 4. 백도어 설치여부 점검.(/dev 체크 및 rootkit 점검) find /dev -type f -exec ls -l {} \; ./chkrootkit 5. 현재 열려진 포트 및 응답가능한 포트 점검. netstat.. 2017. 9. 30. PHP 이미지 리사이즈 함수 imagecopyresized PHP 이미지 리사이즈 함수 imagecopyresized 예제 2017. 9. 27. 반응형웹 개발 화면테스트 반응형웹 개발 화면테스트 http://quirktools.com/screenfly/ 2017. 9. 27. ModSecurity 구버전 2.5, 2.7 다운로드 ModSecurity 구버전 2.5, 2.7 다운로드 아파치 웹방화벽 모듈인 mod_security 버전이 2.9.2가 최신이다. 2.9 버전대로 변경되면서, 구버전에서 적용된 룰이 적용되지 않는다.구 버전의 룰을 적용하려면, 구버전용 프로그램을 다운받아 설치하여야 한다. https://sourceforge.net/projects/mod-security/files/modsecurity-apache/ 2.7.0, 2.6.8, 2.5.13 최신버전 다운로드http://www.modsecurity.org/ ModSecurity 매뉴 [영문]https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual *** 참고사이트 *** 공개웹방화벽 ModSecurity.. 2017. 9. 27. CentOS 6 apache 2.4 modsecurity 2.9 compile install CentOS 6 apache 2.4 modsecurity 2.9 compile install 어플리케이션 계정 생성# useradd -d /app app# passwd appChanging password for user app.New password:Retype new password:passwd: all authentication tokens updated successfully.의존 패키지 설치# yum install gcc gcc-c++ make perl zip unzip wget git zlib-devel libxml2 libxml2-devel ncurses ncurses-devel expat expat-devel소스파일 다운로드# mkdir /app/src/# cd /app/src# wget .. 2017. 9. 27. 아파치 로그 포맷과 CustomLog 지시자, 로그변수 로그포맷과 CustomLog 지시자 Module mod_log_config 은 아파치 기본 모듈입니다. 로그 포맷 스트링 %a : 원격의 IP 주소 %b : 헤더를 포함한 전송량(bytes) %{var}e : 환경 변수 "var" %f : 파일이름 %h : 원격의 호스트 %{hdr}i : 서버에 들어오는(요청) 헤더 값 "hdr" %l : 원격의 로그인 ID(지원한다면) %{label}n : 다른 모듈에서 "label" 구성 %{hdr}o : 응답 헤더 값 "hdr" %p : 서버의 Canonical 포트 번호 %P : 자식 프로세스 ID(PID) %r : 첫번째 요청 라인 %s : 상태코드 %t : 시간 포맷(CLF 포맷) %{format}t : "format"으로 구성된 시간 포맷 %T : 서버에 요.. 2017. 9. 27. 아이피 IP 계산기 아이피 IP 계산기 네트웍 아이피, 서브넷 마스크 , 마스크 비트를 이용하여 할당된 IP의 갯수 및 시작IP와 끝 IP를 알 수 가 있습니다. 아래의 주소에서 쉽게 계산을 할 수 있습니다. http://www.subnet-calculator.com/cidr.php 다른 방법 IP 계산기 http://www.subnet-calculator.com/subnet.php?net_class=B http://www.subnet-calculator.com/wildcard.php https://www.easycalculation.com/other/network-ip-calculator.php 2017. 9. 27. mod_security2 설치 mod_security2 설치 mod_security 모듈은 가장 널리 알려져 있는 웹 서비스 (http, https)의 공격을 효과적으로 차단할 수 있는 공개 웹 방화벽입니다.Apache 모든 버전에서 적용에서 설치, 적용이 가능합니다.공격 패턴의 종류로는 XSS, PHP Injection, SQL Injection, Command Execute 등이 있습니다.1. 설치를 위한 준비- PCRE(Perl Compatible Regular Expressions) 설치* 사이트 주소 : http://www.pcre.org/ 에서 다운로드tar xvfz pcre-8.00.tar.gzcd pcre-8.00./configure --prefix=/usr/local/pcremake make install 2. .. 2017. 9. 22. apache 버전 감추기 아파치 버전 감추기 1. httpd.conf 파일 수정 # vi /etc/httpd/conf/httpd.conf (rpm 기본 설치된 버전일 경우) # vi /usr/local/apache2/conf/extra/http-default.conf (컴파일 경우) 아래와 같이 수정 # # Don't give away too much information about all the subcomponents # we are running. Comment out this line if you don't mind remote sites # finding out what major optional modules you are running #ServerTokens OS ServerTokens ProductOnly Pro.. 2017. 9. 10. 아파치 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 에러 발생시 해결방법 아파치 실행시 아래와 같은 오류 발생시 해결 (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 난감하죠~ㅜㅜ; 1. httpd 프로세스 죽이기 ps ax | grep httpd | awk '{print $1}' | xargs kill 2. 프로세서 찾아 죽이기 netstat -nlp | grep :80 tcp 0 0 :::80 :::* LISTEN 7688/httpd kill -9 7688 3. 아파치 시작 service httpd start service httpd restart 휴~~ 살.. 2017. 9. 10. 리눅스 하드디스크 온도측정 리눅스 하드디스크 온도측정 hddtemp 프로그램 설치 설치yum install hddtemp 실행 예 hddtemp /dev/sdb * 하드디스크 S.M.A.R.T. 기능이 지원되어야함.. 레이드구성 안됨. 2017. 9. 6. 리눅스 온도체크(lm_sensors), sensor 리눅스 CPU 온도 체크 lm_sensors 모듈이 CPU온도를 체크한다. * CentOS 기준으로... 설치하기 yum install lm_sensors 설정sensors-detect 실행sensors 실시간으로 모니터링을 진행하시고 싶다면 watch를 이용해주세요. # watch sensors 2017. 9. 6. 이전 1 ··· 24 25 26 27 28 29 30 ··· 32 다음 반응형