Questions tagged [unix]

Unix is a family of multiuser, multitasking operating system that is widely used in workstations, servers and embedded devices. The best-known Unix variant is Linux.

Unix is a family of multiuser, multitasking operating systems found on many servers, workstations, network equipment and other embedded devices. Unix variants include , , , , and more. Use the tag for questions that are about Unix-like systems in general; if your question is about a specific operating system (Linux, OpenBSD, …), use the tag for that system. For functional questions (“How do I use this tool which is not specifically a security tool?”), try asking on our sister site Unix & Linux.

In the core Unix security model, roles are described in terms of users (who are typically either physical users or system services) and groups. The permissions of an application are those of the user executing it. Some programs run with elevated privileges through the setuid/setgid mechanism.

Resources such as data files, programs and devices are accessed through files. In the traditional Unix model, each file has an owner and group, and the owner, group and others are granted separate permissions (read/write/execute). Many modern Unix systems provide access control lists and other extensions to the basic model.

151 questions
2
votes
1 answer

Eavesdropping a communication between a local application and the network

After some digging on the Internet, I've been unable to find a satisfying solution for my curiosity... Here's the thing : using a shell script, I've been able to obtain a list of IP addresses connected to my computer (ss), along with the names/PID…
John WH Smith
  • 127
  • 1
  • 6
2
votes
1 answer

unix malicious scripts/ksh execution

I'm wondering whether my architecture poses a security risk. Details: The whole website is not ROOT owned but still, the APACHE user used instead has some pretty advanced permissions. I have a folder "user_files" that may hold any kind of user…
Sebas
2
votes
2 answers

What's the secure way to change UNIX permissions on a harcoded file often?

I'm writing a daemon that monitors something in the OS and flips execution permissions on a file in /run/ back and forth. The file has static contents and the file name is hardcoded in the daemon. I made the daemon run as root to make it able to…
Shnatsel
  • 2,802
  • 2
  • 16
  • 15
2
votes
2 answers

On a single user laptop does it make sense to have a separte password for root and the user?

I have a laptop on which I'm the only user. While installing the laptop I was wondering why I should choose a different password for the root account and user account. My reasoning is: The change of finding a valid password doubles if the user and…
2
votes
1 answer

is root@localhost the same as Unix root with GUID = 0 and ID = 0?

Is a Mysql root user (root@localhost) the same as the computer root account (GUID = 0, ID = 0) ? I mean, is it the root which is executing the script? How can I know if the users are the same?
2
votes
1 answer

Sanitising a file/folder path from user input

I have an external server make backups of my main server via scp and a backup-only user account. I successfully restricted it to scp only using GNU Rush. The scp command below executed on the backup server downloads /var/www/website1/file2 from the…
mehov
  • 421
  • 4
  • 9
2
votes
1 answer

What are the dangers of extending my PATH?

Are there any dangers of extending my PATH, say by adding /Users/me/bin?
gen
  • 1,660
  • 2
  • 18
  • 18
2
votes
1 answer

Unix/Linux shells which use effective UID instead of real UID

My question is build on top of the answer of the question about SUID exploitation: SUID not used after exploit The person (official answer) is stating that: Many popular implementations of sh drop privileges when they start up: they reset their…
Awaaaaarghhh
  • 562
  • 2
  • 18
2
votes
1 answer

Advice to help crack MD5crypt hash

I've been given a homework task to crack a particularly difficult password on a Unix system. I have found users and hashes in the etc/shadow file and cracked all but this one: $1$TyPfW4pp$Mp7O4bzX8bmWsGGV8ZrVY0 I've been told that this should be…
Ali97
  • 31
  • 1
  • 2
2
votes
1 answer

In-memory encrypted Linux/unix kernel

Is there a variant of Linux kernel for virtualization that runs in-memory in a state that can't be read by the host operating system?
jimmy
  • 121
  • 3
2
votes
1 answer

Way to properly escape user input which gets run by shell_exec() in PHP?

I have the following script: $user_input = $_POST['user_input']; // If there is a way, I want to escape it here. shell_exec("php some_file.php $user_input"); Is there a way to properly escape the user_input?
Tim von Känel
  • 197
  • 1
  • 8
2
votes
1 answer

Is the traversal permission in a Unix filesystem exploitable by itself, in the absence of any other permissions/ACLs?

Scenario/question: A unix directory tree has NTFv4 ACLs configured to allow an unprivileged account traversal on all dirs (but no other ACL granting further rights on any file/dir anywhere In such a case, is it completely safe to universally grant…
Stilez
  • 1,664
  • 8
  • 13
2
votes
4 answers

unix config scanner / compliance checks

I'm looking for a tool, that scans unix operating systems for configuration issues. E.g. a script that finds PermitRootLogin yes in the ssh config file or with other words: a script that automates compliance checks. Since there are quite a few…
user857990
  • 903
  • 1
  • 9
  • 21
2
votes
2 answers

Permissions for configuration file for program run as root that must be modifiable by SFTP

A shell script (myscript) will be run as root, by cron. It reads IP addresses from a configuration file, and updates iptables to whitelist those IPs for inbound connections. myscript uses a regexp (regular expression) to parse the configuration file…
sampablokuper
  • 1,961
  • 1
  • 19
  • 33
2
votes
2 answers

Sniff plaintext password written in /tmp directory

I was recently reading about Ansible and the way it manages the sudo passwords. More specifically: When using become_user to a user other than root, the module arguments are briefly written into a random tempfile in /tmp. These are deleted…
bergercookie
  • 143
  • 4