![]() |
|
execute .bat file as xls or doc extension - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Beginner Hacking (https://hackforums.net/forumdisplay.php?fid=4) +---- Thread: execute .bat file as xls or doc extension (/showthread.php?tid=5965623) |
execute .bat file as xls or doc extension - JJ007 - May 1, 2019 hi experts i knew few about web application hacking now, im trying to learn about application hacking. below is my question i have a .bat file with some echo messages but, when i change the extension into .doc or .xls then its not poping up any echo messages so, may i know how to execute bat file thought its extension is xls or doc thanks in advance jj RE: execute .bat file as xls or doc extension - CyberStrike - May 1, 2019 changing the extension is not going to help, you can either create a macro using vba which executes commands, also you have vbscript which can be embedded into a document, next alternate datastreams or ADS which in theory allows for weaponization of almost any file of course execution might be a challenge. I almost forgot in Excel check out Excel Macro 4.0, this is older than VBA and it seems that old technology is not as well thought of as new implements so AV makers generally forget these things. Example of embedded VBS CVE: https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2018-8174 Malicious macro's have been around since 1997, and often raise flags. ADS is rather well known and can be hit and miss in detections. RE: execute .bat file as xls or doc extension - hf8888 - May 1, 2019 Microsoft uses the file extension only to determine what program opens a particular file, so changing from .bat to .doc will trigger whatever software is configured to open .doc files instead. This can be modified on the system to default to a different program or the "Open with" dialog when you right click can temporarily override the default. Since a .bat opens with cmd.exe you could change it to .exe or some other extension that triggers cmd.exe to run and it will still work, but short of configuration changes you can't make it run with an extension that doesn't open the appropriate software. |