Open dimitrios1988 opened 9 years ago
If the vbs is created from linux, then the runtime error occurs. I created the vbs from windows and everything is working fine.
It sounds like a write permission error on the linux OS. What flavor of linux were you using, what user were you logged into as, and lastly what does ls -al show? I've only tested the code on Kali, debian, and ubuntu in a chmod 777 directory. I'll run some tests on my end to see if I can replicate and correct the error.
On Sun, Jul 19, 2015 at 6:38 PM, Chondrokoukis Dimitrios < notifications@github.com> wrote:
If the vbs is created from linux, then the runtime error occurs. I created the vbs from windows and everything is working fine.
— Reply to this email directly or view it on GitHub https://github.com/khr0x40sh/MacroShop/issues/1#issuecomment-122711937.
I think I misunderstood your first comment. Can you post both files (the vb generated in linux and the one from windows) somewhere so I can run a diff on them and see maybe it is an environment issue? Thanks.
Sorry for the late response, but I was busy the last couple of days.
The Payload type I used in Veil was cs/meterpreter/rev_http
These are the parameters COMPILE_TO_EXE = Y LHOST=192.168.2.10 LPORT=4444 USE_ARYA=Y
The output file was payload.exe
Then I used the following command in Linux python exeinvba.py --exe ./payload.exe --out payloadLinux.vbs --dest "C:\payloadLinux.exe"
and the following command in Windows to create the respective files. python exeinvba.py --exe ./payload.exe --out payloadWindows.vbs --dest "C:\payloadWindows.exe"
When I run payloadLinux.vbs there is a 3004 runtime error which says "Write to file failes". The payloadWindows.vbs runs successfully.
The Linux machine runs the latest version of Kali Linux 32bit with the latest updates from the official repo.
The Windows machine runs Windows XP 32bit with the latest updates.
Here is a link to download the generated files. https://www.dropbox.com/s/mnrojz3axofneo8/files.zip?dl=0
It appears the linux vba does not escape the backslash properly in the destination name. Also, diff reports every line as different, so I am thinking an environmental newline issue may be present. Thanks for your help, I should have a fix for this soon.
On Tue, Jul 21, 2015 at 7:24 PM, Chondrokoukis Dimitrios < notifications@github.com> wrote:
The Payload type I used in Veil was cs/meterpreter/rev_http
These are the parameters COMPILE_TO_EXE = Y LHOST=192.168.2.10 LPORT=4444 USE_ARYA=Y
The output file was payload.exe
Then I used the following command in Linux python exeinvba.py --exe ./payload.exe --out payloadLinux.vbs --dest "C:\payloadLinux.exe"
and the following command in Windows to create the respective files. python exeinvba.py --exe ./payload.exe --out payloadWindows.vbs --dest "C:\payloadWindows.exe"
When I run payloadLinux.vbs there is a 3004 runtime error which says "Write to file failes". The payloadWindows.vbs runs successfully.
The Linux machine runs the latest version of Kali Linux 32bit with the latest updates from the official repo.
The Windows machine runs Windows XP 32bit with the latest updates.
Here is a link to download the generated files. https://www.dropbox.com/s/mnrojz3axofneo8/files.zip?dl=0
— Reply to this email directly or view it on GitHub https://github.com/khr0x40sh/MacroShop/issues/1#issuecomment-123506510.
As long as you escape the backslash, i.e C:\payloadLinux.exe vice C:\payloadLinux.exe, it works fine. It looks like it is a pain in the rear to get python to escape backslashes on a variable, so I'm just going to add error checking to remind the user to escape all backslashes for now, and work on a more elegant solution later.
On Wed, Jul 22, 2015 at 9:28 AM, khrash 41414141 khr0x40sh@gmail.com wrote:
It appears the linux vba does not escape the backslash properly in the destination name. Also, diff reports every line as different, so I am thinking an environmental newline issue may be present. Thanks for your help, I should have a fix for this soon.
On Tue, Jul 21, 2015 at 7:24 PM, Chondrokoukis Dimitrios < notifications@github.com> wrote:
The Payload type I used in Veil was cs/meterpreter/rev_http
These are the parameters COMPILE_TO_EXE = Y LHOST=192.168.2.10 LPORT=4444 USE_ARYA=Y
The output file was payload.exe
Then I used the following command in Linux python exeinvba.py --exe ./payload.exe --out payloadLinux.vbs --dest "C:\payloadLinux.exe"
and the following command in Windows to create the respective files. python exeinvba.py --exe ./payload.exe --out payloadWindows.vbs --dest "C:\payloadWindows.exe"
When I run payloadLinux.vbs there is a 3004 runtime error which says "Write to file failes". The payloadWindows.vbs runs successfully.
The Linux machine runs the latest version of Kali Linux 32bit with the latest updates from the official repo.
The Windows machine runs Windows XP 32bit with the latest updates.
Here is a link to download the generated files. https://www.dropbox.com/s/mnrojz3axofneo8/files.zip?dl=0
— Reply to this email directly or view it on GitHub https://github.com/khr0x40sh/MacroShop/issues/1#issuecomment-123506510.
The bug label will be removed as the README clearly states escaping the backslashes for the destination variable.
I am trying to embed an exe through vb in a document, but when the vb is run there is a 3004 runtime error which says "Write to file failes". I also tried the test.vb that you provide, but I get the same error. I also get the same error when I run the vb as a standalone.