Encrypt shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Encrypt shell script
# 8  
Old 11-27-2013
Can anyone decrypt shc encrypted code again ?
# 9  
Old 11-27-2013
Never tried, but it should be possible to replace the interpreter shc is calling (/bin/bash /bin/sh etc) with our own code that simply saved it's input. I wouldn't trust anything in a shc compiled script as secure.
# 10  
Old 11-27-2013
It will be very difficult to get the shell code out of a shc'ed program, since I think it's all turned into assembly. They could disassemble it but it'd be an immense amount of detective work to retrace its steps.

I don't think shc depends on an external shell. There'd be precious little point.

Text strings are another matter. They may be directly extractable via the strings utility.

If you cannot protect the destination file itself, shc is about the best you can manage.

Last edited by Corona688; 11-27-2013 at 11:51 AM..
# 11  
Old 11-27-2013
From the manual
Quote:
Upon execution, the compiled binary will decrypt and execute the code with the shell -c option. Unfortunatelly, it will not give you any speed improvement as a real C program would.
Strings will not work because the script is encrypted within the binary, so it's by no means a trivial job to get at the script source, but I would not be putting any credit card numbers, banking details or passwords in there!
This User Gave Thanks to Chubler_XL For This Post:
# 12  
Old 11-27-2013
Well, dang. That's not even any improvement on the other rube-goldberg machines. No security benefit, no speed benefit, why bother?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Encrypt script

Hi, I have to encrypt my ash scripts on a distribution of linux with Armv5tejl Buildroot , I tried a lot of solutions but none works . Someone can help me? Thanks, Nicola (7 Replies)
Discussion started by: n.rito
7 Replies

2. Shell Programming and Scripting

Shell script to encrypt the xls file using executable jar in Linux SUSE 11.4

Dear Experts, I am an ERP consultant and would like to learn shell script. We are working on Linux SUSE 11.4 and I am very new to shell scripting. We can manually encrypt an excel file using "executable jar" through command prompt by placing the jar file & the file to be encrypted on a physical... (1 Reply)
Discussion started by: nithin226
1 Replies

3. Shell Programming and Scripting

Encrypt and decrypt the password in a Shell Script

Hello, I have the following UNIX shell script which connects to the teradata database and executes the SQL Queries. For this, I am passing database name, username and password. I don't want to reveal my password to anyone. So, is there any way that I can encrypt my password and read the... (2 Replies)
Discussion started by: ronitreddy
2 Replies

4. Shell Programming and Scripting

Encrypt and decrypt a password in shell script

Hi All, very good morning all. I am trying to connect to informatica repository by using shell script. I have written pmrep connect command in the script file. But i need to provide repository, domain ,username and password to connect. Username and password are hard coded in the script... (8 Replies)
Discussion started by: SekhaReddy
8 Replies

5. Shell Programming and Scripting

Encrypt Password file and decrypt in a shell script

Hi All, I have stored Oracle database passwords in a hidden file - .pass_file. My shell script reads the hidden file, gets the password and then logs in to the Oracle database and runs some SQL script. My requirement is: I need to provide the shell script to be executed by someone else. So,... (1 Reply)
Discussion started by: sunpraveen
1 Replies

6. Shell Programming and Scripting

how to encrypt a password in shell script

Hi, I have run the below script which is connected to db2 v9.5. There is no issue. The only problem is how to encrypt the dbpwd? #!/bin/ksh #---- Set Environment dbalias="dev1db" dbuser="user1" dbpwd="password" #---- Connect to the Database cd /opt/ibm/db2/V9.5/bin db2 "connect to... (1 Reply)
Discussion started by: lookinginfo
1 Replies

7. Shell Programming and Scripting

how to set password/encrypt a shell script

Hi, I have written a shell script in unix for my customer. Now I want to make it only execute and not to read/write. Can anybody help me how to set password protect/encript my script. Thanks Suresh (3 Replies)
Discussion started by: suresh3566
3 Replies

8. Shell Programming and Scripting

shell script encrypt a file using gpg

Hi, I have a requirement to encrypt a file using gpg with a public key. However when i encrypt a file, i get a question like 'Do you want to go ahead with unverified user?' . when i press 'y' file is encrypted. I am not able to automate this job because of this interactive mode. Could... (3 Replies)
Discussion started by: Deepakbabu
3 Replies

9. Shell Programming and Scripting

how to encrypt my shell script program in linux

for security purpose I want to encrypt my shell script program.please give me some idea immediately. I have already try SHC in my server but after using SHC server hang problem is occured. kindly provide me solution for that. akm (3 Replies)
Discussion started by: akm9999
3 Replies

10. UNIX for Dummies Questions & Answers

Shell to run query, encrypt and send email

Hello To do : 'automate the process of generating report and send it to client every 15 days after encrypting the report file' Did so far : - generate Java program to encrypt the file. - generate SQL query to run the report. Is there any body who can help me to go further ? ... (7 Replies)
Discussion started by: cub
7 Replies
Login or Register to Ask a Question