Questions tagged [linux]
Securing Linux systems and applications; understanding Linux security features.
245
questions
212
votes
4
answers
67k
views
Is a rand from /dev/urandom secure for a login key?
Lets say I want to create a cookie for a user. Would simply generating a 1024 bit string by using /dev/urandom, and checking if it already exists (looping until I get a unique one) suffice?
Should I ...
90
votes
9
answers
22k
views
Hardening Linux Server
We have already had questions on here about Hardening Apache, Hardening PHP and Securing SSH.
To continue this trend I am interested in what steps people take to harden Linux servers. As in what ...
50
votes
7
answers
29k
views
How to prevent BadUSB attacks on Linux desktop?
What can I do to protect my Linux laptop from BadUSB attacks as described by ArsTechnica here?
Perhaps writing an appropriate AppArmor profile would help?
17
votes
6
answers
6k
views
Server compromised for 2nd time, cannot locate source of attack
I need some help tracing a vulnerability on my server. For the second time, my server has been compromised with files being replaced with virus-ridden downloads.
According to the filesystem dates, ...
67
votes
5
answers
106k
views
What can an attacker do with Bluetooth and how should it be mitigated?
What are the security risks of Bluetooth and what technologies and best practices should be used to protect my device? What can an attacker do once a malicious device is paired with mine?
...
116
votes
7
answers
21k
views
Can "cat-ing" a file be a potential security risk?
I often use cat on the console to view the contents of files, and every now and then I accidentally cat a binary file which basically produces gibberish and system beeps. However today I've ...
117
votes
9
answers
45k
views
Should I change the default SSH port on linux servers?
Is there any advantage in changing the SSH port, I've seen people do that, but I can't seem to find the reason why.
If you have a strong password and/or a certificate, is it useful for anything?
...
213
votes
5
answers
154k
views
What is a specific example of how the Shellshock Bash bug could be exploited?
I read some articles (article1, article2, article3, article4) about the Shellshock Bash bug (CVE-2014-6271 reported Sep 24, 2014) and have a general idea of what the vulnerability is and how it could ...
56
votes
5
answers
18k
views
environment variable accessibility in Linux
Perhaps this is a trivial question, but how accessible are environment variables in Linux between different users?
e.g. if Alice executes
export FAVORITE_FOOD=`cat /home/alice/fav_food.txt`
Can Eve ...
40
votes
6
answers
10k
views
Secure Linux Desktop
I'm looking for hints about secure linux desktops. Securing servers is no problem. Most recent Software Updates, run only the services required etc. But what about desktops? I'm thinking about details ...
121
votes
8
answers
9k
views
Attacking an office printer?
I did an nmap scan on an advanced office printer that has a domain name and is accessible from outside the corporate network. Surprisingly I found many open ports like http:80, https:443, and svrloc:...
29
votes
5
answers
10k
views
Why should one use sudo? [duplicate]
Most modern Linux articles advice using sudo rather than logging into root. This advice is so ingrained, some distros don't automatically allow root login. Indeed they come pre-configured with sudo ...
19
votes
7
answers
12k
views
Any comprehensive solutions for binary code protection and anti-reverse-engineering? [closed]
Does anyone know of good products with comprehensive binary hardening and anti-reverse-engineering features? Or better, has anyone seen an independent review comparing products that perform these ...
16
votes
6
answers
3k
views
Securely building a local pentest lab in a VM
I'd like to set up OWASP WebGoat or a similar vulnerable web app in a VM (probably VirtualBox on Linux). For convenience's sake, I'd like to get it running on one of the primary machines I use (say, a ...
6
votes
1
answer
322
views
How to keep backup servers safe?
I use duplicity on a few Ubuntu servers to encrypt backups and send them to a backup server, which then sends another copy to rsync.net, and then, once a week, give it or take, I download these ...
5
votes
1
answer
4k
views
SUID not used after exploit
I know the following
When you execute a program that has the SUID bit enabled, you inherit the permissions of that program's owner.
I am currently user1, but want to read the pass of user2
I ...
247
votes
4
answers
421k
views
What is the difference between authorized_keys and known_hosts file for SSH?
I am learning the basics of SSH protocol. I am confused between the contents of the following 2 files:
~/.ssh/authorized_keys: Holds a list of authorized public keys for servers. When the client ...
91
votes
7
answers
54k
views
Should I get an antivirus for Ubuntu?
Considering the recent thread regarding anti-virus for the Mac I wonder how many of the arguments put forth are relevant today to Linux systems, specifically Ubuntu.
There are no known Ubuntu desktop ...
73
votes
2
answers
96k
views
Diffie Hellman parameters still calculating after 24 hours
I have a fresh install of Arch Linux on a RaspberryPi model B. I'm setting up OpenVPN and using easy-rsa with OpenSSL 1.0.2d to generate initial keys and certificates. All went fine until I ran ./...
12
votes
7
answers
7k
views
Linux or Windows- the security issue [duplicate]
Possible Duplicate:
Open Source vs Closed Source Systems
Almost anyone who has grown up on Windows must have had the notion (that I had) of Linux being more secure than Windows- one of reasons ...
7
votes
3
answers
842
views
Appropriate defense for 404s in my logs - persistent web scans from one region
This seems to be a fairly easy question to figure out, but I wanted to make sure. I've got about a thousand entries on one of my web servers with phpmyadmin in the connection criterion, but as I don'...
65
votes
4
answers
13k
views
Are most Linux systems that allow non-root users to execute code straightforwardly rootable?
long story short if you can execute code on a box it is usually straightforward to get root
(quote source)
The immediate implication of this quote (if it's accurate) is that if you're running a ...
55
votes
8
answers
23k
views
Keeping secrets from root on Linux
I am looking for ways to harden a linux system so that even when gaining full root access (through legit or non-legit means), some secrets remain inaccessible. But first a little background.
Many of ...
46
votes
4
answers
69k
views
How do you know your server has been compromised?
I recently helped a client who had their server hacked. The hackers added some PHP code into the header of the homepage redirecting the user to a porn website — but only if they came from Google. This ...
28
votes
1
answer
5k
views
DMA attacks despite IOMMU isolation
If you're already familiar with PCI behavior and Linux's handling of DMA buffers, skip to the third section for my actual question. Otherwise read on for a small summary of how PCI devices perform ...
26
votes
3
answers
42k
views
For LUKS: The most preferable and safest cipher?
I'm about to encrypt two of my hard drives using LUKS, since I can't really do it myself I use the guide on the Arch Linux wiki (which can be found here). In an example in the guide the cipher ...
26
votes
2
answers
26k
views
What does enabling kernel.unprivileged_userns_clone do?
This message was sent to my websocket:
echo kernel.unprivileged_userns_clone = 1 | sudo tee /etc/sysctl.d/00-local-userns.conf
Is it dangerous, and what would it do?
Thanks for your feedback ...
26
votes
1
answer
33k
views
Configure SSL Mutual (Two-way) Authentication
A lot of tutorials, a lot of pages, a lot of question and they differ in implementation of this issue "Configure SSL Mutual (Two-way) Authentication". I have to do it with Linux, and I don't know from ...
70
votes
7
answers
24k
views
What is the possible impact of dirtyc0w a.k.a. "Dirty COW" bug?
I heard about Dirty COW but couldn't find any decent writeup on the scope of the bug. It looks like the exploit can overwrite any non-writable file, which makes me guess that local root is possible ...
47
votes
1
answer
4k
views
Can the previewable option in file managers execute malware?
I am using Nemo file manager and I enabled the Previewable files option that shows video/photo files with their thumbnails:
I don't know exactly how files managers generate thumbnails, but I am ...
42
votes
3
answers
29k
views
Security Concerns with X11 Forwarding
What are some of the security concerns and reasons either for or against allowing X11 Forwarding. I have generally taken an approach of not allowing it under the blanket guise of security. Recently, ...
21
votes
1
answer
12k
views
How to check if my USB stick firmware can be rewritten via the USB port?
How can I know in Linux (or otherwise), if the firmware of my USB flash drive can be rewritten using the USB port (when sticking it in an USB port)? Eg. for a cheap EMTEC 16GB.
I was thinking about ...
17
votes
5
answers
29k
views
Monitoring system calls (in a reliable and secure way)
It there a reliable method of “monitoring” system calls under Linux?
There is strace for example to monitor system calls and signals. Is there a way for a process to dodge out of strace? If yes, is ...
16
votes
3
answers
10k
views
Using TPM with DMcrypt?
Is it possible to use TPM for storage of some private key? It's not a full-disk encryption , I want it to be compatible with existing LUKS, just add another key, and store it in the TPM.
14
votes
4
answers
14k
views
Add a file as entropy source for /dev/random
What I have: A large file containing lots of secret, true-random bytes (yes, I'm sure they're not merely pseudo-random). I'll call it F.
What I want to do: Tell Linux that it can use this file as an ...
14
votes
1
answer
946
views
Random seed not propagating to the entropy pools in a timely manner
The Linux kernel's randomness driver collects entropy from the environment. Because there will be little entropy during boot, a random seed is often kept at /var/lib/misc/random-seed or a similar ...
12
votes
8
answers
13k
views
How anonymous is my setup?
my friend and I are trying to make the most anonymous setup for a computer to do things across the internet without being known the location from which it came.
Our setup is as follows:
A windows ...
12
votes
2
answers
3k
views
Is there any Linux distro or kernel patch that wipes a process memory space after the process exits?
An application runs on an embedded battery-powered PC, accessible to some restricted public, that stores secrets in RAM. To prevent cold boot attacks and that the PC is stolen to extract its secrets, ...
7
votes
3
answers
2k
views
How to (further) ensure SSH security?
I set up my Linux Ubuntu machine as an SSH server through no-ip.com and it works great.
Recently I discovered the command,
sudo lastb -ad -F -w
which outputs a log of the most recent failed SSH ...
6
votes
2
answers
2k
views
For remotely unlocking LUKS volumes via SSH, how can I verify integrity before sending passphrase?
Although this is closely related to the recently closed question Evil maids in the server room [closed], I believe that it's more answerable.
I'd like to unlock LUKS volumes on remotely hosted ...
6
votes
1
answer
4k
views
How to find stack pointer for overflow bug?
I've read that stack usually starts in same address so the attacker may guess the starting point of the buffer to overflow. This is necessary to know this address to make the malicious code run. I ...
5
votes
2
answers
15k
views
How to change default cipher in GnuPG on both Linux and Windows?
How can I change the default symmetric cipher used by GnuPG from CAST5 to another?
I'm using GPG4Win on Windows, but would also be interested in a solution for Linux.
3
votes
2
answers
4k
views
UEFI secure boot and rootkits
I heard that with UEFI secure boot enabled a custom kernel module that is not signed will not run, hence a rootkit might be difficult to install.
Can a secure boot really block rootkit modules from ...
1
vote
3
answers
9k
views
Cracking passwords after a pattern with John
So I am trying to find out how easy it is to crack a password using some great Linux tools.
We all know about John as a password cracker and how great it is. But how about specifying a pattern.
Let'...
-2
votes
1
answer
2k
views
Cascading Encryption Algorithm using mcrypt or GnuGP
I'm trying to a cascading cipher encryption algorithm to encrypt a textfile via mcrypt. I'm essentially trying to emulate the behavior of TrueCrypt, where it can cascade two or three different cipher ...
193
votes
6
answers
30k
views
Isn't Ubuntu's system prompt for my password spoofable?
Sometimes, Ubuntu shows the following window:
This window can be caused by some background processes running, such as an automatic update, or a process which reports bugs to Canonical which manifests ...
155
votes
23
answers
31k
views
Hardening Linux desktop machine against people from my household
I am looking to make a clean install of a Debian system on my home desktop. To clarify, I am switching from Windows and wish to use it as my day-to-day home OS - I'm not going to be running any ...
97
votes
10
answers
25k
views
How would disabling IPv6 make a server any more secure?
I was reading this article about hardening security on Linux servers, and in point #23, the article says:
#23: Turn Off IPv6
Internet Protocol version 6 (IPv6) provides a new Internet layer of
...
50
votes
3
answers
71k
views
Simple example auditd configuration?
Auditd was recommended in an answer to Linux command logging?
The default install on Ubuntu seems to barely log anything. There are several examples that come with it (capp.rules, nispom.rules, stig....
32
votes
3
answers
10k
views
Why doesn't Linux randomize the address of the executable code segment?
I've recently been learning about how ASLR (address space randomization) works on Linux. At least on Fedora and Red Hat Enterprise Linux, there are two kinds of executable programs:
Position ...