Commit bf7146ba116fdb583d74a1481b054585c00c4333
1 parent
68fb153d
updated readme
Showing
3 changed files
with
196 additions
and
218 deletions
README.md
| ... | ... | @@ -3,16 +3,28 @@ python-oletools |
| 3 | 3 | |
| 4 | 4 | [python-oletools](http://www.decalage.info/python/oletools) is a package of python tools to analyze [Microsoft OLE2 files (also called Structured Storage, Compound File Binary Format or Compound Document File Format)](http://en.wikipedia.org/wiki/Compound_File_Binary_Format), such as Microsoft Office documents or Outlook messages, mainly for malware analysis and debugging. It is based on the [OleFileIO_PL](http://www.decalage.info/python/olefileio) parser. See [http://www.decalage.info/python/oletools](http://www.decalage.info/python/oletools) for more info. |
| 5 | 5 | |
| 6 | -**Quick links:** [Home page](http://www.decalage.info/python/oletools) - [Download](https://bitbucket.org/decalage/oletools/downloads) - [Documentation](https://bitbucket.org/decalage/oletools/wiki) - [Report issues](https://bitbucket.org/decalage/oletools/issues?status=new&status=open) - [Contact the author](http://decalage.info/contact) - [Repository](https://bitbucket.org/decalage/oletools) - [Updates on Twitter](https://twitter.com/decalage2) | |
| 6 | +**Quick links:** [Home page](http://www.decalage.info/python/oletools) - [Download](https://bitbucket.org/decalage/oletools/downloads) - [Documentation](https://bitbucket.org/decalage/oletools/wiki) - [Report Issues/Suggestions/Questions](https://bitbucket.org/decalage/oletools/issues?status=new&status=open) - [Contact the Author](http://decalage.info/contact) - [Repository](https://bitbucket.org/decalage/oletools) - [Updates on Twitter](https://twitter.com/decalage2) | |
| 7 | 7 | |
| 8 | 8 | Note: python-oletools is not related to OLETools published by BeCubed Software. |
| 9 | 9 | |
| 10 | +News | |
| 11 | +---- | |
| 12 | + | |
| 13 | +- **2014-08-27 v0.06**: added [olevba](https://bitbucket.org/decalage/oletools/wiki/olevba), a new tool to extract VBA Macro source code from MS Office documents (97-2003 and 2007+). Improved [documentation](https://bitbucket.org/decalage/oletools/wiki) | |
| 14 | +- 2013-07-24 v0.05: added new tools [olemeta](https://bitbucket.org/decalage/oletools/wiki/olemeta) and [oletimes](https://bitbucket.org/decalage/oletools/wiki/oletimes) | |
| 15 | +- 2013-04-18 v0.04: fixed bug in rtfobj, added documentation for [rtfobj](https://bitbucket.org/decalage/oletools/wiki/rtfobj) | |
| 16 | +- 2012-11-09 v0.03: Improved [pyxswf](https://bitbucket.org/decalage/oletools/wiki/pyxswf) to extract Flash objects from RTF | |
| 17 | +- 2012-10-29 v0.02: Added [oleid](https://bitbucket.org/decalage/oletools/wiki/oleid) | |
| 18 | +- 2012-10-09 v0.01: Initial version of [olebrowse](https://bitbucket.org/decalage/oletools/wiki/olebrowse) and pyxswf | |
| 19 | +- see changelog in source code for more info. | |
| 20 | + | |
| 21 | + | |
| 10 | 22 | Tools in python-oletools: |
| 11 | 23 | ------------------------- |
| 12 | 24 | |
| 13 | 25 | - **[olebrowse](https://bitbucket.org/decalage/oletools/wiki/olebrowse)**: A simple GUI to browse OLE files (e.g. MS Word, Excel, Powerpoint documents), to |
| 14 | 26 | view and extract individual data streams. |
| 15 | -- **[oleid](https://bitbucket.org/decalage/oletools/wiki/oleid)**: a tool to analyze OLE files to detect specific characteristics that could potentially indicate that the file is suspicious or malicious. | |
| 27 | +- **[oleid](https://bitbucket.org/decalage/oletools/wiki/oleid)**: a tool to analyze OLE files to detect specific characteristics usually found in malicious files. | |
| 16 | 28 | - **[olemeta](https://bitbucket.org/decalage/oletools/wiki/olemeta)**: a tool to extract all standard properties (metadata) from OLE files. |
| 17 | 29 | - **[oletimes](https://bitbucket.org/decalage/oletools/wiki/oletimes)**: a tool to extract creation and modification timestamps of all streams and storages. |
| 18 | 30 | - **[olevba](https://bitbucket.org/decalage/oletools/wiki/olevba) (new)**: a tool to extract VBA Macro source code from MS Office documents (OLE and OpenXML). |
| ... | ... | @@ -22,17 +34,6 @@ Tools in python-oletools: |
| 22 | 34 | - **[rtfobj](https://bitbucket.org/decalage/oletools/wiki/rtfobj)**: a tool and python module to extract embedded objects from RTF files. |
| 23 | 35 | - and a few others (coming soon) |
| 24 | 36 | |
| 25 | -News | |
| 26 | ----- | |
| 27 | - | |
| 28 | -- **2014-08-16 v0.06**: added [olevba](https://bitbucket.org/decalage/oletools/wiki/olevba), a new tool to extract VBA Macro source code from MS Office documents (97-2003 and 2007+). Improved [documentation](https://bitbucket.org/decalage/oletools/wiki) | |
| 29 | -- 2013-07-24 v0.05: added new tools [olemeta](https://bitbucket.org/decalage/oletools/wiki/olemeta) and [oletimes](https://bitbucket.org/decalage/oletools/wiki/oletimes) | |
| 30 | -- 2013-04-18 v0.04: fixed bug in rtfobj, added documentation for [rtfobj](https://bitbucket.org/decalage/oletools/wiki/rtfobj) | |
| 31 | -- 2012-11-09 v0.03: Improved [pyxswf](https://bitbucket.org/decalage/oletools/wiki/pyxswf) to extract Flash objects from RTF | |
| 32 | -- 2012-10-29 v0.02: Added [oleid](https://bitbucket.org/decalage/oletools/wiki/oleid) | |
| 33 | -- 2012-10-09 v0.01: Initial version of [olebrowse](https://bitbucket.org/decalage/oletools/wiki/olebrowse) and pyxswf | |
| 34 | -- see changelog in source code for more info. | |
| 35 | - | |
| 36 | 37 | Download and Install: |
| 37 | 38 | --------------------- |
| 38 | 39 | |
| ... | ... | @@ -40,17 +41,22 @@ To use python-oletools from the command line as analysis tools, you may simply [ |
| 40 | 41 | |
| 41 | 42 | If you plan to use python-oletools with other Python applications or your own scripts, then the simplest solution is to use "**pip install oletools**" or "**easy_install oletools**" to download and install in one go. Otherwise you may download/extract the zip archive and run "**setup.py install**". |
| 42 | 43 | |
| 43 | -How to contribute: | |
| 44 | ------------------- | |
| 44 | +Documentation: | |
| 45 | +-------------- | |
| 46 | + | |
| 47 | +The latest version of the documentation can be found [online](https://bitbucket.org/decalage/oletools/wiki), otherwise a copy is provided in the doc subfolder of the package. | |
| 48 | + | |
| 49 | + | |
| 50 | +How to Suggest Improvements, Report Issues or Contribute: | |
| 51 | +--------------------------------------------------------- | |
| 45 | 52 | |
| 46 | -The code is available in [a Mercurial repository on bitbucket](https://bitbucket.org/decalage/oletools). You may use it to submit enhancements (using fork and pull requests) or to report any issue. | |
| 53 | +This is a personal open-source project, developed on my spare time. Any contribution, suggestion, feedback or bug report is welcome. | |
| 47 | 54 | |
| 48 | -If you would like to help us improve this module, or simply provide feedback, you may also [contact the author](http://decalage.info/contact). | |
| 55 | +To suggest improvements, report a bug or any issue, please use the [issue reporting page](https://bitbucket.org/decalage/olefileio_pl/issues?status=new&status=open), providing all the information and files to reproduce the problem. | |
| 49 | 56 | |
| 50 | -How to suggest improvements or report bugs: | |
| 51 | -------------------------------------------- | |
| 57 | +You may also [contact the author](http://decalage.info/contact) directly to provide feedback. | |
| 52 | 58 | |
| 53 | -To suggest improvements, report a bug or any issue, please use the [issue reporting page](https://bitbucket.org/decalage/olefileio_pl/issues?status=new&status=open), providing all the information and files to reproduce the problem. You may also [contact the author](http://decalage.info/contact). | |
| 59 | +The code is available in [a Mercurial repository on Bitbucket](https://bitbucket.org/decalage/oletools). You may use it to submit enhancements using forks and pull requests. | |
| 54 | 60 | |
| 55 | 61 | License |
| 56 | 62 | ------- | ... | ... |
oletools/README.html
0 → 100644
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
| 3 | +<head> | |
| 4 | + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| 5 | + <meta http-equiv="Content-Style-Type" content="text/css" /> | |
| 6 | + <meta name="generator" content="pandoc" /> | |
| 7 | + <title></title> | |
| 8 | +</head> | |
| 9 | +<body> | |
| 10 | +<h1 id="python-oletools">python-oletools</h1> | |
| 11 | +<p><a href="http://www.decalage.info/python/oletools">python-oletools</a> is a package of python tools to analyze <a href="http://en.wikipedia.org/wiki/Compound_File_Binary_Format">Microsoft OLE2 files (also called Structured Storage, Compound File Binary Format or Compound Document File Format)</a>, such as Microsoft Office documents or Outlook messages, mainly for malware analysis and debugging. It is based on the <a href="http://www.decalage.info/python/olefileio">OleFileIO_PL</a> parser. See <a href="http://www.decalage.info/python/oletools">http://www.decalage.info/python/oletools</a> for more info.</p> | |
| 12 | +<p><strong>Quick links:</strong> <a href="http://www.decalage.info/python/oletools">Home page</a> - <a href="https://bitbucket.org/decalage/oletools/downloads">Download</a> - <a href="https://bitbucket.org/decalage/oletools/wiki">Documentation</a> - <a href="https://bitbucket.org/decalage/oletools/issues?status=new&status=open">Report Issues/Suggestions/Questions</a> - <a href="http://decalage.info/contact">Contact the Author</a> - <a href="https://bitbucket.org/decalage/oletools">Repository</a> - <a href="https://twitter.com/decalage2">Updates on Twitter</a></p> | |
| 13 | +<p>Note: python-oletools is not related to OLETools published by BeCubed Software.</p> | |
| 14 | +<h2 id="news">News</h2> | |
| 15 | +<ul> | |
| 16 | +<li><strong>2014-08-27 v0.06</strong>: added <a href="https://bitbucket.org/decalage/oletools/wiki/olevba">olevba</a>, a new tool to extract VBA Macro source code from MS Office documents (97-2003 and 2007+). Improved <a href="https://bitbucket.org/decalage/oletools/wiki">documentation</a></li> | |
| 17 | +<li>2013-07-24 v0.05: added new tools <a href="https://bitbucket.org/decalage/oletools/wiki/olemeta">olemeta</a> and <a href="https://bitbucket.org/decalage/oletools/wiki/oletimes">oletimes</a></li> | |
| 18 | +<li>2013-04-18 v0.04: fixed bug in rtfobj, added documentation for <a href="https://bitbucket.org/decalage/oletools/wiki/rtfobj">rtfobj</a></li> | |
| 19 | +<li>2012-11-09 v0.03: Improved <a href="https://bitbucket.org/decalage/oletools/wiki/pyxswf">pyxswf</a> to extract Flash objects from RTF</li> | |
| 20 | +<li>2012-10-29 v0.02: Added <a href="https://bitbucket.org/decalage/oletools/wiki/oleid">oleid</a></li> | |
| 21 | +<li>2012-10-09 v0.01: Initial version of <a href="https://bitbucket.org/decalage/oletools/wiki/olebrowse">olebrowse</a> and pyxswf</li> | |
| 22 | +<li>see changelog in source code for more info.</li> | |
| 23 | +</ul> | |
| 24 | +<h2 id="tools-in-python-oletools">Tools in python-oletools:</h2> | |
| 25 | +<ul> | |
| 26 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/olebrowse">olebrowse</a></strong>: A simple GUI to browse OLE files (e.g. MS Word, Excel, Powerpoint documents), to view and extract individual data streams.</li> | |
| 27 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/oleid">oleid</a></strong>: a tool to analyze OLE files to detect specific characteristics usually found in malicious files.</li> | |
| 28 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/olemeta">olemeta</a></strong>: a tool to extract all standard properties (metadata) from OLE files.</li> | |
| 29 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/oletimes">oletimes</a></strong>: a tool to extract creation and modification timestamps of all streams and storages.</li> | |
| 30 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/olevba">olevba</a> (new)</strong>: a tool to extract VBA Macro source code from MS Office documents (OLE and OpenXML).</li> | |
| 31 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/pyxswf">pyxswf</a></strong>: a tool to detect, extract and analyze Flash objects (SWF) that may be embedded in files such as MS Office documents (e.g. Word, Excel) and RTF, which is especially useful for malware analysis.</li> | |
| 32 | +<li><strong><a href="https://bitbucket.org/decalage/oletools/wiki/rtfobj">rtfobj</a></strong>: a tool and python module to extract embedded objects from RTF files.</li> | |
| 33 | +<li>and a few others (coming soon)</li> | |
| 34 | +</ul> | |
| 35 | +<h2 id="download-and-install">Download and Install:</h2> | |
| 36 | +<p>To use python-oletools from the command line as analysis tools, you may simply <a href="https://bitbucket.org/decalage/oletools/downloads">download the zip archive</a> and extract the files in the directory of your choice.</p> | |
| 37 | +<p>If you plan to use python-oletools with other Python applications or your own scripts, then the simplest solution is to use "<strong>pip install oletools</strong>" or "<strong>easy_install oletools</strong>" to download and install in one go. Otherwise you may download/extract the zip archive and run "<strong>setup.py install</strong>".</p> | |
| 38 | +<h2 id="documentation">Documentation:</h2> | |
| 39 | +<p>The latest version of the documentation can be found <a href="https://bitbucket.org/decalage/oletools/wiki">online</a>, otherwise a copy is provided in the doc subfolder of the package.</p> | |
| 40 | +<h2 id="how-to-suggest-improvements-report-issues-or-contribute">How to Suggest Improvements, Report Issues or Contribute:</h2> | |
| 41 | +<p>This is a personal open-source project, developed on my spare time. Any contribution, suggestion, feedback or bug report is welcome.</p> | |
| 42 | +<p>To suggest improvements, report a bug or any issue, please use the <a href="https://bitbucket.org/decalage/olefileio_pl/issues?status=new&status=open">issue reporting page</a>, providing all the information and files to reproduce the problem.</p> | |
| 43 | +<p>You may also <a href="http://decalage.info/contact">contact the author</a> directly to provide feedback.</p> | |
| 44 | +<p>The code is available in <a href="https://bitbucket.org/decalage/oletools">a Mercurial repository on Bitbucket</a>. You may use it to submit enhancements using forks and pull requests.</p> | |
| 45 | +<h2 id="license">License</h2> | |
| 46 | +<p>This license applies to the python-oletools package, apart from the thirdparty folder which contains third-party files published with their own license.</p> | |
| 47 | +<p>The python-oletools package is copyright (c) 2012-2014 Philippe Lagadec (http://www.decalage.info)</p> | |
| 48 | +<p>All rights reserved.</p> | |
| 49 | +<p>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:</p> | |
| 50 | +<ul> | |
| 51 | +<li>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.</li> | |
| 52 | +<li>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.</li> | |
| 53 | +</ul> | |
| 54 | +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p> | |
| 55 | +<hr /> | |
| 56 | +<p>olevba contains modified source code from the officeparser project, published under the following MIT License (MIT):</p> | |
| 57 | +<p>officeparser is copyright (c) 2014 John William Davison</p> | |
| 58 | +<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p> | |
| 59 | +<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p> | |
| 60 | +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p> | |
| 61 | +</body> | |
| 62 | +</html> | ... | ... |
oletools/README.rst
| ... | ... | @@ -12,222 +12,104 @@ malware analysis and debugging. It is based on the |
| 12 | 12 | `http://www.decalage.info/python/oletools <http://www.decalage.info/python/oletools>`_ |
| 13 | 13 | for more info. |
| 14 | 14 | |
| 15 | +**Quick links:** `Home page <http://www.decalage.info/python/oletools>`_ | |
| 16 | +- `Download <https://bitbucket.org/decalage/oletools/downloads>`_ - | |
| 17 | +`Documentation <https://bitbucket.org/decalage/oletools/wiki>`_ - | |
| 18 | +`Report | |
| 19 | +Issues/Suggestions/Questions <https://bitbucket.org/decalage/oletools/issues?status=new&status=open>`_ | |
| 20 | +- `Contact the Author <http://decalage.info/contact>`_ - | |
| 21 | +`Repository <https://bitbucket.org/decalage/oletools>`_ - `Updates on | |
| 22 | +Twitter <https://twitter.com/decalage2>`_ | |
| 23 | + | |
| 15 | 24 | Note: python-oletools is not related to OLETools published by BeCubed |
| 16 | 25 | Software. |
| 17 | 26 | |
| 18 | -Tools in python-oletools: | |
| 19 | -------------------------- | |
| 20 | - | |
| 21 | -- **olebrowse**: A simple GUI to browse OLE files (e.g. MS Word, Excel, | |
| 22 | - Powerpoint documents), to view and extract individual data streams. | |
| 23 | -- **oleid**: a tool to analyze OLE files to detect specific | |
| 24 | - characteristics that could potentially indicate that the file is | |
| 25 | - suspicious or malicious. | |
| 26 | -- **olemeta**: a tool to extract all standard properties (metadata) | |
| 27 | - from OLE files. | |
| 28 | -- **oletimes**: a tool to extract creation and modification timestamps | |
| 29 | - of all streams and storages. | |
| 30 | -- **pyxswf**: a tool to detect, extract and analyze Flash objects (SWF) | |
| 31 | - that may be embedded in files such as MS Office documents (e.g. Word, | |
| 32 | - Excel) and RTF, which is especially useful for malware analysis. | |
| 33 | -- **rtfobj**: a tool and python module to extract embedded objects from | |
| 34 | - RTF files. | |
| 35 | -- and a few others (coming soon) | |
| 36 | - | |
| 37 | 27 | News |
| 38 | 28 | ---- |
| 39 | 29 | |
| 40 | -- 2013-07-24 v0.05: added new tools olemeta and oletimes | |
| 41 | -- 2013-04-18 v0.04: fixed bug in rtfobj, added documentation for rtfobj | |
| 42 | -- 2012-11-09 v0.03: Improved pyxswf to extract Flash objects from RTF | |
| 43 | -- 2012-10-29 v0.02: Added oleid | |
| 44 | -- 2012-10-09 v0.01: Initial version of olebrowse and pyxswf | |
| 30 | +- **2014-08-27 v0.06**: added | |
| 31 | + `olevba <https://bitbucket.org/decalage/oletools/wiki/olevba>`_, a | |
| 32 | + new tool to extract VBA Macro source code from MS Office documents | |
| 33 | + (97-2003 and 2007+). Improved | |
| 34 | + `documentation <https://bitbucket.org/decalage/oletools/wiki>`_ | |
| 35 | +- 2013-07-24 v0.05: added new tools | |
| 36 | + `olemeta <https://bitbucket.org/decalage/oletools/wiki/olemeta>`_ and | |
| 37 | + `oletimes <https://bitbucket.org/decalage/oletools/wiki/oletimes>`_ | |
| 38 | +- 2013-04-18 v0.04: fixed bug in rtfobj, added documentation for | |
| 39 | + `rtfobj <https://bitbucket.org/decalage/oletools/wiki/rtfobj>`_ | |
| 40 | +- 2012-11-09 v0.03: Improved | |
| 41 | + `pyxswf <https://bitbucket.org/decalage/oletools/wiki/pyxswf>`_ to | |
| 42 | + extract Flash objects from RTF | |
| 43 | +- 2012-10-29 v0.02: Added | |
| 44 | + `oleid <https://bitbucket.org/decalage/oletools/wiki/oleid>`_ | |
| 45 | +- 2012-10-09 v0.01: Initial version of | |
| 46 | + `olebrowse <https://bitbucket.org/decalage/oletools/wiki/olebrowse>`_ | |
| 47 | + and pyxswf | |
| 45 | 48 | - see changelog in source code for more info. |
| 46 | 49 | |
| 47 | -Download: | |
| 48 | ---------- | |
| 49 | - | |
| 50 | -The archive is available on `the project | |
| 51 | -page <https://bitbucket.org/decalage/oletools/downloads>`_. | |
| 52 | - | |
| 53 | -olebrowse: | |
| 54 | ----------- | |
| 55 | - | |
| 56 | -A simple GUI to browse OLE files (e.g. MS Word, Excel, Powerpoint | |
| 57 | -documents), to view and extract individual data streams. | |
| 58 | - | |
| 59 | -:: | |
| 60 | - | |
| 61 | - Usage: olebrowse.py [file] | |
| 62 | - | |
| 63 | -If you provide a file it will be opened, else a dialog will allow you to | |
| 64 | -browse folders to open a file. Then if it is a valid OLE file, the list | |
| 65 | -of data streams will be displayed. You can select a stream, and then | |
| 66 | -either view its content in a builtin hexadecimal viewer, or save it to a | |
| 67 | -file for further analysis. | |
| 68 | - | |
| 69 | -For screenshots and other info, see | |
| 70 | -`http://www.decalage.info/python/olebrowse <http://www.decalage.info/python/olebrowse>`_ | |
| 71 | - | |
| 72 | -oleid: | |
| 73 | ------- | |
| 74 | - | |
| 75 | -oleid is a script to analyze OLE files such as MS Office documents (e.g. | |
| 76 | -Word, Excel), to detect specific characteristics that could potentially | |
| 77 | -indicate that the file is suspicious or malicious, in terms of security | |
| 78 | -(e.g. malware). For example it can detect VBA macros, embedded Flash | |
| 79 | -objects, fragmentation. | |
| 80 | - | |
| 81 | -:: | |
| 82 | - | |
| 83 | - Usage: oleid.py <file> | |
| 84 | - | |
| 85 | -Example - analyzing a Word document containing a Flash object and VBA | |
| 86 | -macros: | |
| 87 | - | |
| 88 | -:: | |
| 89 | - | |
| 90 | - C:\oletools>oleid.py word_flash_vba.doc | |
| 91 | - Filename: word_flash_vba.doc | |
| 92 | - OLE format: True | |
| 93 | - Has SummaryInformation stream: True | |
| 94 | - Application name: Microsoft Office Word | |
| 95 | - Encrypted: False | |
| 96 | - Word Document: True | |
| 97 | - VBA Macros: True | |
| 98 | - Excel Workbook: False | |
| 99 | - PowerPoint Presentation: False | |
| 100 | - Visio Drawing: False | |
| 101 | - ObjectPool: True | |
| 102 | - Flash objects: 1 | |
| 103 | - | |
| 104 | -oleid project website: | |
| 105 | -`http://www.decalage.info/python/oleid <http://www.decalage.info/python/oleid>`_ | |
| 106 | - | |
| 107 | -pyxswf: | |
| 108 | -------- | |
| 109 | - | |
| 110 | -pyxswf is a script to detect, extract and analyze Flash objects (SWF | |
| 111 | -files) that may be embedded in files such as MS Office documents (e.g. | |
| 112 | -Word, Excel), which is especially useful for malware analysis. | |
| 113 | - | |
| 114 | -pyxswf is an extension to | |
| 115 | -`xxxswf.py <http://hooked-on-mnemonics.blogspot.nl/2011/12/xxxswfpy.html>`_ | |
| 116 | -published by Alexander Hanel. | |
| 117 | - | |
| 118 | -Compared to xxxswf, it can extract streams from MS Office documents by | |
| 119 | -parsing their OLE structure properly, which is necessary when streams | |
| 120 | -are fragmented. Stream fragmentation is a known obfuscation technique, | |
| 121 | -as explained on | |
| 122 | -`http://www.breakingpointsystems.com/resources/blog/evasion-with-ole2-fragmentation/ <http://www.breakingpointsystems.com/resources/blog/evasion-with-ole2-fragmentation/>`_ | |
| 123 | - | |
| 124 | -It can also extract Flash objects from RTF documents, by parsing | |
| 125 | -embedded objects encoded in hexadecimal format (-f option). | |
| 126 | - | |
| 127 | -For this, simply add the -o option to work on OLE streams rather than | |
| 128 | -raw files, or the -f option to work on RTF files. | |
| 129 | - | |
| 130 | -:: | |
| 131 | - | |
| 132 | - Usage: pyxswf.py [options] <file.bad> | |
| 133 | - | |
| 134 | - Options: | |
| 135 | - -o, --ole Parse an OLE file (e.g. Word, Excel) to look for SWF | |
| 136 | - in each stream | |
| 137 | - -f, --rtf Parse an RTF file to look for SWF in each embedded | |
| 138 | - object | |
| 139 | - -x, --extract Extracts the embedded SWF(s), names it MD5HASH.swf & | |
| 140 | - saves it in the working dir. No addition args needed | |
| 141 | - -h, --help show this help message and exit | |
| 142 | - -y, --yara Scans the SWF(s) with yara. If the SWF(s) is | |
| 143 | - compressed it will be deflated. No addition args | |
| 144 | - needed | |
| 145 | - -s, --md5scan Scans the SWF(s) for MD5 signatures. Please see func | |
| 146 | - checkMD5 to define hashes. No addition args needed | |
| 147 | - -H, --header Displays the SWFs file header. No addition args needed | |
| 148 | - -d, --decompress Deflates compressed SWFS(s) | |
| 149 | - -r PATH, --recdir=PATH | |
| 150 | - Will recursively scan a directory for files that | |
| 151 | - contain SWFs. Must provide path in quotes | |
| 152 | - -c, --compress Compresses the SWF using Zlib | |
| 153 | - | |
| 154 | -Example 1 - detecting and extracting a SWF file from a Word document on | |
| 155 | -Windows: | |
| 156 | - | |
| 157 | -:: | |
| 158 | - | |
| 159 | - C:\oletools>pyxswf.py -o word_flash.doc | |
| 160 | - OLE stream: 'Contents' | |
| 161 | - [SUMMARY] 1 SWF(s) in MD5:993664cc86f60d52d671b6610813cfd1:Contents | |
| 162 | - [ADDR] SWF 1 at 0x8 - FWS Header | |
| 163 | - | |
| 164 | - C:\oletools>pyxswf.py -xo word_flash.doc | |
| 165 | - OLE stream: 'Contents' | |
| 166 | - [SUMMARY] 1 SWF(s) in MD5:993664cc86f60d52d671b6610813cfd1:Contents | |
| 167 | - [ADDR] SWF 1 at 0x8 - FWS Header | |
| 168 | - [FILE] Carved SWF MD5: 2498e9c0701dc0e461ab4358f9102bc5.swf | |
| 169 | - | |
| 170 | -Example 2 - detecting and extracting a SWF file from a RTF document on | |
| 171 | -Windows: | |
| 172 | - | |
| 173 | -:: | |
| 174 | - | |
| 175 | - C:\oletools>pyxswf.py -xf "rtf_flash.rtf" | |
| 176 | - RTF embedded object size 1498557 at index 000036DD | |
| 177 | - [SUMMARY] 1 SWF(s) in MD5:46a110548007e04f4043785ac4184558:RTF_embedded_object_0 | |
| 178 | - 00036DD | |
| 179 | - [ADDR] SWF 1 at 0xc40 - FWS Header | |
| 180 | - [FILE] Carved SWF MD5: 2498e9c0701dc0e461ab4358f9102bc5.swf | |
| 181 | - | |
| 182 | -For more info, see | |
| 183 | -`http://www.decalage.info/python/pyxswf <http://www.decalage.info/python/pyxswf>`_ | |
| 50 | +Tools in python-oletools: | |
| 51 | +------------------------- | |
| 184 | 52 | |
| 185 | -rtfobj | |
| 186 | ------- | |
| 53 | +- **`olebrowse <https://bitbucket.org/decalage/oletools/wiki/olebrowse>`_**: | |
| 54 | + A simple GUI to browse OLE files (e.g. MS Word, Excel, Powerpoint | |
| 55 | + documents), to view and extract individual data streams. | |
| 56 | +- **`oleid <https://bitbucket.org/decalage/oletools/wiki/oleid>`_**: a | |
| 57 | + tool to analyze OLE files to detect specific characteristics usually | |
| 58 | + found in malicious files. | |
| 59 | +- **`olemeta <https://bitbucket.org/decalage/oletools/wiki/olemeta>`_**: | |
| 60 | + a tool to extract all standard properties (metadata) from OLE files. | |
| 61 | +- **`oletimes <https://bitbucket.org/decalage/oletools/wiki/oletimes>`_**: | |
| 62 | + a tool to extract creation and modification timestamps of all streams | |
| 63 | + and storages. | |
| 64 | +- **`olevba <https://bitbucket.org/decalage/oletools/wiki/olevba>`_ | |
| 65 | + (new)**: a tool to extract VBA Macro source code from MS Office | |
| 66 | + documents (OLE and OpenXML). | |
| 67 | +- **`pyxswf <https://bitbucket.org/decalage/oletools/wiki/pyxswf>`_**: | |
| 68 | + a tool to detect, extract and analyze Flash objects (SWF) that may be | |
| 69 | + embedded in files such as MS Office documents (e.g. Word, Excel) and | |
| 70 | + RTF, which is especially useful for malware analysis. | |
| 71 | +- **`rtfobj <https://bitbucket.org/decalage/oletools/wiki/rtfobj>`_**: | |
| 72 | + a tool and python module to extract embedded objects from RTF files. | |
| 73 | +- and a few others (coming soon) | |
| 187 | 74 | |
| 188 | -rtfobj is a Python module to extract embedded objects from RTF files, | |
| 189 | -such as OLE ojects. It can be used as a Python library or a command-line | |
| 190 | -tool. | |
| 75 | +Download and Install: | |
| 76 | +--------------------- | |
| 191 | 77 | |
| 192 | -:: | |
| 78 | +To use python-oletools from the command line as analysis tools, you may | |
| 79 | +simply `download the zip | |
| 80 | +archive <https://bitbucket.org/decalage/oletools/downloads>`_ and | |
| 81 | +extract the files in the directory of your choice. | |
| 193 | 82 | |
| 194 | - Usage: rtfobj.py <file.rtf> | |
| 83 | +If you plan to use python-oletools with other Python applications or | |
| 84 | +your own scripts, then the simplest solution is to use "**pip install | |
| 85 | +oletools**\ " or "**easy\_install oletools**\ " to download and install | |
| 86 | +in one go. Otherwise you may download/extract the zip archive and run | |
| 87 | +"**setup.py install**\ ". | |
| 195 | 88 | |
| 196 | -It extracts and decodes all the data blocks encoded as hexadecimal in | |
| 197 | -the RTF document, and saves them as files named "object\_xxxx.bin", xxxx | |
| 198 | -being the location of the object in the RTF file. | |
| 89 | +Documentation: | |
| 90 | +-------------- | |
| 199 | 91 | |
| 200 | -Usage as python module: rtf\_iter\_objects(filename) is an iterator | |
| 201 | -which yields a tuple (index, object) providing the index of each | |
| 202 | -hexadecimal stream in the RTF file, and the corresponding decoded | |
| 203 | -object. Example: | |
| 92 | +The latest version of the documentation can be found | |
| 93 | +`online <https://bitbucket.org/decalage/oletools/wiki>`_, otherwise a | |
| 94 | +copy is provided in the doc subfolder of the package. | |
| 204 | 95 | |
| 205 | -:: | |
| 96 | +How to Suggest Improvements, Report Issues or Contribute: | |
| 97 | +--------------------------------------------------------- | |
| 206 | 98 | |
| 207 | - import rtfobj | |
| 208 | - for index, data in rtfobj.rtf_iter_objects("myfile.rtf"): | |
| 209 | - print 'found object size %d at index %08X' % (len(data), index) | |
| 99 | +This is a personal open-source project, developed on my spare time. Any | |
| 100 | +contribution, suggestion, feedback or bug report is welcome. | |
| 210 | 101 | |
| 211 | -For more info, see | |
| 212 | -`http://www.decalage.info/python/rtfobj <http://www.decalage.info/python/rtfobj>`_ | |
| 102 | +To suggest improvements, report a bug or any issue, please use the | |
| 103 | +`issue reporting | |
| 104 | +page <https://bitbucket.org/decalage/olefileio_pl/issues?status=new&status=open>`_, | |
| 105 | +providing all the information and files to reproduce the problem. | |
| 213 | 106 | |
| 214 | -How to contribute: | |
| 215 | ------------------- | |
| 107 | +You may also `contact the author <http://decalage.info/contact>`_ | |
| 108 | +directly to provide feedback. | |
| 216 | 109 | |
| 217 | 110 | The code is available in `a Mercurial repository on |
| 218 | -bitbucket <https://bitbucket.org/decalage/oletools>`_. You may use it to | |
| 219 | -submit enhancements or to report any issue. | |
| 220 | - | |
| 221 | -If you would like to help us improve this module, or simply provide | |
| 222 | -feedback, you may also send an e-mail to decalage(at)laposte.net. | |
| 223 | - | |
| 224 | -How to report bugs: | |
| 225 | -------------------- | |
| 226 | - | |
| 227 | -To report a bug or any issue, please use the `issue reporting | |
| 228 | -page <https://bitbucket.org/decalage/olefileio_pl/issues?status=new&status=open>`_, | |
| 229 | -or send an e-mail with all the information and files to reproduce the | |
| 230 | -problem. | |
| 111 | +Bitbucket <https://bitbucket.org/decalage/oletools>`_. You may use it to | |
| 112 | +submit enhancements using forks and pull requests. | |
| 231 | 113 | |
| 232 | 114 | License |
| 233 | 115 | ------- |
| ... | ... | @@ -236,8 +118,10 @@ This license applies to the python-oletools package, apart from the |
| 236 | 118 | thirdparty folder which contains third-party files published with their |
| 237 | 119 | own license. |
| 238 | 120 | |
| 239 | -The python-oletools package is copyright (c) 2012-2013, Philippe Lagadec | |
| 240 | -(http://www.decalage.info) All rights reserved. | |
| 121 | +The python-oletools package is copyright (c) 2012-2014 Philippe Lagadec | |
| 122 | +(http://www.decalage.info) | |
| 123 | + | |
| 124 | +All rights reserved. | |
| 241 | 125 | |
| 242 | 126 | Redistribution and use in source and binary forms, with or without |
| 243 | 127 | modification, are permitted provided that the following conditions are |
| ... | ... | @@ -260,3 +144,29 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 260 | 144 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 261 | 145 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 262 | 146 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 147 | + | |
| 148 | +-------------- | |
| 149 | + | |
| 150 | +olevba contains modified source code from the officeparser project, | |
| 151 | +published under the following MIT License (MIT): | |
| 152 | + | |
| 153 | +officeparser is copyright (c) 2014 John William Davison | |
| 154 | + | |
| 155 | +Permission is hereby granted, free of charge, to any person obtaining a | |
| 156 | +copy of this software and associated documentation files (the | |
| 157 | +"Software"), to deal in the Software without restriction, including | |
| 158 | +without limitation the rights to use, copy, modify, merge, publish, | |
| 159 | +distribute, sublicense, and/or sell copies of the Software, and to | |
| 160 | +permit persons to whom the Software is furnished to do so, subject to | |
| 161 | +the following conditions: | |
| 162 | + | |
| 163 | +The above copyright notice and this permission notice shall be included | |
| 164 | +in all copies or substantial portions of the Software. | |
| 165 | + | |
| 166 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
| 167 | +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
| 168 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
| 169 | +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |
| 170 | +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |
| 171 | +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |
| 172 | +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ... | ... |