Attacking Potential of sh-scripts


 
Thread Tools Search this Thread
Special Forums Cybersecurity Attacking Potential of sh-scripts
# 8  
Old 03-28-2011
I think the encryption/decryption can be cracked.
But what I just read (just a quick google) as a signature algorithm with a secure hash algorithm (e.g. SHA2) it is still safe
# 9  
Old 03-28-2011
It's not clear to me which executables are available for use in the shell script. A shell script will need the interpreter or it's inert. Can the script use standard utilities like chmod or sed? Can it invoke subsidiary languages like awk, or perl? A language can perl can do almost everything that can be done with an executable.

Must the cracker actually damage anything? Lots of crackers simply want a copy of your data and avoid damaging stuff to avoid detection. But in your scenario a cracker like that is tolerable?

----edit----
Also what about shared libraries? Are they signed as well?
# 10  
Old 03-29-2011
Quote:
Originally Posted by Perderabo
It's not clear to me which executables are available for use in the shell script. A shell script will need the interpreter or it's inert. Can the script use standard utilities like chmod or sed? Can it invoke subsidiary languages like awk, or perl? A language can perl can do almost everything that can be done with an executable.
Well, "standard" programs are available (chmod, chroot etc. for security reasons not), and also I managed to prevent scripting languages like perl from execution (i.e. only signed code is executed)

Quote:
Must the cracker actually damage anything? Lots of crackers simply want a copy of your data and avoid damaging stuff to avoid detection. But in your scenario a cracker like that is tolerable?
Didn't really think of that tbh, but no, I want it as safe as possible Smilie

Quote:
Also what about shared libraries? Are they signed as well?
Yep Smilie

Maybe a short summary of what I want and what I already managed to do: The final target is a system on which only authorized code can be executed to get maximum control of what is run on it (may seem weird, but we are not talking about a home PC here). I already managed to prevent any non signed code (both binaries and scripting languages like perl or python). For scripting languages this is done via a kernel heck in die script interpreter loader, so I can not only prevent calls like ./hack.pl but also perl hack.pl. The problem is that with my approach I would actually disable the shell, so loggin in isn't possible anymore

Last edited by disaster; 03-29-2011 at 06:13 AM..
# 11  
Old 03-29-2011
Since I guess most shell languages based on the original Bourne Shell are Turing complete you can code up anything, given enough time. The simplest case that I can think of is a shell script that connects to an IRC server and acts as a spam bot, or a FTP-over-IRC server.
This User Gave Thanks to pludi For This Post:
# 12  
Old 03-29-2011
Quote:
Originally Posted by disaster
Well, "standard" programs are available (chmod, chroot etc. for security reasons not)
You could hardly have a UNIX system without chmod. You'd be unable to prevent anyone from reading your files -- or, if the default umask is set in a draconian manner, unable to allow anyone to read your files. The only user able to do so would presumably be root (since only root can change other users' permissions), so you'd need to run things as root all the time to accomplish normal tasks.

I think you need to rethink your security model.
# 13  
Old 03-29-2011
If simply reading files needs to be prevented you are going to be out of luck with your approach. With bash or ksh a user with no access to any executables can do stuff like:
Code:
function cat { while read l ; do echo "$l" ; done < $1 ; }
function ls { while [ $# -ne 0 ] ; do echo "$1" ; shift; done ;}

and browse the system for any readable files. You really need to put users in a chroot jail and ensure that they have no root access to get true security.
# 14  
Old 03-29-2011
Why don't you just publish the ip and a user id and password, so that we can have at it...
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. HP-UX

Potential file system contention on directory

We have an 8-processor Itanium system running HP-UX 11.23 connected to shared SAN discs. We have an application that creates files (about 10) in a specific directory. When the application terminates, these files are removed (unlink) and a few others are updated. The directory contains... (8 Replies)
Discussion started by: FDesrochers
8 Replies

2. AIX

how to handle potential file contention

I need to change how a posting procedure currently works in order to improve load balancing but I am hitting a potential file contention problem that I was wondering if someone here could assist me with... In a directory called FilePool I would have a bunch of files that are constantly coming in... (3 Replies)
Discussion started by: philplasma
3 Replies

3. UNIX for Dummies Questions & Answers

Potential new user of Unix

Hi all, Complete and utter virgin Unix person here (I don't even have the OS yet) As I'm doing a "looking into it" kinda thing before I move from MS I hope my questions are not inappropriate. 1. Should I get some kind off anti virus software. I know Unix is pretty good for not getting them... (2 Replies)
Discussion started by: dhula
2 Replies
Login or Register to Ask a Question