0

enter image description hereI run a encrypted shell script through crontab, while checking for process of script through ps -ef | grep script_name it is showing process along with script code in plain text

# ps -ef | grep test_script.x

root      5134  2901  0 12:16 pts/3    00:00:00 ./test_script.x -c

#!/bin/bash if [ `echo $?` == 0 ]; then echo "This is my test script"  apt-get update else echo "This is end test script" fi sleep 3    ./test_script.x

root      5164 15802  0 12:16 pts/0    00:00:00 grep --color=auto test_script.x
srinuab4u
  • 371
  • Is it not supposed to decrypt the script before running it? – George Udosen Nov 30 '17 at 06:21
  • It should execute in background only but why it is showing script while checking of process ? – srinuab4u Nov 30 '17 at 09:43
  • 1
    I am not an expert but I think it's supposed to show the command that is running for that PID? – George Udosen Nov 30 '17 at 10:09
  • Are you sure you're running the encrypted version of the script (the one ending in .x?). Also, ps normally won't show the contents of a shell script, just the name-- could you give us an example of what's happening (redacting sensitive information or creating a separate script for posting purposes)? –  Nov 30 '17 at 16:20
  • 2
    Please don't post pictures of text. Instead, copy-paste the text, and use the formatting tools to make it look nice. This makes it easier for more people to find and read your question. (For more details, see Why do people post screenshots of their terminals?) – wjandrea Dec 04 '17 at 06:35
  • Can other people log in to the computer you are using? Can other other people run sudo in the computer you are using? Have other people physical access to the computer you are using? Please consider these aspects of security. See also this link, https://askubuntu.com/questions/981812/are-user-files-still-private-when-two-sudo-users-exist-in-ubuntu – sudodus Dec 04 '17 at 06:47

0 Answers0