Skip to content

Instantly share code, notes, and snippets.

View DarkCoderSc's full-sized avatar

Jean-Pierre LESUEUR (Microsoft MVP) DarkCoderSc

View GitHub Profile
{-----------------------------------------------------------------------------------------------------------------------}
{ PHROZEN SAS (c) 2018 - www.phrozen.io }
{ Jean-Pierre LESUEUR ([email protected]) }
{ }
{ Create a Windows Shortcut by code and inject a potential malicious single line command, for post extraction and }
{ execution. }
{-----------------------------------------------------------------------------------------------------------------------}
program Shortcut_gen;
#-----------------------------------------------------------------------------------------------------------------------
# PHROZEN SAS (c) 2018 - www.phrozen.io
# Jean-Pierre LESUEUR ([email protected])
#
# Name : File2CmdLine
# Description : Conv a small file to a single line command. When executed the file is extracted and executed.
# Category : Malware Research
# Version : 1 (27/04/2017)
# Target OS : Windows XP->Windows 10 (32/64bit)
# License : MIT
uses ActiveX, ShlObj, ComObj;
// ...
function MaliciousLnk(fileUrl, destFile : String) : Boolean;
var cObject : IUnknown;
shellLink : IShellLink;
PFile : IPersistFile;
LinkName : string;
#-----------------------------------------------------------------------------------------------------------------------
# PHROZEN SAS (c) 2018 - www.phrozen.io
# Jean-Pierre LESUEUR ([email protected])
#
# Name : File2Batch
# Description : File Binder (Wrapper) only using Batch commands (.BAT output extension)
# Category : Malware Research
# Version : 0.1 (07/02/2018)
# Target OS : Windows XP->Windows 10 (32/64bit)
# License : MIT