본문 바로가기

string4

Bash Vulnerability Code Injection Attack bash_ld_preload.c#include #include #include static void __attribute__ ((constructor)) strip_env(void); extern char **environ; static void strip_env() { char *p,*c; int i = 0; for (p = environ[i]; p!=NULL;i++ ) { c = strstr(p,"=() {"); if (c != NULL) { *(c+2) = '\0'; } p = environ[i]; } } Compile it:gcc bash_ld_preload.c -fPIC -shared -Wl,-soname,bash_ld_preload.so.1 -o bash_ld_preload.so Copy ba.. 2014. 9. 25.
GNU Awk 사용자 가이드/함수 함수란 입력받은 Input을 일정한 규칙에 따라 처리한 뒤 Output을 내놓는 것이다. 예를 들어 어떤 함수 x에 input을 넣었을 때 input값에 1만큼 증가한 값이 output으로 나온다면 이 함수는 +1을 해주는 함수라고 할 수 있다. awk에서 함수는 보통 다음과 같은 기본형을 갖는다function(input1,input2,...) return input의 개수는 함수마다 다르며, 사용자 정의 함수의 경우 사용자가 필요한 만큼 지정해 줄 수 있다.awk에서는 함수가 크게 두 부류로 나누어진다. 하나는 awk에 이미 내장되어 있는 내장함수Built-In Function인데, 이 함수들은 사용자가 원하는 경우 언제든지 불러와서 사용할 수 있다. 다른 하나는 사용자 정의 함수로서, 사용자가 프로그.. 2012. 8. 28.
Linux : using iptables string-matching filter to block vulnerability scanners Does "w00tw00t.at.ISC.SANS.DFind:)" sound familiar to you ? If you own one ore more servers, there are a lot of chances you found it in your logs and that it gave you headaches or even nightmares trying unsuccessfully to get rid of it. It always looks like this in your apache logs : 213.251.134.23 [16/Nov/2008:07:43:58] "GET /w00tw00t.at.ISC.SANS.DFind:) HTTP/1.1" 400 213.251.134.23 [16/Nov/2008.. 2010. 4. 8.
iptables 국가별 geoip 모듈 적용 작업 시나리오 1. 2.6.27.4 Kernel 소스 다운로드 iptables 1.4.2 소스 다운로드 patch-o-matic-ng 소스 다운로드 각 소스는 아래 링크에서 다운로드 ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.27.4.tar.bz2 http://ftp.netfilter.org/pub/iptables/snapshot/iptables-20081028.tar.bz2 http://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/patch-o-matic-ng-20081028.tar.bz2 상기 소스들은 /usr/src 디렉토리에 받아 놓고 압축을 풀어 둔다. 커널 소스와 iptables 소스는 압축을 풀어 놓.. 2009. 7. 1.