So I finally got around to getting Facebook to automatically impoort my blog entries. Was easily done technically, all I had to do was decide if I wanted them to end up in the news feed or as status updates. Both had their advantages, but I decided going with news feeds because they provide better formating.
Now I’m back to moving my website and email server to new hardware (websites are easy, email is a bit of a pain).
I just stumbled accross this website: https://ssl.euserv.de/produkte/vserver/betatest.php where you can order a vServer for free during the beta phase. The beta phase is planned to last till the end of 2009. For more details, have a look at the link (there are a few thing not allowed to use the server for, mainly high traffic and illegal stuff).
An order key is required, just have a look at the tags of this posting …. one of them is a bit “strange” 😉
Yeah I know, I haven’t posted in quite a while. Have been pretty busy with all kinds of stuff lately. so here is a short update on the more technical stuff I’ve been up to in the last few weeks:
– I moved most of the services from my old server to my new server (actually to one of my vmware guests on my new server, si-ka.net is still missing, and I need to forward dopefish.de to www.dopefish.de)
– I set up a gameserver host on a separate vmware guest. While this may not be the best solution performance-wise, it is defiantly the best solution security wise since gameservers require all kinds of strange library crap. And because it is easy, I also set up a Left 4 Dead dedicated server and assigned it to the -si.ka- steam group.
I also started playing a few new games. I got talked into getting “Left 4 Dead”, which is fun in coop and multi-player (solo kind of lacks smart bots on your own team). Then I got GTA4, but haven’t had time to play it yet. And yesterday I had a look at “Runes of Magic” a free MMORPG. It is currently in open-beta, and large parts of it still require translation (in the starting areas, most of the quests are a mix of German/English, if you get in some seldom visited areas, quests and NPC are sometimes in Asian lettering).
Climbing has been coming a bit short lately, I’ll try to get back to that more regularly.
I can’t be the only person who finds it bothersome burning a cd just to install linux. What a waste (it’s not like you use the cd all to often afterwards, except as a coaster). So here are the quick and dirty instructions for making a debian linux install usb stick (adjust /dev/sdb accordingly, failure to do so can pretty must kill any data on a harddisk):
- wget ftp://ftp2.de.debian.org/debian/dists/etch/main/installer-i386/current/images/hd-media/boot.img.gz
- wget http://cdimage.debian.org/debian-cd/4.0_r5/i386/iso-cd/debian-40r5-i386-netinst.iso
- zcat boot.img.gz > /dev/sdb
- mount /dev/sdb /mnt
- cp debian-40r5-i386-netinst.iso /mnt
- umount /mnt
Ok, here is a list of a few programs I’d advise anyone to use who is running a server on the internet (or thinking of doing so).
- aide or tripwire (they can check and report if files on your system get changed, configurable levels). If you use tripwire, don’t forget a “tripwire –check -I” after you do any updates.
- logcheck will check your system logs, and report anything out of the ordinary (“ordinary” is defined by a list of ‘normal’ rules, and anything you add)
- tiger goes farther than logcheck, it actively checks your system and reports anything strange (files not belonging to packages, users or groups that got added, …)
- grsecurity adds more security features to your kernel (at least use the basic features and the possibility to turn off module loading after boot)
- rkhunter, chkrootkit scan the system for signs of rootkits or other malware. just install, make sure they are executed daily by cron, possibly tweak rkhunters config a bit (I had problems with unhide and current kernel versions)
I’m not saying that setting up and tweaking all this software and actually reading the emails they generate will make your server super-duper secure, but they will reduce the risk of running a server open to the internet and alarm you if somthing strange is happening. It is important to read and understand what theese programs mail you. Yes, you will get false positives from time to time. And yes, you will have to adjust the config now and then due to package updates; but I get about 3-4 mails a week, and that is definatly ok considering the amount of data that gets checked.
I know there are plenty of pages floating around the Internet about knock daemons that open ports in a firewall after a predefined series of ports are “knocked”. For some reason ALL the pages I found assumed that a) you want the filter in your INPUT chain, and that the INPUT chain defaulted to DROP or REJECT.
In my case, I’m defiantly not going to have a iptables firewall with a default that drops packets. Every few weeks I try out some new software and can’t be bothered with adjusting my firewall every time. All I need it to do is keep pesky people off my ssh, that’s all.
So here is a short tutorial how to set up s knock daemon with a ACCEPT default for INPUT:
sequence = 76:udp,123:tcp,7630:tcp,1921:udp
seq_timeout = 25
tcpflags = syn,ack
start_command = /sbin/iptables -I SSH-Knock 2 -s %IP% -p tcp --dport 22 --syn -j ACCEPT
cmd_timeout = 20
stop_command = /sbin/iptables -D SSH-Knock -s %IP% -p tcp --dport 22 --syn -j ACCEPT
iptables -N SSH-Knock
iptables -A INPUT -p tcp --dport 22 -j SSH-Knock
iptables -A SSH-Knock -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A SSH-Knock -j REJECT --reject-with icmp-port-unreachable
/etc/init.d/iptables save active
Ok, the contest is ready. I’ll start off with the information everybody has been waiting for:
There is a webserver running with a brief description of the target and rules of the contest http://184.108.40.206/ The webserver is actually part of the contest since people are supposed to deface this page. To make it a bit more interresting, the ssh sessions are recorded with script and saved here for everyone to see (e.g. “less -r filename”).
Rules and Target of the contest:
As stated above, deface this page. To achieve this goal, everything is allowed. Do what you need/want to achieve the goal.
Unfortunatly we will still need a short list of actions that are not allowed:
- (D)DoS against this box, or via this box against other hosts are
of course not allowed
- Brute Force attacks against accounts are not prohibited … but trust me, you really don’t want to waste your time with that
- Be nice, don’t try to make the accounts or box unusable for others
- If you are doing something that isn’t aimed at solving the contest, than it probably isn’t allowed
A few details to the box and the system:
- It is a vmware box (so I can reset it and/or access the console without any problems)
- Linux debian testing is installed
- some basic hardening done with normal linux tools and grsecurity
- Don’t worry, I left enough room for you all to poke around, I didn’t make it “too secure to have fun”
- This time no holes were intentionally added to the system. On the other hand there will also be no updates of software packages or changes to the RBAC system, no matter what security flaws arise (or I may have overseen)
- On a scale of 1 to 10: I’d say the security is around 7
Have fun 😉
btw. I’m also posting this in the buha forums for anyone who prefers a German description.
I spent the last few days fine tuning the HackIt server I mentioned last week. After lots of thought on how I was going to punch holes into the security, I decided on a different approach. Since in the past contests I always found it fustrating to see people with high skills trying out stuff I would never have dreamed of, and in the end to get beaten by people who by sheer luck tried out the right thing at the right time … I decided to minimize the “luck” factor of the contest by not putting any holes in the server on purpose.
What I am going to do is not update any of the packages any more from now on. I’m doing an update right now as I post this, and from here on no more updates. There will also be no updates or changes to the RBAC system. The only changes I will be making to the box from now on, are if it breaks and needs to be fixed.
-> The box will be shamelessly neglected, waiting to be owned.
If nothing strange pops up tonight, I will be posting information about the contest tomorrow in the buha forum, here and a few other places …
The last HackIt I set up was a few years ago, so I decided to have a go at it again. As before it will be a Linux server. And I will also have some fun with grsecurity kernel patches (including the additional Role-Based Access Control system). So nothing new up to here. I’m also going to be using most of the features I used back then too (like “trusted path execution” and no outgoing/server sockets for users, …)
Last time it was separate hardware on my little DSL line (meaning back then all users had to share a 128kbit upstream). This time it will be a vmware box on a 100Mbit Internet connection and it’s own IP, so no more worry about laggy ssh sessions.
I’ll post more details as soon as this gets more “ready-for-release”. Right now I’m still hardening the box, I still haven’t decided on which holes I’m going to build into it to make it a “HackIt”.