Skip to:
Content
Pages
Categories
Search
Top
Bottom

2 new forum sections – devoted to 'Security' & 'Performance, please

  • @rcain

    Participant

    ‘Security’, is a major concern of mine at present. Spending much time devising and implementing countermeasures to mushrooming volumes of increasingly highly sophisticated attacks against customer sites.

    I have just been rereading @foxly ‘s excellent (old) posts here: http://buddypress.org/support/topic/here-come-the-spammers/ – also of hacker tools such as: http://en.wikipedia.org/wiki/XRumer.

    i have lots of information, techniques & ideas to share and discuss with members here, but a single (mortal) thread is nether sufficient, nor appropriate, given the topic is enormous & constantly evolving.

    the flip side of countermeasures is, that along with the attacks themselves, they come at some considerable performance cost. thus. notwithstanding that ‘Performance’ is an enormous and constantly evolving subject area in its own right.

    thus, please would forum admin create 2 new forum sections ‘Security’, & ‘Performance’ in order to keep our discussions … locatable, manageable and focused.

    please support this thread if you agree.

    many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • @bphelp

    Participant

    @rcain
    Activity Stream Throttling done courtesy of BuddyDev:

    BuddyPress Rate Limit User Activity

    Limit friendship request throttling done courtesy of BuddyDev:

    BuddyPress Limit Friendship Request

    Private Message Rate limit plugin includes throttling coming soon from BuddyDev

    Many captcha solutions have been out there for years.

    I covered a hidded registration form field in a plugin here:
    https://github.com/bphelp/bp-spam-killer

    I doubt this covers everything but the fight against spam is ongoing. So you have my support! 🙂

    @rcain

    Participant

    @bp-help

    good suggestions. thx. 2 of them r new to me, so other people may find them helpful also.

    on our sites we r using::

    Keith Graham’s most excellent ‘stop-spammer-registrations-plugin’ – https://wordpress.org/plugins/stop-spammer-registrations-plugin/

    – has stopped over 53,000 spammers since feb this year! it uses external lookups on StopForumSpam, ProjectHoneyPot, BotScout, (Akismet, which we dont use), others – thus great collective benefit/advance warning of bad traffic. also traps brute force attacks (bad logins/registrations/comment posts, etc), etc. is simple enough to play nice with most plugins.

    to try & keep as much load off the front-end of the server as possible, we also have set up:

    linux iptables ( & ufw add on )- as the basis of all firewall stuff. also has our manually maintained blacklists & whitelists. various custom rule chains setup. takes a while to get your head around, but is essential.

    linux fail2ban – essentially an add on to iptables, puts people in jail for bad behaviour – eg: brute force attacks against ssh, ftp, mail logins. we also have set up custom rules detecting bad activity against wp-login.php itself via fail2ban. am looking to do some more with this.

    linux apache – mod-security2, libapache2-mod-evasive, libapache2-mod-antiloris, libapache2mod-spamhaus – which help protect against general bad behaviour, DDOS, blank header attacks, the infamous ‘Loris’ script (which we’ve experienced!), and bot-nets. still assessing how effective these r.

    we have also had to tune apache on our VPS for resilience in the face of DDOS type attacks and heavy-handed brute force attacks.

    some further good tips here: http://www.dannytsang.co.uk/index.php/apache-2-hardening-tips/ & elsewhere.

    linux logwatch – reports various access stats (the good & the bad & the ugly) via email – very useful indeed for checking whther situation is under control (or not).

    linux rkhunter – scans for rootkits on the server from time to time – just be sure – & particularly useful if u ever do get infected in hunting down the intruder’s code.

    obviously we also have file system bolted down. (there is a good wp plugin to check permissions bolt-down, i forget what its called). we also spend a LONG time analysing logs etc.

    anway, that takes care of many of the bad boys, but we r still left with the following problems to crack:

    1) we have observed that many bad bots/scripts are exhibiting ‘learning behaviour’ (ie. heuristic) and r finding ways around fail2ban rules/jails, etc. in particular:

    a) rotating IP addresses to match ‘ban counts’ – currently we have them wasting an IP address every 3-4 attempts, but they still seem to have an inexhaustable supply, else are spoofing extreamly well.

    b) varying their retry period to match the length of jail sentence. (ie. they are not wasting their mips whilst in jail, just enough to detect when they are released,record it, and tune their future responses).

    2) content scrapers, probes and bad-bots generally – these r wasting enormous resource on our servers. typically i would suggest such ‘bad traffic’ is responsible for over 50% of total server load (ie. not good at peak times on a busy site). additional problems we r facing here:

    a) bad bots often spoof the agent string to pretend to be eg. google, bing, etc. the only way u can tell is by reverse lookup of ip address and try and match to one of well known range of ‘good bot’ addresses. but, despite fact that many ranges are well known, most of them are never actually published or confirmed, many are variable. i am not aware of any definitve list of ip addresses of good bots (though there is http://www.iplists.com/ whichis not bad, & http://www.webmasterworld.com/search_engine_spiders/ which is often helpful – these are very much ‘best efforts/as seen in the wild’ lists.). this problem worsens with the rise of social network agregation services, other (legitimate) content agregators, and personal content aggregating software on mobiles, tablets, etc.

    idea: i am thinking of writing a script/plugin/rule to do smart lookup of ip against good bots list, & to automatically maintain that (collective) list. ideally, this is a service that someone like spamhause, or projecthoneypot should offer, since they already have the infrastructure. but, we’ll see. the script will detect traffic ‘purporting to be a SE bot, of any kind and to ban it via iptables if it isnt in the approved list/doesnt check out. the risk is in false positives and harming ones SEO. anyone any thought in this area?

    b) probes & sniffers hunting out wp/bp forms, ajax ports, plugin files, forms, etc – in advance of main attack by penatration/spamming bots. typically always use swiftly rotated ip’s. many many variants out there. usually they have no luck on our sites, but that does not stop them trying in vast numbers (bot-nets, collectives? hives?) and harming out response times, etc.

    idea: url obfuscation has been brought up on this forum before, particularly for eg: login, registration, admin url’s, etc. i am thinking of creating a plugin to dynamically hash encode links of choice using someething based on wp forms nonce system. not only useful for causing probes & hackers pain, but also to help thwart media thieves. obviously, scripters will soon respond by just snanning for link titles in html, so not bullet proof in any way, but they will at least be on 1-time request code, so causing them page reload every request & less sophisticted scripts will be totally wasting their own time.

    anyway. these have been my thought so far. would love to hear experience/insights of others.

    unfortuntely wordpress & buddypress sites in particular represent the richest of prizes for hackers, content scrapers, spammers, etc – & they r really on our case. furthermore, there is some BIG money involved, from porn to pharma to credit card fraud; that means some very smart programmers being paid excellent rates, to hack our systems, full time. add to that, the 10’s of millions of infected machines out there (often unknowingly) operating as botnet drones, trying to pernetrate our servers 24×7, steal our machine resources and steal our members personal data. it is a war of attrition.

    all further experience, ideas welcome, here.

    @rcain

    Participant

    ps. we also use (dreaded) captcha fields (plugin) on forms, but have noted of late there are bots out there (eg: XRummer, et al) scraping such captcha images off the web in order to seed simple AI scripts to bypass such protection. pretty clever stuff & born out by what we see in our logs.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 new forum sections – devoted to 'Security' & 'Performance, please’ is closed to new replies.
Skip to toolbar