# File Extraction Question

**URL:** <https://community.zeek.org/t/file-extraction-question/2459>\
**Category:** Zeek\
**Created:** [October 11, 2012, 9:10pm UTC](https://community.zeek.org/t/file-extraction-question/2459 "2012-10-11T21:10:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Sconzo](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Mike\_Sconzo](https://community.zeek.org/u/Mike_Sconzo)\
**Post date:** [October 11, 2012, 9:10pm UTC](https://community.zeek.org/t/file-extraction-question/2459/1 "2012-10-11T21:10:34Z")

</div>

I've recently started playing with file extraction via bro, and it  
seems to mostly work. I seem to have an issue extracting executable  
files.

I have the following lines in a .bro file

&nbsp;&nbsp;redef HTTP::extract\_file\_types = /application\/x-dosexec/ &redef;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/x-executable/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/x-msdownload/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/exe/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/x-exe/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/dos-exe/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/x-winexe/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/msdos-windows/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /application\/x-msdos-program/;  
&nbsp;&nbsp;redef HTTP::extract\_file\_types += /.\*\/.\*/;

The catch all at the end is to make sure something is happening (which  
it is). I seem to get every file type but executable. The really odd  
thing is executables will show up in the notice.log as an entry with  
the MD5 of the executable. Is this some kind of weird edge case were  
any files that have an MD5 calculated are not put in the extraction  
directory (they show up as file names, the file is 0 len)?

I'm pretty confused, any ideas/thoughts would be appreciated.  
Thanks  
-=Mike

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:40pm UTC](https://community.zeek.org/t/file-extraction-question/2459/2 "2022-05-06T15:40:36Z")

</div>


