目标
通过python写一个木马程序,当用户点击时写一个txt文件并打开,现仅在Linux系统下。
实现
1、test.py
#!/usr/bin/env python3
# coding=utf-8
import os
msg = '''
这是个测试远程木马的实验
'''
open('test.txt','w').write(msg)
os.system('gedit test.txt')
2、生成可执行文件
# pyinstaller test.py -F
若没有pyinstaller,可安装:
# pip install pyinstaller
3、查看可执行文件test,位于dist目录下