Posts

Get all ip address using grep

grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'

modsecurity configuration

    Disable modsec on certain ip address via .htaccess   SetEnvIfNoCase Remote_Addr ^202\.202\.202\.202$ MODSEC_ENABLE=Off     SetEnvIfNoCase Request_URI ^/images/upload\.php$ MODSEC_ENABLE=Off

Finding web shells on compromised linux servers

Finding web backdoor shells (1) grep -RPn "(system|phpinfo|pcntl_exec|python_eval|base64_decode|gzip|mkdir|fopen|fclose|read file|passthru)" (2) Install GIT and download git clone ssh://git@github.com:Neohapsis/NeoPI.git (see the documentation) (3) grep -RPl --include=*.{php,txt,asp} "(passthru|shell_exec|system|phpinfo|base64_decode|chmod|mkdir|fopen|fclose|readfile) *\(" /var/www/ (4) grep -RPnDskip "(passthru|shell_exec|system|phpinfo|base64_decode|chmod|mkdir|fopen|fclose|readfile) *\(" public_html/ Other Useful Links

maildrop allow domain

if (/^From: .*@conal\.com/) {         log "conal.com disable SPAM filtering"     to "$HOME/$DEFAULT" } if (/^From: .*@atl\.com/) {         log "atl.com disable SPAM filtering"     to "$HOME/$DEFAULT" }}

Option FollowSymLinks not allowed here

Option FollowSymLinks not allowed here Virtualmin: To fix change FollowSymlinks to SymLinksIfOwnerMatch

E: The package XXXXX needs to be reinstalled, but I can't find an archive for it.

E: The package XXXXX needs to be reinstalled, but I can't find an archive for it. Solution: sudo gedit /var/lib/dpkg/status Search for the broken / problematic package and delete the lines (a paragrah like or something like that whatever you might call it. Then save.

cannot open `/usr/share/sendmail-cf/m4/cf.m4

m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf /etc/mail/sendmail.mc:10: m4: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory Reason :  sendmail-cf    is not installed yum install sendmail-cf