ZeroShell in Virtualbox

September 28th, 2012


I always wanted to build a testlab in Virtualbox or VMware Workstation, to be able to try out different network settings and play with vulnerabilities and exploits. But I never really got to the point of actually building a real test environment. So today I started to build one from scratch, and the first thing I’m going to do is to install ZeroShell.

ZeroShell is a nasty little linux networking distro, that can do a lot of stuff, like radius, load balancing, routing, firewall and more. Check out zeroshell.org for a main feature list.

Normally you don’t need to install zeroshell, just boot the live-cd, assign storage to save your zeroshell profiles and thats it. But I wanted to have boot from my harddrive in vbox anyway, so I tried to follow this guide – which didn’t work.

Now here is my solution, for those of you who want to install ZeroShell in vbox without any trouble. Download the pre-installed kvm/qemu image, install qemu-img and convert the .img to a .dvi file:

1
2
mohrphium@linuxbox$: sudo aptitude install qemu-utils 
mohrphium@linuxbox$: emu-img convert -O vdi zeroshell_qemu.img zeroshell.vdi
mohrphium@linuxbox$: sudo aptitude install qemu-utils 
mohrphium@linuxbox$: emu-img convert -O vdi zeroshell_qemu.img zeroshell.vdi

Now all you have to do is create a new machine in vbox, choose “existing harddrive” and assign the zeroshell.vdi image to your vm.

Posted in SecLab and Networking | Comments (0)

Windows 7 GodMode

September 26th, 2012


It took me only 2 years to find this – but better late then never.

Create a new folder in Windows 7 and name it “GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}”

Try out and see for yourself, the power of godmode :)

 

Posted in Uncategorized | Comments (0)

Howto reset mysql root password

September 2nd, 2012


If you can’t remember your mysql root password, there’s an easy way to set a new one.

1. Stop mysql and start it with –skip-grant-tables option. Which will grant full access to anyone, so don’t let you mysql server run like this for longer than necessary!

1
2
root@server:~ # "service mysql stop"
root@server:~ # "mysqld --skip-grant-tables"
root@server:~ # "service mysql stop"
root@server:~ # "mysqld --skip-grant-tables"

2. Open a new terminal and login. You don’t need a user or password, just type ”mysql” and hit return. Reset the root password (or a user of your choice) and logout

1
2
3
mysql > UPDATE mysql.user SET Password=PASSWORD('your-new-password') where user='root';
mysql > FLUSH PRIVILEGES;
mysql > EXIT
mysql > UPDATE mysql.user SET Password=PASSWORD('your-new-password') where user='root';
mysql > FLUSH PRIVILEGES;
mysql > EXIT

3.  Stop mysql and restart it in normal mode. Now you should be able to login as root with your new password.

1
2
3
root@server:~ # service mysql stop
root@server:~ # service mysql start
root@server:~ # mysql -u=root -p
root@server:~ # service mysql stop
root@server:~ # service mysql start
root@server:~ # mysql -u=root -p

Posted in Uncategorized | Comments (0)

glc-capture on Linux Mint 13 – 64bit

August 27th, 2012

Since “recordmydesktop –full-shots” works to record Minecraft, but uses up a lot of my CPU performance, I wanted to try glc-capture. Glc-capture is a capture program specialized for opengl capturing.

Unfortunately there is no .deb package, so if you’re working on a Ubuntu/Debian based distribution you need to compile it from git repository. This works fine if your operating system is running on 32bit, but you might run into compiling errors when using a 64bit OS.

Take a look at the nullkey wiki, and follow the install instruction for “Other distributions” . The glc-build.sh scripts automatically checks for needed librarys and tells you how to install them.

IMPORTANT: I made a copy of the script, and changed every “-m32″ entry to “-m64″.
You can do this, by editing it with vi editor

1
2
cp ./glc-build.sh ./glc-build-copy.sh
vi ./glc-build.sh
cp ./glc-build.sh ./glc-build-copy.sh
vi ./glc-build.sh

now either search with /-m32 and replace everything manually or type replace everything with:

1
:%s/-m32/-m64
:%s/-m32/-m64

When executing the script you might get errors like the following, which actually tell you what to do to resolve them.

1
2
3
4
error : Missing XF86VidMode headers (Ubuntu users: sudo apt-get install libxxf86vm-dev)
error : Missing ALSA headers (Ubuntu users: sudo apt-get install libasound2-dev)
error : Missing libpng headers (Ubuntu users: sudo apt-get-install libpng12-dev)
error : Can't compile 32-bit code (Ubuntu users: sudo apt-get install gcc-multilib)
error : Missing XF86VidMode headers (Ubuntu users: sudo apt-get install libxxf86vm-dev)
error : Missing ALSA headers (Ubuntu users: sudo apt-get install libasound2-dev)
error : Missing libpng headers (Ubuntu users: sudo apt-get-install libpng12-dev)
error : Can't compile 32-bit code (Ubuntu users: sudo apt-get install gcc-multilib)

just do the “sudo apt-get install whatever” part everytime and run the glc-build.sh script again.

If you get the error: Can’t fetch elfhacks
choose to install unstable from git repository (by typing “y”)

If you get the error: Can’t find glc libraries try:

1
sudo apt-get install libglc0 libglc-dev
sudo apt-get install libglc0 libglc-dev

Normally if you followed all the steps, it should work.
I apologize to everyone who already knows how to use apt-get ;) but I stumbled over a lot of newbies while trying to solve this problem.

If you still get errors: here’s what I installed during the “trial and error” installation process:

1
2
3
4
5
6
7
8
9
sudo apt-get install libasound2-dev
sudo apt-get-install libpng12-dev
sudo apt-get install libpng12-dev
sudo apt-get install gcc-multilib
sudo apt-get install git-core
sudo aptitude install ia32-libs-devel
sudo aptitude install ia32-libs
sudo apt-get install build-essential cmake libx11-dev libxxf86vm-dev libgl1-mesa-dev libasound2-dev libpng12-dev
sudo apt-get install gcc-multilib
sudo apt-get install libasound2-dev
sudo apt-get-install libpng12-dev
sudo apt-get install libpng12-dev
sudo apt-get install gcc-multilib
sudo apt-get install git-core
sudo aptitude install ia32-libs-devel
sudo aptitude install ia32-libs
sudo apt-get install build-essential cmake libx11-dev libxxf86vm-dev libgl1-mesa-dev libasound2-dev libpng12-dev
sudo apt-get install gcc-multilib

sources:
http://forums.heroesofnewerth.com/showthread.php?128001-Video-Capture-on-Linux  
https://github.com/nullkey/glc/wiki/Install
https://github.com/nullkey/glc/issues/18 (last entry by sztomi – thanks for that!)

Posted in Linux | Comments (0)

Minecraft in Mint 13 (Ubuntu 12.04)

August 27th, 2012

I had a black screen in minecraft right after logging in, and I couldn’t play for three hours. Just when I wanted to give up and go to bed, I bumped into the solution. ”Just put everything back to the way it was, or next time you’ll have a problem with java you’ll be f****ed.”

So I undid everything I did in the “Oracle Java on Linux Mint 13″ article, and I undid a lot of stuff I did while digging through minecraft forums. Finally entered the following commands into my terminal – and it worked. Don’t know why, don’t know how, don’t care! Ok, actually I do care, but not right now… It works :) .

1
2
3
4
sudo aptitude install liblwjgl-java
sudo aptitude install icedtea-7-plugin
sudo aptitude install java7-jdk
sudo aptitude install default-jre
sudo aptitude install liblwjgl-java
sudo aptitude install icedtea-7-plugin
sudo aptitude install java7-jdk
sudo aptitude install default-jre

I think the java7-jdk is not necessary – but what do I know.

Posted in Games, Linux | Comments (0)

Install Oracle Java in Linux Mint 13 (Ubuntu 12.04)

August 26th, 2012

Since Oracle Java JRE is no available through ubuntu repositories, you have to install – and update! – it manually.
There is a step-by-step howto at easylinuxtipsproject,  but for advanced linux users it’s a bit annoying, to go through steps like “klick on button x to open your terminal”.

So here are the necessary steps to get oracle java running. Just make sure you download the newest version at oracle. It should be something like “jre-7u6-linux-x64.tar.gz”, which is the 64bit version, so if you want to install the 32bit you should replace every x64 with x32. Also replace “jre-7u6-linux-x64.tar.gz” and “/opt/java/64/jre1.7.0_06/bin/java” with your version.

1
2
3
4
5
6
sudo mkdir -p -v /opt/java/64
cd ~/Downloads
tar xvzf ~/Downloads/jre-7u6-linux-x64.tar.gz
sudo mv -v ~/Downloads/jre1.7.0_06 /opt/java/64
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.7.0_06/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.7.0_06/bin/java
sudo mkdir -p -v /opt/java/64
cd ~/Downloads
tar xvzf ~/Downloads/jre-7u6-linux-x64.tar.gz
sudo mv -v ~/Downloads/jre1.7.0_06 /opt/java/64
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/jre1.7.0_06/bin/java" 1
sudo update-alternatives --set java /opt/java/64/jre1.7.0_06/bin/java

Hope this will save you some time!

Posted in Linux | Comments (0)

KDE here I come!

August 23rd, 2012

Once upon a time, I loved to use linux until someone decided, gnome 2.x wasn’t good enough for the people in the (linux-) world and so gnome 3 was born. This was definitely a turning point in my linux career, because from that point on I just couldn’t find a desktop environment, that seemed to fit my needs as well as my taste. After some time, that I spent on Windows 7 (yes!) I’m back to linux. And now I’m stuck with KDE4 – once again.

But seriously, I tried KDE a lot of times, and always ended up with reinstalling gnome 2.x. Not this time, I told myself… as well as “You can’t go back”, “It’s not an option” and “Stop whining!”. And so I’m writing this post from the beautifull interface that kde delivers and I can say, I’m finally starting to like it.

KDE I’m here… and I’m not gonna leave, so deal with it! :)

Posted in Linux | Comments (0)

PC Games mit PS3 Controller

June 23rd, 2012

This Post is only available in german.

In letzter Zeit spiele ich wieder verstärkt Indiegames wie Braid, Shank, SuperMeatBoy, Bastion, Limbo und so weiter. Durch all die tollen IndieHumbleBundles bin ich inzwischen zu einer netten kleinen Indie Sammlung gekommen. Zeitgleich musste ich aber feststellen, das zocken auf dem Sofa, mit einem Controller in der Hand, einem 46″ Bildschirm und Knabberzeugs auf dem Sofatisch weit mehr Spaß macht, als Laptop, Monitor, Tastatur, Maus, besagte Fressalien und so weiter auf meinem kleinen Schreibtisch vor mir zu haben. Daher genieße ich auch meine PC Spiele immer häufiger auf dem Fernseher. Allerdings sind Tastatur und Maus vom Sofa aus nicht so toll zu bedienen, also muss ein Controller her.

Der PS3 Controller eignet sich dazu prima, wer einen Bluetooth fähigen PC hat, kann den Controller auf diese Weise mit dem PC verbinden, ansonsten tut’s das gute alte USB Kabel. MotioninJoy bringt seinen eigenen Treiber mit, der inzwischen sogar signiert ist, womit das nervige ausschalten der Windows Treiber Signierung bei jedem Bootvorgang ausfällt.

Die Installation werde ich an dieser Stelle nicht erklären, da es hierfür genug Anleitungen auf der offiziellen MotioninJoy Seite gibt. Wer seinen Controller für Steam Spiele verwenden möchte, dem sei geraten das Profil “Xinput-Dafault” für XBOX 360 Controller Emulation zu aktivieren. Das hat bei mir mit fast allen Spielen bisher einwandfrei funktioniert. Mit Ausnahme von LoneSurvivor, für dieses Spiel musste ich ein “Custom Profile” anlegen.


 

Posted in Games, Windows | Comments (0)

Simple as that….

June 2nd, 2012

Today I wanted to change my my servers hostname. Normally I would just edit /etc/hostname, close my terminal window and open a new one (on my linux machine), but this didn’t work (on windows with putty). Well, after a rather short search on google, I found this post on debianadmin.org.

the magic command is /etc/init.d/hostname.sh after changing the hostname in /etc/hostname

I still had to restart my putty session, but it worked!

Posted in Linux | Comments (0)

SVN Subversion

April 9th, 2012

Today I wanted to setup a subversion server. I tried to do that before and endet up with nothing after some hours of fighting…

This time I found this blog entry by tony and I got everything done in 10 minutes. Only instead of adding the user manually to “/svnrepo/conf/passwd” I ran “htpasswd -c -m /svnrepo/conf/passwd username”, because I don’t like having user passwords stored in cleartext on my server. I don’t remember why it was such a pain last time I tried but now everything is working perfectly.

And if you prefer vi over nano then you should change the default svn editor with ”export SVN_EDITOR=vi” (thanks to jen)

20. April 2012 – Encryption?
What has happened?. I am sure that I created a svn-user with a MD5 encrypted password (htpasswd -m -c /myrepo/conf/passwd username) and I can swear that I used exactly this user for some days. But at some point my server must have realised, that it doesn’t work this way. The passwd file in /myrepo/conf is not a valid htpasswd file (but I didn’t knew that because of the “-c” parameter).
Well Suddenly my server started to throw “Authentification failed” errors at me when I tried to commit files, without even asking me for the password. So I looked into it and found out that everything workes fine if I just store my passwords in conf/passwd the way I should to – in cleartext. But I don’t like that! Not a bit! So I looked into svn password encryption methods and stumbled across SASL.

I will probably write a detailed article about how to setup SVN with SASL password encryption, but for now this will do…

Setup SASL:

http://chestofbooks.com/computers/revision-control/subversion-svn/Authenticating-With-SASL-Serverconfig-svnserve-Sasl-Authn.html

if you don’t want your svn client to store cached passwords in cleartext on your machine (I don’t!) the uncomment all “store-passwords=no” (section: [global]) in /home/user/.subversion/servers and make sure you don’t leave any leading whitespaces.

Good luck! ;)

Posted in Linux | Comments (0)