본문 바로가기

php69

728x90
mysql+php connection pooling sqlrelay 참조 http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=25928 http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=36317 mysql+php 환경에서 db pool로 알려진 sqlrelay 를 설치하여 테스트 해보는게 이문서의 목적이다. 다운로드 rudiments : http://sourceforge.net/projects/rudiments/ sqlrelay : http://sourceforge.net/projects/sqlrelay/ 현재 버젼 : rudiments-0.30.tar.gz, sqlrelay-0.38.tar.gz 다음 설치 환경.. 2010. 2. 2.
modsecurity php 업로드 제한설정 작성자 : 홍석범 확장자로 필터링할 수 있는 방법도 있겠지만 실제로 공격자 입장에서는 이를 우회할 수 있는 방법이 매우 많이 있습니다. 실제로 double extension이나 .txt 또는 .gif 등의 확장자를 사용하지만 실제 php코드인 경우가 매우 많이 있습니다. 따라서 단순 확장자 필터링 방법보다는 이 방법이 어떨까 합니다. SecRule FILES_TMPNAMES "@inspectFile /usr/local/sbin/chk_upload.sh" "log,auditlog,deny,status:403,phase:2" 와 같이 지정한 후 해당 쉘스크립트(chk_upload.sh)에서는 파일의 콘텐츠에 " 2010. 1. 11.
Redis Command Reference memcached 류의 Key-Value 모델 이상의 역할을 수행하는 것이 가능하다. PHP와 Redis만으로 (즉, 별도의 Database 등을 사용하지 않고) 개발되고 있다. Every command name links to a specific wiki page describing the behavior of the command. Connection handling QUIT close the connection AUTH simple password authentication if enabled Commands operating on all the kind of values EXISTS key test if a key exists DEL key delete a key TYPE key return th.. 2009. 12. 17.
안전한 PHP 프로그래밍 (첨부파일 다운 & include 함수) 1. 게시판 첨부파일 다운로드 개발시 주의점 국내 대형 IDC 운영사 사이트의 한 게시판에서 첨부파일 다운로드할 때, 내부 파일까지 다운로드할 수 있는 취약점이 있었다. 즉, /etc/ 이하의 파일이나 웹서버 설정 파일, 로그 등을 원하면 쉽게 받아볼 수 있는 취약점이었다. 이를테면 이런식이다. URL/download.html?path=/etc&file=resolv.conf&savename=resolv.txt (물론 위처럼 직접적으로 URL을 표시하지 않았지만, 눈치만 있으면 쉽게 알 수 있음) /etc/resolv.conf 를 받아서 PC에 resolv.txt 이름으로 저장하라는 예이다. '어서오세요. 저희는 개방적인 마인드로 서버의 모든 것을 네티즌에게 원하는대로 다 드립니다.'라고 얘기하는 꼴이다... 2009. 12. 8.
Remote Include PHP 소스 remote include에 쓰인 이미지 확장자로 된 php파일 01. 2009. 12. 5.
728x90
728x90