Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

execute .bat file as xls or doc extension

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
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/...-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.
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.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by dpunksApr 5, 2024 12:50 PM 4 172 Apr 5, 2024 12:50 PM
Last Post: cebu
by youdongheeOct 18, 2023 04:10 PM 9 276 Oct 18, 2023 04:10 PM
Last Post: Zeus Akro
by dimikapFeb 9, 2023 05:07 AM 1 300 Feb 9, 2023 05:07 AM
Last Post: User 1234