随笔分类 - 网络安全
摘要:开源第三方库:https://sliverpy.readthedocs.io/en/latest/getting-started.html#connect-example 代码示例: import os import asyncio from sliver import SliverClientCo
阅读全文
摘要:准备工作 sliver客户端和服务端之间命令的通信采用的grpc, 服务端和和植入程序通信使用的protobuf,所以在开发之前需要了解 grpc和protobuf, 相关文档: https://jergoo.gitbooks.io/go-grpc-practice-guide/content/ch
阅读全文
摘要:` import jieba from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity templates = [ "分析一下攻
阅读全文
摘要:``` #!/usr/bin/env python # -*- coding: utf-8 -*- import json import os import platform from ctypes import cdll, c_char_p from urllib import parse imp
阅读全文
摘要:python3调用nmap封装; 外部处理好参数后直接调用; ``` #!/usr/bin/env python # -*- coding: utf-8 -*- """ 代码修改自: https://pypi.org/project/python-nmap/ nmap.py - version an
阅读全文
摘要:向木马发出指令后, 如果是cmd命令会有一个黑窗口一闪而灭, 不利于木马隐藏, 需要将`executeHandler`从`handlers.go`拷贝到handlers_windows.go里,核心代码为 `cmd.SysProcAttr = &syscall.SysProcAttr{HideWin
阅读全文
摘要:业务需要,调用了很多implants来执行对应系统上的命令, 但是无论怎么指定interactive.py中execute方法参数, 命令执行超时时间总是30. 后面通过扩展`execute`方法增加一个grpc超时参数后解决;具体方法如下: ``` async def execute_ex(sel
阅读全文
摘要:生成sliver木马多个步骤合成一个sh ``` #!/bin/bash # date: 20230222 host_ip=$1 WORK_DIR=/opt/work rm -rf /root/.sliver-client/ cd ${WORK_DIR}/sliver rm -rf adjectiv
阅读全文
摘要:github.com/bishopfox/sliver/server /usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: cannot find -ldl /usr/bin/l
阅读全文
摘要:背景: 有些场景支持直接传参给系统命令并调用的情况;如输入一个ip 执行ping命令看是否能ping同;这种场景如果没有对参数进行校验直接传参就会存在命令注入的情况; 首先需要连接下通过命令连接符号连接的命令执行策略: commandA; commandB //commandA无论正确与否都会执行c
阅读全文
摘要:使用nmap 扫描时可能会扫描tcp top100 top1000 端口, 有时需要去配置文件提取,配置文件路径/usr/share/nmap/nmap-services, 具体根据实际安装情况调整: 该配置i文件通过统计学规律将各端口和服务开放的频率做了统计, 提取时需要根据特征提取并按照几率排序
阅读全文