--
--
The website for the club is http://stab-iitb.org/wncc
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
There are various methods for doing so.... even if we have taken all precautionary measures from our side then also our site is not safe....
if our site is hosted on a particular server and any other site which have some vulnerability is also hosted by that server.... then via advanced shell uploading the attacker can take control of all the sites hosted by that server.... just because of that one vulnerable site....
Analysis
I would like to make a few things clear about this. For people who still think this was a targeted attack against the Mood Indigo site: it wasn't. Mood Indigo just happened to be on a server that was attacked,
Observation
The url redirected to points to a cgi script, the likes of which are generally used by system-control services like cPanel/WHM. This suggests the hostile takeover is at a system level, as opposed to a single domain or a single user on the system.
A simple test would be to replace the domain with the ip address of the host: it suffered the same fate. Clearly, the attacker has instructed Apache to redirect everything to a single url. That kind of access requires root privileges; thus ruling out any vector via moodi.org or any other hosted site (unless of course, the hosts znetlive are stupid enough to provide an unsecured su-like binary) Local root exploits seem unlikely, on a CentOS 5.8 system, the last reported one was way back when.
A zero-day exploit is possible, but far-fetched. Let's consider some easier attack vectors. Unpatched/old software are suspect, as Sudarshan pointed out. I must say that their open-source nature aren't to blame here. In fact, open source softwares are often quickly patched, heavily reviewed, and easy to update. I would love to take this opportunity to bash cPanel, but that's for another day.
Rahil Momin, web CG, Mood Indigo, also state that regular users on the server were denied access, both to ftp and to successful password changes. However, the attacker had no cause to touch their code or databases in order to carry out a poster-page redirection.
Mitigation
It would have taken a barely-intelligent sysadmin hardly 5 minutes to restore the system, even if root was compromised on it. However, they seem to have taken well over 12 hours. Oh well, but what do you do if your site hosted on a shared server goes down like this?
1) Have an alternate hosting ready, (duh? read on!)
2) Keep your DNS and web host separate. Third-party DNS services are fairly cheap, abundantly featured and far better than either your registrar or webhost. (See PS below)
3) Make sure you have a short TTL on your NS records. Makes switching hosts quick.
4) Have a static/read-only version of your site at hand.
Of course, the best option would be to get a private server, possibly with a large provider like Amazon/Heroku/Linode, but not everyone has the funds/needs for that.
PS: Even if you can't get an alternate hosting service at short notice, URL cloaking comes handy: let's you use bighome to host your site, at your URL!
Regards,
Chhatoi Pritam Baral
--
--
The website for the club is http://stab-iitb.org/wncc
To post to this group, send email to wncc...@googlegroups.com
---
You received this message because you are subscribed to the Google Groups "Web and Coding Club IIT Bombay" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wncc_iitb+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
As is the case with VPS/SelfHosting, you need to continuously patch your framework with security updates as well.
@Nikhil
I don't think Twish argued against frameworks. I did, and so I will be the devil's advocate.Firstly, I am not suggesting people to not use them. You are making a strawman. I am merely pointing out that using a framework doesn't guarantee protection. And making a statement like that sounds like Use a framework and you will be safe is wrong advice.
Secondly, there are no 'standard' frameworks. And that is so because they are not standards. Each of them serve a very specific usecase and each of them have their flaws. While some focus a lot on quick prototyping, others expose less attack surface.
To address your individual points:
- No a fresher might not be able to counter all things: SQL Injection, CSRF, XSS and dozen other acronyms. But he/she are not required to tackle all issues any way. Most freshers are not writing mission critical software. When they do, they would have probably read enough to make a good call.
- People who right these softwares are still humans. And these codebases are huge! And bigger the codebase is, larger is likely to be the number of bugs. Some of which might end up leaving the package very vulnerable. Using Symfony or ExpressJS to serve a single static resume might bring you more hard then good.
- Sure. But is your website really that important for that a hacker will study it and then try to use what technique might work? Every new site is kind of unfamiliar to an attacker. Yes, this is security by obscurity. And as much as it may be hated in theoretical realm, real world always uses it as first layer. Of course, there are 10 dozen other layers malicious adventurers have to break through.
- We are talking secuirty not ease of use. And more so, we are talking about people who want/need to learn how to write code, not use automagical code generation in a framework.
- Nobody works with 10 different frameworks. Nearly all frameworks cosume enough time and devotion before someone can assume they can tackle nearly all possible things through it. Call me stupid, but I am exceptional slow at this. And as much as I want to learn Symfony, CakePHP, RoR, Django, CodeIgniter, Backbone.js, Angular.js, Ember.js, GWT, Arc, HappStack, Socket.io, Spring and GoWeb, I don't have the energy. And it's not just this I will also have to explore CoffeeScript, SASS, LESS, Dart and Closure on the client side and at least a dozen languages on the server side. So no, working with a framework only makes one comfortable with that particular framework. It might introduce them to a bunch of jargon, but for 90% of it, they will never need to learn anything about it because it will Just Works™becuase of framework magic.
- Well so is college, if the academic value is not counted.
The other two points which should actually be about dedicated hosting (hence not shared) and maintaining things by yourself (instead of just frameworks, Twishmay was address issues with dedicated hosting). I will just couple them together:
- 'default settings are open to attacks' - He was talking about self hosting. And yes. To give you some examples:
- Default password of a root login to a LAMP stack's MySQL is 'password'
- Default placement of wp-config in wordpress is inside the wordpress folder itself not outside public_html (or www). A *LOT* of people don't move it.
- There is usually no access crontrol set for phpMyAdmin installations, not even a simple .htaccess based authentication. MoodIndigo's PhpMyAdmin was public for ages.
- Most dedicated hosts require manual settings to secure SSH (using fail2ban) from brute force attacks.
- 'guard you against popular exploits' - Again, a strawman. He is mentioning that an out of date framework/package/server is very vulnerable. Check out the link that Sudhi had posted. It caters a very specific need for people who use Rails. It tells them if they should be patching their Rails deployments today with the latest security patch. If you don't, your deployment might become vulnerable to a very generic hack.
--
Extending all the arguments above, I have decided that i need to code up a new operating system for myself so as to keep my computer safe :P
Also since linux is opensource windows must be way more secure.
--