Client side attacks

Information Gathering

When you will enconter any file from the victim (e.g. posted on site) you can use exiftool in order to extract some data.

exiftool <FILE>

Client fingerprinting

Canary tokens is a free web service that generates a link with an embedded token that we'll send to the target.

We could also use an online IP logger like Grabify or JavaScript fingerprinting libraries such as fingerprint.js.

Web bug / url token

User Agent can be modified so it is not always the best source of information.

We can phish our victim into clicking the link - that will get us their IP, OS type and Web Browser Information.

Exploiting Microsoft Office

Save document with .doc extension

Microsoft Office applications like Word and Excel allow users to embed macros,1 which are a series of commands and instructions grouped together to programmatically accomplish a task. We can leverege macros to gain remote code execution on the machine.

Macros can be written from scratch in Visual Basic for Applications (VBA)

In order to create macro in Microsoft Word go to:

Open powershell when user enter the file:

In order to create reverse shell do the following steps:

Prepare payload which will download and run powercat:

Do not forget to set up fileserver with powercat and netcat listener.

Encode the payload with base64 (UTF-16LE):

Split the code into parts using python:

Final code:

Windows Library Files Code Execution

Kali WebDav Hosting:

If you do not have wsgidav installed you can install it with the following command: pip3 install wsgidav

Malicious file code:

Save the file with .Library-ms extenstion.

Create shortcut (.lnk) with reverse shell comand and upload it to the webdav.

Send phishing email

If you get auth error using the above command try this one:

Last updated