parsed.org

Tips by tag: paranoid

Adding Users with Passwords by xinu on Sep 10, 2005 12:13 AM

BSD is a little paranoid about where your passwords come from, so they'll insist on getting it from a stream. Here's an example:

(edit the file '/tmp/pass' and deposit the password there)            
% su root -c sh
Password:
# pw useradd -n test -c "Test User" -m -h 3 3< /tmp/pass
# grep test /etc/master.passwd
test:$1$T2tu0BET$UGPrNB1FavzjlzhTwUWRN.:1002:1002::0:0:Test User:/home/test:/bin/sh
# exit
% su test
Password: [typed "foobar" here...]
$ exit
bsdcommandsfreebsdneatparanoidpasswordspwsecurity
Moving Files by xinu on Nov 09, 2005 07:11 PM

If you need to move files, logs, or any kind of program output off a compromised system without disrupting evidentiary data on the disk, use netcat.

On your trusted system:

$ nc -v -l -p 2222 > victim.dump

On the victim's system:

$ <program> | nc <trusted_system> 2222

Where program is the discovery application you're running (e.g. netstat -an).

cleanupcommandsforensicsncnetcatparanoidsecuritytroubleshooting
RSS