![]() |
|
#1
|
||||
|
||||
|
Based on the discussion towards the end of
http://www.wilderssecurity.com/showthread.php?t=280685 Quote:
Whats a realistic defense strategy? One thing is to not enter the root password on any desktop application (including xterm). Suppose I also want to protect the data in my home directory. If I open xterm in the same x-session as say firfox or a compromised pdf, then I am screwed? As the malware can send keystrokes to xterm? Can javascript anyway screw me? Ie run downloaded malware files? What is the solution? Run multiple x-servers at the same time (can be done)? Use xserver-less consoles (CTRL+ALT+F2)? EDIT: See http://www.wilderssecurity.com/showp...1&postcount=21 for how easy it is for keyloggers to work ![]()
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. Last edited by wearetheborg : September 1st, 2010 at 02:02 PM. |
|
#2
|
|||
|
|||
|
I issued a challenge on the Ubuntu forums for someone to write a userspace keylogger for Linux/Xorg that does not take root access to install itself. A lot of people responded saying how easy it is, yet not one of them provided even a single line of code. I am not saying it cannot be done, but it certainly is not trivial.
|
|
#3
|
||||
|
||||
|
Quote:
|
|
#4
|
|||
|
|||
|
Quick search turned up those:
http://protomind.net/wp/?page_id=27 http://usbngh.delta-xi.net/index.php...rmissions.html http://lwn.net/Articles/363223/ (also see the comments, especially regarding Ctrl-Alt-Del in Windows) |
|
#5
|
||||
|
||||
|
Quote:
That is disturbing.... If I do CTRL+ALT+F2 to get to a console, then the keystrokes cannot be intercepted by the running X-Servers right?
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
|
#6
|
||||
|
||||
|
This discussion is now way out of my realm of Linux knowledge as I am just an average home user, but I have a question.
Some time ago, under the guidance of Mrk., I did a strace diff to see whether the system calls of the keyboard and the Ubuntu onscreen keyboard differ. They do differ, so I am wondering whether using keyboard and onscreen keyboard (onBoard) alternately when entering passwords would provide an extra 'dollop' of security ? Apologies for a novice question. ![]() The thread where I asked about this:- http://www.wilderssecurity.com/showt...ghlight=strace
__________________
|
|
#7
|
||||
|
||||
|
Quote:
|
|
#8
|
|||
|
|||
|
I don't see a problem with X server doing what it does. It's supposed to do that.
Like saying /var/log/messages logs all kinds of things or something. So what? Realistic defense strategy against what? Against an OS doing what it is supposed to be doing? To answer the question of keylogging: it's 4 minutes of work + root access to hook the right /dev. No magic, just geeky but not so difficult code. Nothing special. Someone installs something as root ... boo. Big deal. Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#9
|
||||
|
||||
|
Quote:
Ugh, I dont want an xwindow which is not in focus to capture keystrokes!!!
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
|
#10
|
||||
|
||||
|
Quote:
Yes, there is on the internet who can visit me on firefox ![]()
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
|
#11
|
|||
|
|||
|
wear, it's really not how you imagine it.
Mrk
__________________
http://www.dedoimedo.com All your base are belong to us Linux Systems Expert / Systems Programmer, Linux System Administrator, LPIC-1, LPIC-2 (WIP), GSEC, CCHD, CCHA |
|
#12
|
||||
|
||||
|
Quote:
|
|
#13
|
|||
|
|||
|
Quote:
Quote:
For example: you have your vulnerable but confined (SELinux, Apparmor, RBAC...) software that processes data that triggers a buffer overflow, the shellcode consists of a simple command that gets sent to all other windows hoping one is a terminal window with root logged in. Do you get root access or not? I'm eager to know if this would work (and please don't tell me there is no such Linux malware out there - I don't care, I'm purely interested in the abstract question whether this is insecure by design or not). |
|
#14
|
|||
|
|||
|
Quote:
|
|
#15
|
||||
|
||||
|
Quote:
Correct you are katio For those saying there is no such malware currently in existence: Good. But I would like to have a defense strategy in place BEFORE such malware go out in the wild, BEFORE I get hacked.
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
|
#16
|
||||
|
||||
|
Quote:
Quote:
Well said.
__________________
PCLinuxOS - Radically simple, it just works. That's why PCLOS is "The Distro Hopper Stopper!" http://www.pclinuxos.com/ If you don't use Linux. You're going to HELL!!!
|
|
#17
|
|||
|
|||
|
Quote:
The first one is for Swedish keyboards, so I don't feel like testing it. The second one is now deleted. And the third link I have seen before. However the author provides no POC, so it's just talk as far as I am concerned. |
|
#18
|
|||
|
|||
|
Quote:
__________________
Ubuntu, Chakra with Opera and Chromium Perpetually learning Linux novice, rank amateur. |
|
#19
|
||||
|
||||
|
Quote:
Personally, at this point, I'd be concerned with preventing the exploit from running at all rather than whether it can get root access or not. Chromium and/or NoScript comes to mind. Quote:
No offense, chronomatic, but you seem too be falling into the simple psychological trap of "see no evil, hear no evil". As long as you can find excuses to not acknowledge the existence of an exploit, you hence have nothing to fear from it, regardless of whether it exists or not? Last edited by Eice : August 30th, 2010 at 11:25 PM. |
|
#20
|
|||
|
|||
|
Quote:
|
|
#21
|
|||
|
|||
|
Found another one: http://www.stllinux.org/meeting_note...0619/xkey.html
This one has a few issues, I had to add #include <stdlib.h> and it doubles all key presses ("ppaasswwoorrdd"), nothing a bit of bash scripting couldn't fix though. I also tested the first "Swedish" POC, runs without issues. Adapting the code for another keymap is a quick fix, the code is self explanatory for everyone who's ever edited config files. On ubuntu you need build-essential and libxt-dev to compile them. Both run without root privileges, obviously. Next step is to test them with Apparmor and SELinux, any volunteers? Quote:
Last edited by katio : August 31st, 2010 at 08:57 AM. |
|
#22
|
||||
|
||||
|
Quote:
I got it compiled but it cannot find my display. BTW, it was coded in 1997! I'm surprised it runs at all. Quote:
Not compiling here. I have both build-essential and libxt-dev installed. Quote:
I will if I can get either working. Quote:
That's why we have MAC systems like SELinux and AppArmor, etc. They're not perfect, but they can be pretty close. |
|
#23
|
||||
|
||||
|
Quote:
Code:
It captures (doubles actually) all keystrokes, passwords and all, no matter the window focus ![]() (Thanks Katio, u da man) Fortunately, it does not capture keystrokes if I go to the console via CTL+ALT+F2 FML ![]()
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
|
#24
|
|||
|
|||
|
Quote:
I've got it compiled but it can't find my display. What did you use for your display name? |
|
#25
|
||||
|
||||
|
Quote:
nothing....I'm just running it in an xterm window as Code:
I think the display option is only important if you've got multiple x-servers running.
__________________
Windows XP: SRP + LUA + No Autostarts for Users + On demand scanned new exe's + Sandboxie'd Firefox with NoScript. Linux Hardening: AppArmor, SeLinux Limited User Accounts: In a LUA, you have the supreme power; a process cannot monkey around critical system parts without your explicit permission. |
| « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|
|