The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => The Orphanage => Topic started by: shankle on December 22, 2009, 03:50:51 AM

Title: sending .exe files to a gmail recipient
Post by: shankle on December 22, 2009, 03:50:51 AM
Can't send .exe attachments to anybody that uses Gmail.
If you rename the file ex:   blah.exe to  blah.rename then attach it to an email
it comes out as blah.rename.exe and gets returned to you.
Zipping it doesn't cut the mustard either.
Nothing is ever easy.
Title: Re: sending .exe files to a gmail recipient
Post by: oex on December 22, 2009, 03:55:53 AM
tried rar or some other non zip it might not screw with?
Title: Re: sending .exe files to a gmail recipient
Post by: farrier on December 22, 2009, 05:16:33 AM
7zip works where zip does not.

www.7-zip.org

hth,

farrier
Title: Re: sending .exe files to a gmail recipient
Post by: Vortex on December 22, 2009, 07:47:39 AM
A bit painful but sometimes I do it : zipped exe file embedded into another zip file.
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 09:46:46 AM
i just send it to their yahoo account   :bg
Title: Re: sending .exe files to a gmail recipient
Post by: oex on December 22, 2009, 09:52:09 AM
lol so lame gmail hacks
Title: Re: sending .exe files to a gmail recipient
Post by: jj2007 on December 22, 2009, 09:53:06 AM
Try replacing 4D5A9000 with 25504446 and send it as PDF. Tell the person at the other end (assuming it's a Masm programmer) to write 4D5A9000 to the file, rename it to *.exe, and you are done :bg
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 09:54:49 AM
hiyas Jochen - sounds like a place for a little application - lol
of course, how will you send them the app
Title: Re: sending .exe files to a gmail recipient
Post by: oex on December 22, 2009, 09:57:04 AM
If it's a noob that doesnt know what an .exe is you could be there all christmas  :lol
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 09:59:22 AM
lol - just send them a picture of the program running on your machine   :bg
Title: Re: sending .exe files to a gmail recipient
Post by: hutch-- on December 22, 2009, 10:59:08 AM
A funny approach, a young guy at a university emails be saying his uni forewall blocked the masm32 download so I wrote a small toy in MASM that xorred it to a small pad, converted the result to encrypted data and saved it as a BIN file. Tweaked the masm exe to open the BIN file and xor it against the same pad which then coverted it back to the executable installation.

Went through their firewall fine.
Title: Re: sending .exe files to a gmail recipient
Post by: shankle on December 22, 2009, 01:33:31 PM
I tried using  7-zip. Came back quicker than a whistle.
Zipping it into another zip won't work as It will not accept Zip period.

Need a way in properties  to change the .exe to jps or something.
Then a way to change it back at the other end.
Or get rid of GMAIL :bg
Title: Re: sending .exe files to a gmail recipient
Post by: FORTRANS on December 22, 2009, 02:49:52 PM
Hi,

   Well, it depends on how big it is, and how experienced
the recipient is.  And how picky Gmail is of course.

   Prepend a valid image header to the file, and send as
a picture.  Then chop off the header on the other end.

   Convert to hexadecimal and send as a text file.  And
unconvert upon receiving.

   Compress/archive using something Gmail does not care
about.  Obsolete PKARC or Squeeze (SQZ.EXE ?) come to
mind.  Have a pointer to download the program from
Simtel or the like.

   Encrypt as hutch mentioned, and send the decrypter as
a DEBUG script.  The script is plain text, and should go
though in the body of the e-mail.  JJ's suggestion would
work in a similar fashion.

Regards,

Steve

Edit: Edit2:

   PKARC.COM/PKXARC.COM and SQ.EXE/USQ.COM.
Title: Re: sending .exe files to a gmail recipient
Post by: jj2007 on December 22, 2009, 03:55:34 PM
Quote from: dedndave on December 22, 2009, 09:54:49 AM
hiyas Jochen - sounds like a place for a little application - lol
of course, how will you send them the app

Yeah, that's the real problem :bg
But you could put the app on the web. Like this one, for example. Warning, the source needs a version of MasmBasic that is not yet posted - but the exe works just fine.

Quoteinclude \masm32\MasmBasic\MasmBasic.inc

.data?
NewFile   db MAX_PATH dup(?)

.code
MagicPDF   dd 46445025h   ; PDF%
MagicEXE   dd 00905a4dh   ; MZ

start:
   mov edi, CL$()                     ; get command line
   mov esi, offset MagicPDF
   mov ebx, Mirror$(".pdf")
   .if Instr_(1, edi, ".pdf", 1)            ; Instr: startpos, source, pattern, mode 1=case-insensitive
      mov esi, offset MagicEXE
      mov ebx, Mirror$(".exe")
   .endif
   invoke lstrcpy, offset NewFile, edi
   MsgBox 0, edi, "Adjust this file and rename?", MB_YESNOCANCEL
   .if eax==IDYES
      push esi
      mov esi, offset NewFile
      mov [esi+Len(esi)-4], ebx
      mov dword ptr [esi+Len(esi)], 0
      invoke CopyFile, edi, esi, 0      ; 0=overwrite dest, don't even ask
      .if eax==0
         MsgBox 0, LastError$(), edi, MB_OK
      .endif
      Open "U", #1, esi         ; open file for update
      pop esi
      Print #1:4, esi            ; write 4 bytes to #1
      Close
   .endif
   
Exit

end start
Title: Re: sending .exe files to a gmail recipient
Post by: shankle on December 22, 2009, 04:15:55 PM
Thanks for the replies guys.
AND THE ANSWER IS :bg

Zip the file and you get blah.zip.
Go to tools/options and in there take the check mark out of "Hide Extensions".
Mine was checked causing me to get blah.zip.exe.
Then "Rename" blah.zip to blah.zip.rename.
I did this and sent the message and so far it has not come back. Fingers crossed.
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 04:19:07 PM
if all else fails, yahoo and hotmail accounts are free
Title: Re: sending .exe files to a gmail recipient
Post by: shankle on December 22, 2009, 05:02:39 PM
It's not me. It's the other guy that has Gmail.
I just have to suffer with it.
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 05:09:08 PM
well - make HIM get a free account at hotmail or yahoo - lol
make HIM do the suffering   :bg
Title: Re: sending .exe files to a gmail recipient
Post by: drizz on December 22, 2009, 05:46:47 PM
What I do is : RAR the files with a password and set "encrypt file names" option
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 22, 2009, 06:09:35 PM
oh - i do use another approach altogether from time to time
i have a free file-share at http://www.4shared.com and put the file up there (there are several others like rapidshare, etc)
then, just e-mail them a link
that takes care of the g-mail issue, and allows for files larger than 10 Mb, as well
it does not, however, address the firewall issue that Hutch was refering to
changing the file type as Jochen suggested should fix that
long ago, i wrote a 16-bit program that xor'ed only the first 1 Kb of a file to make it look like garbage
then, it changed the file extension to something like A01, B02, etc, according to the original file type
the same program ran again would unhash the first 1 Kb and change the extension back
it was written to maintain the file date and time stamps
oh - it also altered the filename like a Drogan's decoder wheel - lol
Title: Re: sending .exe files to a gmail recipient
Post by: Vortex on December 23, 2009, 08:55:38 AM
I wrote a simple XOR encryptor to test my gmail account. The tool performs an XOR operation against all the bytes of any binary file :

encrypt sourcefile.exe destfile.ext encryption_byte

To encrypt :

encrypt.exe test.txt encrypted_test.txt 170

To decrypt :

encrypt.exe encrypted_test.txt test.txt 170

You can specify any other encryption byte. Change the extension of your executable, encypt it and send it via any email account.

It would be good to write a .vbs script to handle at least the encryption tool.
Title: Re: sending .exe files to a gmail recipient
Post by: farrier on December 23, 2009, 10:42:10 AM
Quote from: shankle on December 22, 2009, 01:33:31 PM
I tried usingĀ  7-zip. Came back quicker than a whistle.
Zipping it into another zip won't work as It will not accept Zip period.

Need a way in propertiesĀ  to change the .exe to jps or something.
Then a way to change it back at the other end.
Or get rid of GMAIL :bg

When using 7-zip, make sure to have it create a file with a 7z extension!  Using the default compression method that 7-zip recommends.

It's the fact that Gmail sees the .zip extension and examines the contents of the .zip file that causes the problem.  Gmail does not examine .7z files.  I do it all the time.  It has worked every time.

The only drawback is that the user has to have 7-zip.

farrier
Title: Re: sending .exe files to a gmail recipient
Post by: dedndave on December 23, 2009, 02:49:36 PM
i think g-mail looks at the file signatures
and, it may not recognize the 7Z marker now
but it won't be long before they put that one in the list
Title: Re: sending .exe files to a gmail recipient
Post by: hutch-- on December 23, 2009, 11:40:29 PM
 :bg

Encrypt it and post a link to the decrypter with it, will PHUK email scanners every time.  :bdg