hex-string1 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. 이전 1 다음