Ask Slashdot: Do-It-Yourself Security Auditing Tools?
An anonymous reader writes "I'm a 'prosumer' website builder, have a few sites that are mainly hobbies, but I would like to know that they're at least fairly robust. I'm thinking of the equivalent of a 'dental clinic' — where someone interested in the white hat security field might be willing to take on an audit for the experience and to build a resume. Or, tools such as websites that let you put in a password and see how long it takes to crack it. Or sites where you can put in a URL and it gets poked and prodded by a number of different cracker tools and a 'score' is given. Ideally with suggestions on how to improve. Does anything like that exist? I'm not talking FBI/CIA level security, but just common-sense basics. I've tried to use techniques that improve security, but I don't know how well they work. And I've realized that in the ever growing, fast changing field of computers I'm not going to ever get the knowledge I need to do this myself. I know there are software suites that allow you to sniff and test things on your own, but I'm afraid it's overwhelmingly foreign to me and I just feel like I can't reliably do this myself. Any ideas?"
I believe this questions really requires a list of possible attack vectors. Is a list like that even possible, or is it infinite.
This is a nifty suite of programs made for a lot of what you want that runs on a Raspberry Pi. If you don;t want to get a Pi you can look at the list of software and download then into your favorite Linux distro. Most (if not all) of these are open source.
http://pwnpi.sourceforge.net/
You say things that offend me and I can deal with it. Can you?
Post your site on /b for maximum security pokes
What's the point of "basic" security check?
But a quick search for metasploit should get you going, perhaps add a Nessus scan and go watch some Def Con presentations on SQL injection and penetration testing http://www.youtube.com/user/ChRiStIaAn008 is a good place to start.
Nessus is the big cheese with the big price but OpenVAS is the way to go. Do have a machine with plenty of power.
If you have a decent hosting company, they'll do this for you. Mine will send out alerts if a popular CMS install has a known hole in it, and require people to upgrade the software.
Some people die at 25 and aren't buried until 75. -Benjamin Franklin
You have no idea what you're doing, you have no idea what you WANT to do, and you have no idea what you need to do in order to get the knowledge to do whatever that is.
Please, re-think your idea.
There are plenty of web (vulnerability scanners) that you could use, some requiring no experience and point and click, otherwise will require prior knowledge.
http://sectools.org/tag/web-scanners/
Hate to tell you, but security auditing is mostly about documentation. Checking that the right documents are in place and have been updated, verifying office procedures, physical security, etc. Technical tests are mostly about checking for the status and presence of files or configurations, not about probing networks or white hat hacking. There is a vaild business opportunity in pen testing, which is just one component of auditing, and is not even needed for every type of audit.
From the way you describe your goal, you are building mostly one-off websites. For small companies and the like? You'll be best off just using popular open source products like Drupal, WordPress, or ModX and keeping up to date with security updates. Many of these will automatically notify you of security updates and you can apply them right away. Don't try to host the websites on your own server either. Get a hosting product from a company that will keep the underlying OS, Apache, and PHP up to date and secure. This will reduce your exposure quite a bit. You still need to make sure to choose good passwords. Nessus or OpenVAS are also an option.
Ceci n'est pas un post
Two articles on arstechnica recently covered booters (paid services to attack your sites using a large set of vectors), and password cracking for script kiddies.
Here they are :
http://arstechnica.com/security/2013/03/details-on-the-denial-of-service-attack-that-targeted-ars-technica/
http://arstechnica.com/security/2013/03/how-i-became-a-password-cracker/
That should give you a first hint...
Posting as AC because for some annoying reason Slashdot won't let me log ion right now...
https://www.owasp.org/index.php/Web_Application_Penetration_Testing
Whether you wanted to or not, just by having a site, you've already asked the whole Internet to check it out. One way to find out if you've done things right, is to look for evidence that you've done things wrong. And there's a little tip I learned...
Grep your logs for your table names.
If you have an injection hole, for example, then automated spiders have already found it and exploited it, and (so far) they don't obfuscate or even escape/character-encode their requests, so you'll plainly see their injected queries in your logs.
Preferably, look for site-unique table names, so that you'll know they could have only gotten the name by successfully querying the schema. You're going to see lots of scary-looking things in your logs, but some of those are just unsuccessful attempts. A unique table name (hint: use tables names with the word "user" or "password" in them) will be a dead giveaway they succeeded.
Don't ask me how I know what that looks like. Hey, it wasn't my fault. Mostly. Ok, partly but mostly not. Look, it's complicated, and involves an inherited legacy, OKAY?! Everybody just back off. ;-)
Anyway, when you see that, then it means you screwed up, so you'll learn something and know you need to fix something. If you don't see it .. sadly, you won't really know much more than you did before.
And I gather you (the OP) is getting worried; the problem is that you're not paranoid enough.
Do you, for example, validate your code using the HTML validator from w3c?
You also need to learn to run tools. I mean, online website tools are nice... as long as you're *SURE* that they've not been hacked, nor are they actually crackers trying to lure you in.
Determining what tools to use is another issue: are you writing for Windows or *Nix? There's a lot more free tools on the latter, but you will have to learn more. For example, there are older, free versions of nessus.
Get yourself a good book, maybe from the publisher O'Reilly, on security.
mark "not even getting a kickback from O'Reilly for the plug"
No.You'd be able open my luggage if I gave you that.
Sectools.org has a comprehensive list of tools with explanations of what each one does. Look at the web tools and the vulnerability scanners and you will find something you feel comfortable using. Most of the other tools mentioned so far can be found there. Also, the Open Web Applicaiton Security project (owasp.org) has some good information on secure app development.
good luck.
Average Intelligence is a Scary Thing
If yours isn't a mass-market, mass-profit, hugely-popular site, you don't need to secure it. You just need to be different enough that the standard chinese attack vectors looking for standard run-of-the-mill popular web-site building packages don't find any.
Trust me, no one's going to your tiny site and trying to find the holes -- no matter how big they are.
We secure bank vaults with big heavy locks. Your house with a tiny mediocre lock. Your car door with a tinnier very crappy lock. Your car trunk with a down-right shitty lock.
Just be different. It'll get you through the 99% that you care about.
This suite of tools used to go under the name of "BackTrack", most recently BackTrack 5. It has now been named Kali Linux.
This is a full-blown Linux distro with all the security tools you are ever likely to need. Metasploit? It's there. Nessus? It's there. The actual list of tools is huge.
Kali won't teach you everything about using the tools (though there are good instructions available online). But it does offer all you could want in one package.
It is tough, but not impossible. SAINT, Nessus, OpenVAS, Nikto and others will generate a report with CVE info that points to articles providing some guidance.
Pull my finger for my public key.
Try the OWASP website: https://www.owasp.org/index.php/Main_Page. They have a lot of free tools for doing security testing of websites.
Comment removed based on user account deletion
Check out https://purecloud.ncircle.com/solutions/en/WebApp/. It is not free, but it covers common web applications, and it is very easy to use. Disclaimer: I work for nCircle
hunter2
The only things tools can tell you is whether another person running the same tool could get in. For anything else they are pretty worthless. Also, the FBI/CIA does not have a clue about IT security. If you must name a TLA, make it at least the NSA.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
No matter what an intruder tries, if you put your operating system on read-only media, intrusion becomes limited.
Of course, installation and changes become more difficult because you must reboot with your media set to read-write, then reboot again to read-only. SDHC memory works well for this, since it has a read-write switch like the old floppy drives. Put the memory in a
USB "card reader" for SD
(microSD doesn't appear to have a read-write switch).
You can insert the SDHC in something that looks like a flash drive, then insert the whole in a USB slot.
Or, you can use something like the Adonics eSATA/USB Digidrive
http://www.addonics.com/products/aepddesu.php
to connect to your computer's eSATA port (if you have such a port on the back of your computer),
which is probably more efficient (fewer waits) than a USB 3.0 connection.
In Linux, you might choose to put most of your operating system on SDHC switched to read-only,
then put a variable area on a regular disk drive for logs, although you can put logs into a memory area that disappears on reboot.
Or you might put your webpages on a separate SDHC,
so your webpages get no intrusion changes.
You could then unmount your webpage SDHC, switch to read-write, make changes, unmount, switch to read-only.
In Debian Linux, the foundation for most Linuxes (eg, Ubuntu), you can look at the "Securing Debian Manual",
http://www.debian.org/doc/manuals/securing-debian-howto/securing-debian-howto.en.pdf
Debian has a highly tailored Aide (like tripwire) that uses checksums to detect any file changes.
In Debian, "dar" Disk Archiver (like tar) makes backups on external disk drives, but dar probably requires some tailoring (I use dar).
For a firewall, you could use Debian's easily used Guarddog.
In some sense, Debian is the administrator's operating system -- for the serious.
Completely OT, but I've got Karma to burn
The last line of the first verse should read "You're a pal and a confidant". None of the Golden Girls went into space, though I'm sure they thought about sending Sophia there.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
You can use this free scanner to test your FTP or SFTP access.
http://www.filetransferconsulting.com/low-and-slow-ftp-scanner/
Set this utility up with about four garbage usernames, then your actual admin credentials in the username list, and put four junk passwords before your admin password in the password list. Then run the utility with one-second intervals. If your FTP server (or SFTP service) is set up well, your IP (and possibly your username) should be locked out before the utility gets to your legit credentials on its 25th try. (In other words, if the utility can sign on as you, your FTP or SFTP service could use some additional security.)
You may want to see if any of your local colleges have computer security tracks. You may be able to do an Internship, or someone may
be available to just do it for experience. YMMV
While you are doing these scans, please note, you may clog up your pipes to the Internet. If you are using hosted services
DO NOT RUN SCANS WITHOUT NOTIFIYING THE HOSTING SERVICE.
There are many sites with CVE information, Secunia is ok, search for applications you care about.
http://secunia.com/community/advisories/historic/
Be careful scanning log files, at least sanitize them before you read them.
You should probably know what ports should be open on which systems.
A spreadsheet of systems/applications/versions of SW OS... would be a good start.
Look for ports that are open, or Listening that shouldn't be...
I'd recommend you proxy your web site through CloudFlare -- www.cloudflare.com -- by having them handle your DNS. You can read more about them at their web site -- I'm not affiliated with them in any way. They offer a free proxy service that acts as a web application firewall and will do a good job at blocking hack attempts.
From there, you should restrict your webserver's firewall to only allow traffic from CloudFlare's known IPs, so people cannot directly hit your webserver.
If Linux, install fail2ban on the SSH daemon + require SSH-key based access (no passwords!)
Finally, get a copy of the home version of Nessus from Tenable and use that to scan your server. It's interface is relatively easy to use, and if you hit your webserver IPs every couple months with this, in addition to using CloudFlare and hardening your SSH daemon, you should be in good shape and not have to worry about silly hacks.
I'd venture acunetix from http://www.acunetix.com/ it does a decent job
If you don't understand the application-layer issues which might be present in your programs, then you won't necessarily understand what the tools (whichever) are trying to tell you. Read and learn, grasshopper. You can get a ton of info from OWASP (http://owasp.org) for free, including some issue-specific "cheat sheet" pages. Next, buy the Web Application Hacker's Handbook. Really, do it now, or at least after you've read the OWASP stuff. It's in dead-tree and e-book versions, now second edition.
Tool-wise, go to portswigger.net, and download the freebie version of Burp Suite. It doesn't have the scanner portion, but you can proxy all your traffic through it, and see what happens when you twiddle all the things that might be twiddled. Buy the pro version (few hundred bucks/year) when you're ready for the other features. By then, you'll know why you want them. The author is Dafydd Stuttard, one of the WAHH book authors. Great support, helpful and responsive.
Oh, and the suggestions for Nessus, OpenVAS and Backtrack/Kali aren't bad, they're good tools. Mostly for the infrastructure-level things such as the operating system and known services which are exposed, though this does include your web server. They mostly won't tell you much about your one-off apps though.
If you are going to get into active testing, then I think professional ethics demand you take precautions to avoid harming other users or their systems, even (or especially) by mistake.
If you have two computers, then set up a little testing lab for yourself. Take both machines off the Net but put them on the same LAN (preferably a wired LAN but wireless will do). Set up one box as the target with a Web server and the site of your design. Use the other to run your attacks, Kali Linux or whatever.
The reason to do all this on a LAN is quite simply to avoid accidentally scanning/attacking some unintended host, and to avoid violating any laws or terms of service that prevent you running attacks. If you test a target on the real Internet, you may accidentally hit something else by mistake, especially if you're a beginner. Whereas on your own LAN you can be as wild and experimental as you want and no one will complain.
It may sound like a lot of work to set up an isolated network, but explaining to an ISP or a judge that you really had perfectly innocent intentions is also a lot of work.
[Sir Garlon] is the marvellest knight that is now living, for he destroyeth many good knights, for he goeth invisible.
"Do-it-yourself Cryptography"
"Home Heart Surgery"
"Roll Yer Own O.S."
"Kernel and Driver Programming for Dummies"
A lot of this conversation has been about remote security scans, but once you find a vulnerability, how do you remediate it? How do you maintain your security posture, and continue auditing your hosts on a regular bases? To what standard?
The National Institute of Standards & Technology provides a lot of help to those attempting to implement security standards.
First is the Security Content Automation Protocol (SCAP) - scap.nist.gov. This defines how you manage, measure and evaluate vulnerabilities.
Second would be SCAP content. You'll note on the NIST SCAP page the word "community" appears 5 times in the first paragraph. That's not on accident. SCAP content is generally community generated, and there are lots of great lists of people working on SCAP content for a variety of operating systems.
Red Hat maintains the gov-sec mailing list and fedora, for example has loads of content available for Red Hat Enterprise Linux based systems.
Our friends at NIST also publish what is called the US Gov't Configuration Baseline (USGCB for short). USGCB content is available in SCAP format for Windows & RHEL. These standards are certainly a good starting point.
If your standards come in the form of a STIG - that content is available as well from the Aqueduct project.
[Disclaimer - I work for Red Hat, I support the US Gov't, and I think making security easier is probably an important thing to do]
The SDHC read-write tab? It's more like a vague suggestion than a lock. I've yet to find a card reader that will actually refuse to write to a "write-protected" card.
"They redundantly repeated themselves over and over again incessantly without end ad infinitum" -- ibid.
tl;dr: OMGMYEYES!!!
Srsly, I'm a security geek and I'm laughing at the copypasta quantity you just put in there. For a guy who admits he doesn't know security. For a guy who admits he'll never likely know it.
I would bump Kali Linux as the true DIY solution.
-OR-
You could just leave it up to someone else and have someone to blame. These guys would make a good scapegoat:
http://sitecheck.sucuri.net/scanner/
I have actually used their scanner to find a backdoor in a common PHP script that shall remain nameless. They did report exactly where the vulnerable file was. After I deleted the file they told me the site was secure. Simple.
Not really DIY and I wouldn't trust anyone 100% but if you pay for a service you have done due diligence to CYA and you can just bill your customer.
Check this out also as a guide to security. All 20 need not be implemented, just the ones pertinent to your organization.
CSIS: 20 Critical Security Controls Version 4.1
http://www.sans.org/critical-security-controls/?utm_campaign=resources&utm_source=featured&utm_medium=web&utm_content=critical_controls
Such as?
Change is certain; progress is not obligatory.
The operating system often seems to write to a lock-switched memory card, and "ls" indicates it has.
But removing the card reveals data has not been written.
I'll keep an eye out for actually writing when actually lock-switched.
I have now actually checked this.
I switched an SDHC to read-only, wrote a file to it on Linux, took the SDHC to another computer, and the file was indeed written.
So, the SDHC lock is no guarantee against writing, and is apparently useless.
I stand corrected, and thank Carnildo for ending my misadventure.
I prefer using read-only hardware to "chattr -i" immutability plus a Linux kernel enforcing this,
since the software approach is cumbersome and changes files' ctime attribute.
What is available?
The following in the alternate model AEPDDESUWP will not write to any memory it can read,
and outputs to either eSATA or USB computer ports,
http://www.addonics.com/products/aepddesu.php
I still need to put my operating system on flash memory before I insert it into such a read-only device.