Category: articles

Login Hack in X (Linux)

June 11th, 2015 — 12:56 pm

Einen Login Manager habe ich nicht in Debian. Debian laeuft bei mir in einer VM und dort quasi immer. Wenn ich die VM nicht brauche kommt sie in den Suspend. Ich melde mich also ueber den Mac am System an.

Mit folgendem Hack erreiche ich ein fuer mich optimales Login:

In meiner /etc/inittab (das init System in Linux definiert Runlevels und in der inittab definiert die Prozesse, welche beim Start der Runlevels gestartet werden):

1:2345:respawn:/bin/login -f munen tty1 /dev/tty1 2>&1

Normalerweise sollte da ein Login stehen, etwa getty fuer Konsolen Login. Mein Hack loggt automatisch den User `munen` ein.

In der /etc/passwd steht welche Shell der User `munen` moechte, das ist bei mir die zsh. Diese wird beim Login des Users also gestartet. Eine der Konfigurationsdateien, welche die ZSH liesst ist die ~/.zprofile. In dieser steht Folgendes:

if [[ -z "$DISPLAY" && $(tty) = /dev/tty1 ]]; then
exec startx

Das bedeutet, dass wenn die ZSH startet geprueft wird, ob ich auf den tty1 eingeloggt bin (siehe inittab). Falls ja, wird X via startx gestartet. Das ist ein Shell Script was im xinit Paket von Debian mitkommt. Dieses startet X ohne Login Manager.

Et voilĂ ! Linux startet mit graphischer Oberflaeche ohne nur eine Passwort Eingabe! Ich betone nochmal, das mache ich, da ich den Mac _immer_ locke wenn ich ihn verlasse und mein Linux ausschliesslich als VM im Mac laeuft.

Ist ein Hack, aber auch ein gutes Beispiel dafuer dass man mit einem Linux machen kann was man mag – wenn man es denn will^^

Comment » | articles

OSX Yosemite – Closing random ports

December 19th, 2014 — 06:51 pm

Ever since upgrading to OS X Yosemite (currently version 10.10.1 (14B25)), I experienced networking issues. Sometimes some ports were closed, meaning that various services did not work as expected (Mail, Evernote, etc). Not only that, ports could sometimes also be inaccessible on my local machine which is tough when you’re trying to develop web applications on that machine. And yeah, I truly mean ‘sometimes’. Other times it would just work well. The one work-around that I found was to switch the WiFi spot frequently which made ports accessible on remote machines as well as my local one which didn’t seem to make any sense.

I figured it must have been some kind of firewall and dug around there. OS X has shipped several firewalls over the last decade and I had a look into every single one of them. But nothing helped. On a random hunch, I went to my WiFi Settings and toggled the option “Auto Proxy Discovery” – and off went the bad spell that was on my machine. I can finally access all ports locally and externally. Who would’ve figured…

Seemingly harmless culprit

Comment » | articles

Be careful when seeing a browser warning

October 20th, 2014 — 07:19 pm

When you see your browser complaining about the sites security certificate (see screenshots below for the common browsers), then do not proceed and visit the site. It means that someone having access to your network is trying to get access to your information, even to your account. This might be somebody on your local network (like in a Starbucks) or it might even be your government (like China is currently doing for well known sites like iCloud and Google).

If you see your browser showing a message like this, it means that the connection is not secure and encrypted as it usually is. It means that whatever you type into your browser (like your accounts password) will be sent to the entity highjacking your connection. This process is called Man In The Middle Attack (MITM). So, unless you absolutely know what you’re doing, ignoring the warning is almost always the wrong choice leading to your secrets being no longer secret. This happens most often in a public wifi like a Starbucks, but it could be your company, your Internet Service Provider, your government or a random hacker using a flaw in any of your otherwise reasonably secure connection.

So what can you do about this? Primarily, you need to make sure you have a secure connection on a network level. Whatever connection you were using before is compromised. There are three easily accessible options out there:

One option is to change your connection completely, so if you’ve been on a public Wifi before, switch to a hotspot provided by your phone. Most likely the entity snooping in on one of your networks, cannot do so for the other. Governments and Intelligence Agencies being the exception here. Only the second option will circumvent their efforts in undermining your security.

The second option is to put a layer of encryption over the current connection. You could use a Virtual Private Network (VPN) for that. A VPN basically encrypts all network transmissions, regardless of whether or not the application that you want to use is already secure. This results in your connection being secured twice in a good case when no hacker is around – whilst in a bad case (hacker sniffing in on you), your connection is still secured by a VPN.

Do not use the often cited third option: Do not use Tor to prevent yourself from a MITM attack. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world. Therefore, it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location. However, the exist nodes for Tor make normal unencrypted requests – meaning they will not prevent you from a MITM attack. They might for your specific case, so if you wanted to try it against your current problem, it might work. On the other hand these Tor exit nodes might also be malicious users explicitly out there to steal your information. So better go with a trusted VPN.

Be safe.




Internet Explorer





Note: This is a repost from my article over at

Comment » | articles

« Previous Entries     Next Entries »