Quote:
Originally Posted by abillionwishes
I want also to be able to block certain kinds of attacks. I only server web content through port 80 and use ssh to remote login.
|
Attacks can be looked at and learned from in different ways:
Reconnaissance vs targeted: most noise you'll encounter will be automated scanning. Rattling the door, harvesting results and returning back later is more efficient and can be done by anyone and from anywhere. Scanning is harmless if vulnerabilities they look for don't exist but if they do at least you've got a chance to mitigate the situation:
- restrict access on the system, network and application level to any area dealing with application management,
- make 'net-facing user accounts use an inert shell, deny use of cron and at and do not allow them to traverse the whole file system,
- ensure you log violations, have them reported to you daily and act on them immediately,
- use proactive measures where possible.
Prevalence: part due to popularity of PHP-based applications, general misconfiguration and failure to replace vulnerable software versions, web stack compromises these days are more widespread than root compromises:
- invest time reading and practicing:
knowing how to run what you run gives you a better chance of survival,
- remove any default components after installation like default passwords, tables, directories and files,
- disable web application features you do not need and remove any plugins or addons that are not officially endorsed or actively maintained or supported,
- update web-facing components, dependencies and web applications
when updates are released.
Quote:
Originally Posted by abillionwishes
Yesterday I launched my website. (..) give me some hints on what things I should be aware of.
|
...but all of the above starts with good preparation. You really should have asked that
before making your site publicly accessible and not as an afterthought.
Generally speaking:
- draw a plan and stick to it. You
will get lost in details.
- use a current, maintained release of the OS and preferably choose a distribution with longterm support,
- do not install what you do not need now,
- install and regularly run one or more integrity checkers,
- install updates when they are released,
- harden your OS and web stack before exposing it: read your distribution or general documentation,
- do not disable additional security features like AppArmor, SELinux or GRSecurity because the documentation of your web application can handle it or if you can't be bothered to grok it. (Yes, that sounds harsh but unfortunately that's reality for ya.),
- test your setup regularly from a remote account,
- deploy a backup scheme,
- never log in over the network as root user.
Any questions just ask but it would be good if you could fill in details like distribution + release, what web applications + versions you run.