Category Archives: pentesting

Review of the pentesting course at cybrary.it

Cybrary.it provides free online training courses in certain fields, among them security related. I have just been through the Penetration testing and ethical hacking course and I thought I would write a few notes on it.

The course is taught by Leo Dreiger who seems pretty knowledgeable. It includes 19 modules where some has more content than others. The sessions I most enjoyed were the whiteboard sessions where Leo talks about the specific subject. He does this quite well and offers some good advice along the way.

As for the particular tool demonstrations, I do not find them as interesting. Especially the ones that highlights vulnerabilities in Windows 2000 Advanced Server. I can understand the concept of demo environments but Windows 2000 seems a bit too outdated to be of interest. Also, modules like Denial of Service seems to be me a little out of scope. I would find it very odd if I were to perform a denial of service attack as part of a pentesting assignment. Knowing about denial of service is good, but running LOIC in a demo is perhaps not what I expected to find in a course about penetration testing.

There are two tools that to me are the bread and butter of penetration testing, those being Metasploit and SET. Neither of these tools are demonstrated in this course. They seem to be featured in other courses on Cybrary.it but I found it a bit disappointing never the less.

I guess it really boils down to what you expect to see in any course, and for me there were both pros and cons, but it is how it usually is with any form of training.

Overall though, the course is free, as are any courses on Cybrary.it so I would still recommend anyone visiting their site and see for themselves. I think the idea behind Cybrary.it, providing free IT training is great and benefits all. So, I will stick around and check out other courses, I suggest you give it a try if you feel you need some training for yourself.

SHIPS have set sail, part II

SHIPS as I wrote about in my last post is a system for rotating admin password developed by TrustedSec. It handles both Linux and Windows systems which is great. I read the documentation, I have yet to try it, but I just want to point out a few things that I noticed when reading it.

1. The initial installation of SHIPS is a number of manual steps

This is actually quite necessary as this also builds understanding of how SHIPS works, which is good. The downside of it is that it do take some time to get this up and running. On the other hand, it solves a problem which has bugged sysadmins for years so I can definitely live with it.

2. Dependencies

The required packages of Ruby are easily installed on most Linux distributions, but there is one thing that perhaps is missing a bit and that is the need to have a working PKI (Public Key Infrastructure). The reason for this is that SHIPS uses SSL when communicating between the client and the server, and the client needs to trust the server SSL certificate. Your company or organization should have a CA which can sign the SHIPS server SSL certificate for it to be trusted by your clients. If you dont have this, you will have a harder time setting up the clients. It is possible to work around this by trusting individual self-signed SSL certificates on individual clients, but it is not recommended. There is also an option to use curl (which is used by the Linux clients to communicate with the SHIPS server) with the insecure mode, thereby not validating the SHIPS server SSL cert. Do not use this, instead, if you plan to use SHIPS, make sure you have a PKI to support it to make it work smoother.

3. Idents

Idents are used for managing objects within SHIPS, such as validating which users that can login to SHIPS and retrieve and set passwords as well as managing authorized clients which can connect. Authentication idents can be /etc/shadow, SQLite (database) and finally external using the LDAP protocol for querying users and computers. When it comes to the actual clients, these are handled in arrays unless you using either LDAP or simply allowing any client to connect to SHIPS. If you do allow any client to connect without validating the clients name which is not recommended, it is a possible way to perform a DoS attack against the SHIPS server database. In an enterprise, most would probably go with the LDAP option and most enterprises rely on Active Directory. That does not mean that you are running LDAP. A Windows domain controller does not run LDAP unless you have installed it, it is not included per default when installing Active Directory Domain Services. So, you might have to actually install and configure LDAP in your environment first, and that takes some planning. It is not impossible by any means, but it is additional step that you should be aware of if you are to implement SHIPS using a LDAP as the ident store.

As a last not about idents, it is possible to develop your own ident and integrate it with SHIPS.

4. LDAP

LDAP uses port 389 and one should remember that this is a clear text protocol. If you use LDAP as the ident store for managing the SHIPS interface, there is a possibility to sniff data between the SHIPS server and the LDAP server. This might not be a very big problem, but it is possible to use TLS with LDAP over port 636 which would have been better. This is something I would like to see added to SHIPS if it is doable. The authentication between the SHIPS administrators client and the SHIPS server is using SSL so it is protected, but not the LDAP request from SHIPS to the LDAP server.

Summary

I think SHIPS is a great solution, quite capable even though perhaps a bit tricky to get it up and running. Sysadmins who expect a simple installer will be disappointed, but as I stated in the beginning, the manual steps adds to ones understanding of how SHIPS really works, and that is very important. I will try to test this once I have everything set up to really support SHIPS, not just getting one with it. SHIPS looks like a quality tool and a great project and I want to test it in the best way I can. I will write about my experience on testing SHIPS later on.

SHIPS have set sail

I was most pleased when I saw the release of the SHIPS software from TrustedSec. The problem with managing local admin accounts could be a thing of the past with this tool, and the best thing about it, it is open source. The idea about SHIPS is rotating the local admin password with a random generated password. It is client and server based, so you have a server part which holds the passwords in encrypted form, as well as a client part which sets the actual password for local admin user on every box where you have the SHIPS client installed. It can be installed on laptops, desktops and servers, it does not really matter, as long as it is running Windows. The communication between the SHIPS server and client relies on HTTPS so nothing is transmitted or stored in clear text.

The most used solution today which is is a tool called AdmPWD does not support encryption in the version that is publicly available, passwords are stored in clear text in Active Directory. Not everyone can read that attribute but it would feel better knowing those passwords were indeed encrypted. With SHIPS, that problem is solved.

This looks like a great boost for everyone on a blue team as this has been and still is a real hassle. This will definitely make the life harder for any penetration tester. I cant wait to try this out. Thanks to TrustedSec for releasing this tool, awesome job, now I just wait for a Linux version!

Password management for shared passwords

How do you in your company or organization store passwords that are shared among staff or teams? I hope you do not use an unencrypted spreadsheet located on a network share in a folder named Passwords.

Most probably use a password manager application such as Keepass and even though it is open source (which I like) and sounds very good, it has weaknesses. Even though it uses AES 256 bit encryption, the encryption is no good if the passphrase is chosen poorly. This is not a flaw of just Keepass, but any password manager software. Second, even if the passphrase is very good, it can still be defeated by a key-logger which sniffs the passphrase. So, no real joy.

Many password managers also comes with browser extensions for easy fill in the password functionality when browsing the web. This has been proven to be quite a bad idea as all it took was some javascript to defeat this. Kevin Mitnick and Dave Kennedy showed a demo of this at Derbycon, see this youtube video.

But the problem is still there, how do you share passwords in a secure manner? The storage of the passwords needs to be encrypted or secured in a physical way to prevent unauthorized access. But it also needs to be available for the people who require them. There in lies the problem, and it is a very difficult problem.

I have no real answer to this question, but there are things you can do that will slow an attacker down. Use a standalone network which cant be accessed from the Internet, actually it should only be accessible from a secure physical location. Do that, and the attacker will have to go to great lengths to retrieve data. It is when we get sloppy and just save our passwords in plain text on a network share that the attackers get that easy win. Do not make it that easy, make the extra effort and stay safe.

WPScan tool

If you are like me and uses WordPress CMS, you should take a look at the WPScan tool. It is included per default in Kali Linux and is a tool I have started to use to check the security of my own blog. Today I noticed something most of us are not to happy to see, but usually glad we are able to find out about. As for me, I have not enabled Edge Mode, but I would like to see a patch for the W3 Total Cache plugin never the less. Below is a screenshot from my WPScan run against this blog.

WPScan_My_Blog