Additional menu

Decrypt Stash File

Decrypt Stash File

Geek Flare Blog post is sponsored by Netsparker Web Application Security Scanner.

Stash file (.sth) file often used by WebSphere plugin and there might be a situation where you have lost the password. Don’t worry, it happens!

The easiest way to decrypt the .sth file with below Perl code.

  • Create a file and save below code
use strict;
die "Usage: $0 <stash file>n" if $#ARGV != 0;
my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";
my $stash;
read F,$stash,1024;
my @unstash=map { $_^0xf5 } unpack("C*",$stash);
foreach my $c (@unstash) {
 last if $c eq 0;
 printf "%c",$c;
printf " ";
  • Execute ./ filename.sth

This will decrypt the stash file.

You may watch this demonstration in below video.

Interested in learning about IBM Cloud? Check out this online course.

Reader Interactions

Chandan Kumar
About Chandan
Chandan Kumar is the founder of Geek Flare. Learn more here and connect with him on Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *