> For the complete documentation index, see [llms.txt](https://blog.0x4.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.0x4.xyz/bypassing-windows-protection-mechanisms/impacket-psexec-and-mypsexec-vs-kaspersky.md).

# Impacket/PsExec & MyPsExec VS Kaspersky

In some engagement, I faced a machine **Kaspersky** was installed on it, so I tried to access the machine via [**Impact/PsExec**](https://raw.githubusercontent.com/SecureAuthCorp/impacket/master/examples/psexec.py) but no luck! Because **Kaspersky** works like a charm. From this point, I made my own **PsExec** try to bypass **Kaspersky**.

‌First, I used [the PyPsexec](https://pypi.org/project/pypsexec/) library because I didn't have time to make something from scratch.

Then I tested the tool on my VM with **Kaspersky** installed. And guess what? **It's working**, and I can execute commands on the machine.

![](https://1238199223-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MgKo2XdVCwjHarqCSff%2F-Mikd-mLh0oqXmltbNKM%2F-MikdOjhU18MFkgJfr4j%2FPsExec_1.gif?alt=media\&token=f1105f6b-0fa1-45d8-b9ea-92f1c8110225)

The tool may be published in the future, but so far, I have not completed all the features.

#### Features/ToDo.

* Execute commands as a specific local, SYSTEM, or domain user.
* Execute commands via CMD or PowerShell.
* Commands history.

#### Last update

```
- 9/04/2021
```
