本人搬运的是github上的一个开源项目

地址:https://github.com/c0ny1/vulstudy

vulstudy

vulstudy是专门收集当下流行的漏洞学习平台,并将其制作成docker镜像,方便大家快速搭建环境,节省搭建时间,专注于的漏洞学习上。目前vulstudy包含以下漏洞学习平台:

序号 漏洞平台 包含漏洞 作者 语言
1 DVWA 综合 未知 php
2 bWAPP 综合 未知 php
3 sqli-labs SQL注入 Audi php
4 mutillidae 综合 OWASP php
5 BodgeIt 综合 psiinon java
6 WackoPicko 综合 adamdoupe php
7 WebGoat 综合 OWASP java
8 Hackademic 综合 northdpole php
9 XSSed XSS AJ00200 php
10 DSVW 综合 Miroslav Stampar python
11 vulnerable-node 综合 cr0hn NodeJS
12 MCIR 综合 Spider Labs php
13 XSS挑战之旅 XSS 未知 php

安装

1
2
3
4
5
6
# 安装docker
apt-get install docker.io
# 安装docker-compose
pip install docker-compose
# 下载vulstudy项目
git clone https://github.com/c0ny1/vulstudy.git

使用

使用主要分两种:单独运行一个漏洞平台,同时运行多个漏洞平台。

1.单独运行一个漏洞平台

cd到要运行的漏洞平台下运行以下命令

1
2
3
cd vulstudy/DVWA
docker-compose up -d #启动容器
docker-compose stop #停止容器

2.同时运行所有漏洞平台

在项目根目录下运行以下命令

1
2
3
cd vulstudy
docker-compose up -d #启动容器
docker-compose stop #停止容器

vulstudy

FAQ

1.第一次启动bWAPP容器访问其主页会报错如下:

1
Connection failed: Unknown database 'bWAPP'

解决: 第一次创建应事先访问/install.php来创建数据库!

2.第一次搭建DVWA,在苹果系统下的safari浏览器下无法初始化数据库,并提示如下:

1
CSRF token is incorrect

解决: 使用苹果系统下的其他浏览器即可,比如Chrome。

声明

该项目只是收集了当下比较流行的漏洞学习平台,若有侵权,请联系我!同时欢迎大家提交更多有意思的漏洞学习平台,让我们一起把它们放到docker上,方便更多人的工作和学习!

本人搬运的是github上的一个开源项目

地址:https://github.com/ffffffff0x/f8x

f8x

介绍

一款红/蓝队环境自动化部署工具,支持多种场景,渗透,开发,代理环境,服务可选项等

大多数场景下,在不同的云购买一些 vps 服务器用于部署红 / 蓝队设施,不能做到开箱即用,使用 f8x 可以快速部署所需要的各类服务。同时兼顾到本地 VM 虚拟机的需求,可以选择走 socket 代理进行安装部署,Proxychains-ng 也会自动安装,只需做好 Proxychains-ng 配置即可。

开始

下载

  • 通过 CF Workers 下载 [推荐]

    • wget : wget -O f8x https://f8x.io/
    • curl : curl -o f8x https://f8x.io/
  • github 直链

    • wget : wget -O f8x https://raw.githubusercontent.com/ffffffff0x/f8x/main/f8x
    • curl : curl -o f8x https://raw.githubusercontent.com/ffffffff0x/f8x/main/f8x

后续不会更新 releases,建议不要下载 releases 的旧版本 f8x

使用

1
bash f8x -h

如果你希望方便点使用可以直接加到环境变量中

  • wget : wget -O f8x https://f8x.io/ && mv --force f8x /usr/local/bin/f8x && chmod +x /usr/local/bin/f8x
    • f8x -h
  • curl : curl -o f8x https://f8x.io/ && mv --force f8x /usr/local/bin/f8x && chmod +x /usr/local/bin/f8x
    • f8x -h

系统依赖

f8x 基本上不需要任何依赖,或者说它就是为了帮助你安装各种依赖而生的😁

f8x-ctf

该脚本用于部署 CTF 环境,支持 (Web、Misc、Crypto、Pwn、Iot) 分类

  • wget : wget -O f8x-ctf https://f8x.io/ctf
    • bash f8x-ctf -help
  • curl : curl -o f8x-ctf https://f8x.io/ctf
    • bash f8x-ctf -help

f8x-dev

该脚本用于部署中间件和数据库环境,支持 (apache、nginx、tomcat、Database、php) 分类

  • wget : wget -O f8x-dev https://f8x.io/dev
    • bash f8x-dev -help
  • curl : curl -o f8x-dev https://f8x.io/dev
    • bash f8x-dev -help

支持选项

目前 f8x 支持以下部署选项 (Linux arm64 下大部分都支持)

1. 批量化安装

  • 使用 -b 选项安装基本环境 (gcc、make、git、vim、telnet、jq、unzip 等基本工具)
  • 使用 -p 选项安装代理环境 (警告:国外云服务器上不要用,会降速)
  • 使用 -d 选项安装开发环境 (python3、pip3、Go、Docker、Docker-Compose、SDKMAN)
  • 使用 -k 选项安装渗透环境 (hashcat、ffuf、OneForAll、ksubdomain、impacket 等渗透工具)
    • -ka 信息收集、扫描、爆破、抓取
    • -kb 漏洞利用
    • -kc 后渗透、C2
    • -kd 其他
    • -ke 功能重叠或长期不维护
  • 使用 -s 选项安装蓝队环境 (Fail2Ban、chkrootkit、rkhunter、河马webshell查杀工具)
  • 使用 -f 选项安装其他工具 (Bash_Insulter、vlmcsd、AdguardTeam、trash-cli 等辅助工具)
  • 使用 -cloud 选项安装云应用 (Terraform、Serverless Framework、wrangler)
  • 使用 -all 选项全自动化部署 (默认不走代理,兼容 CentOS7/8,Debain10/9,Ubuntu20/18,Fedora33)

2. 开发环境

  • 使用 -docker 选项安装 docker 环境
  • 使用 -lua 选项安装 lua 环境
  • 使用 -nn 选项安装 npm & NodeJs 环境
  • 使用 -go 选项安装 go 环境
  • 使用 -oraclejdk(8/11) 选项安装 oraclejdk 环境
  • 使用 -openjdk 选项安装 openjdk 环境
  • 使用 -py3(7/8/9/10) 选项安装 python3 环境
  • 使用 -py2 选项安装 python2 环境
  • 使用 -pip2-f 选项强制安装 pip2 环境 (建议在 -python2 选项失败的情况下运行)
  • 使用 -perl 选项安装 perl 环境
  • 使用 -ruby 选项安装 ruby 环境
  • 使用 -rust 选项安装 rust 环境
  • 使用 -code 选项安装 code-server 环境
  • 使用 -chromium 选项安装 Chromium 环境 (用于配合 -k 选项中的 rad、crawlergo)
  • 使用 -phantomjs 选项安装 PhantomJS

3. 蓝队工具

  • 使用 -binwalk 选项安装 binwalk 环境
  • 使用 -binwalk-f 选项强制安装 binwalk 环境 (建议在 -binwalk 选项失败的情况下运行)
  • 使用 -clamav 选项安装 ClamAV 工具
  • 使用 -lt 选项部署 LogonTracer 环境 (非超高配置机器不要部署,这个应用太吃配置了)
  • 使用 -suricata 选项部署 Suricata 环境
  • 使用 -vol 选项安装 volatility 取证工具
  • 使用 -vol3 选项安装 volatility3 取证工具

4. 红队工具

  • 使用 -aircrack 选项部署 aircrack-ng 环境
  • 使用 -bypass 选项部署 Bypass 环境
  • 使用 -goby 选项部署 Goby 环境 (需要图形化环境)
  • 使用 -wpscan 选项安装 wpscan 工具
  • 使用 -yakit 选项部署 yakit 环境

5. 红队基础设施

6. 基于 Docker 的环境部署

  • 使用 -arl 选项部署 ARL 环境(872 MB)
  • 使用 -mobsf 选项部署 MobSF 环境(1.54 GB)
  • 使用 -nodejsscan 选项部署 nodejsscan 环境(873 MB)
  • 使用 -vulhub 选项部署 vulhub 环境(210 MB)
  • 使用 -vulfocus 选项部署 vulfocus 环境(1.04 GB)
  • 使用 -TerraformGoat 选项部署 TerraformGoat 环境

7. 杂项服务

  • 使用 -asciinema 选项安装 asciinema 截图工具
  • 使用 -bt 选项部署宝塔服务
  • 使用 -clash 选项安装 clash 工具 (https://github.com/juewuy/ShellClash)
  • 使用 -nginx 选项配置 nginx 服务
  • 使用 -ssh 选项配置 ssh 环境 (RedHat 系默认可用,无需重复安装)
  • 使用 -ssr 选项部署 ssr 工具
  • 使用 -zsh 选项部署 zsh 工具

8. 其他

  • 使用 -clear 选项清理系统使用痕迹
  • 使用 -info 选项查看系统各项信息
  • 使用 -optimize 选项改善设备选项,优化性能
  • 使用 -remove 选项卸载国内 vps 云监控
  • 使用 -rmlock 选项运行除锁模块
  • 使用 -swap 选项配置 swap 分区
  • 使用 -update 选项更新 f8x 工具
  • 使用 -upgrade 选项更新渗透工具

实际效果

-h 查看帮助

1

-all 全自动化部署

centos7

以 vultr vps 为例,结果分别如下

CentOS 7

centos7

Debian 10

debian10

Fedora 33

Fedora 33

Ubuntu 20.10

Ubuntu 20.10


FAQ

-p 选项会执行什么

  1. 替换你的 DNS(默认为 223.5.5.5), 如果判断是 debian 系还会帮你安装 resolvconf, 长期修改 DNS
  2. 检查基础的编译环境是否安装, 并通过默认的包管理器安装 gcc,make,unzip 这些基本软件
  3. 可选的从 https://github.com/rofl0r/proxychains-ng 或 ffffffff0x.com 下载 Proxychains-ng 的源码, 编译安装
  4. 要求你修改 /etc/proxychains.conf 文件
  5. 修改 pip 代理为 https://mirrors.aliyun.com/pypi/simple/
  6. 修改 docker 代理为 https://docker.mirrors.ustc.edu.cn , 并重启 docker 服务

我想跑在 CI/CD 里,不想要交互行不行?

当然没有问题, f8x 的 GitHub action 就是自动运行每个选项部署环境的。只需要在 /tmp 创建一个名为 IS_CI 的空文件即可

1
2
3
touch /tmp/IS_CI
wget -O f8x https://f8x.io/ && mv --force f8x /usr/local/bin/f8x && chmod +x /usr/local/bin/f8x
f8x -k

如何自定义版本

shell脚本在运行时,可以通过 . ./test.sh 这样同等进程运行修改当前shell环境变量,那么f8x对同目录下的 f8x_version.sh 文件做个判断,当有这个文件时,会加载这个文件中的内容,也就是覆盖f8x的变量值,这样只需要在当前目录下对 f8x_version.sh 文件做修改或定制,即可做到安装指定版本


本人搬运的是github上的一个开源项目

地址:https://github.com/guchangan1/All-Defense-Tool

如果你有更好的提议或者其他想法,欢迎联系。

by–L0una(guchangan1)

All-Defense-Tool

​ 首先恭喜你发现了宝藏。本项目集成了全网优秀的开源攻防武器项目,包含信息收集工具(自动化利用工具、资产发现工具、目录扫描工具、子域名收集工具、指纹识别工具、端口扫描工具、各种插件….etc…),漏洞利用工具(各大CMS利用工具、中间件利用工具等项目……..),内网渗透工具(隧道代理、密码提取…..)、应急响应工具、甲方运维工具、等其他安全攻防资料整理,供攻防双方使用。如果你有更好的建议,欢迎提出请求。

免责声明

重点提醒:本项目工具来源于互联网,是否含带木马及后门请自行甄别!!Hvv来即,请大家提高警惕!!!

  1. 本项目所有内容,仅供学习和研究使用,请勿使用项目的技术手段用于非法用途,任何人造成的任何负面影响,与本人无关.
  2. 本文档所有内容、新闻皆不代表本人态度、立场,如果有建议或方案,欢迎提交 issues
  3. 不会收取任何广告费用,展示的所有工具链接与本人无任何利害关系

目录

温馨提醒:不要沉迷于攻防而忘了吃饭喔~

半/全自动化利用工具

项目简介 项目地址 项目名称
一条龙服务,只需要输入根域名即可全方位收集相关资产,并检测漏洞。也可以输入多个域名、C段IP等,具体案例见下文。 https://github.com/0x727/ShuiZe_0x727 ShuiZe_0x727
单兵作战武器库,你值得拥有 https://github.com/yaklang/yakit yakit
自动化巡航扫描框架(可用于红队打点评估) https://github.com/b0bac/ApolloScanner ApolloScanner
可针对指定IP段、资产清单、存活网段自动化进行端口扫描以及TCP指纹识别和Banner抓取 https://github.com/lcvvvv/kscan kscan
一款尚未被发掘的脆弱性扫描工具 https://github.com/broken5/bscan bscan
一个漏洞扫描器粘合剂,添加目标后30款工具自动调用 https://github.com/78778443/QingScan QingScan
分布式资产信息收集和漏洞扫描平台 https://github.com/1in9e/gosint gosint
一个辅助平常渗透测试项目或者攻防项目快速打点的综合工具 https://github.com/P1-Team/AlliN AlliN
nemo_go自动化信息收集 https://github.com/hanc00l/nemo_go nemo_go
从子域名、端口服务、漏洞、爬虫等一体化的资产管理系统 https://github.com/CTF-MissFeng/bayonet bayonet
一个高度可定制Web自动化扫描框架 https://github.com/r3curs1v3-pr0xy/vajra vajra
reconFTW 集成了30个工具的信息收集利器 https://github.com/six2dez/reconftw reconftw
自动化侦查框架 https://github.com/yogeshojha/rengine rengine
GUI界面的自动化工具 https://github.com/lz520520/railgun Railgun
在线cms识别|信息泄露|工控|系统|物联网安全|cms漏洞扫描|nmap端口扫描|子域名获取|待续.. https://github.com/iceyhexman/onlinetools 在线工具集
Acunetix Web漏洞扫描程序 GUI版本] https://github.com/x364e3ab6/AWVS-13-SCAN-PLUS AWVS-GUI
DarkAngel 是一款全自动白帽漏洞扫描器,从hackerone、bugcrowd资产监听到漏洞报告生成、企业微信通知。 https://github.com/Bywalks/DarkAngel DarkAngel

信息收集工具

资产发现工具

项目简介 项目地址 项目名称
reconFTW 集成了30个工具的信息收集利器 https://github.com/six2dez/reconftw reconftw
资产无限巡航扫描系统 https://github.com/awake1t/linglong linglong
SRC子域名资产监控 https://github.com/LangziFun/LangSrcCurise LangSrcCurise
快速侦察与目标关联的互联网资产,构建基础资产信息库。 https://github.com/TophantTechnology/ARL ARL(灯塔)
集成GoogleHacking语法来进行信息收集 https://github.com/TebbaaX/GRecon Grecon
从第三方平台获取目标网页内容 https://github.com/tomnomnom/waybackurls waybackurls
从多个网站提取目标相关信息 https://github.com/lc/gau gau
集合了多个网络测绘平台,可以快速在多个网络测绘平台搜索信息并且合并展示及导出。 https://github.com/ExpLangcn/InfoSearchAll InfoSearchAll
调用fofa\ZoomEye\360quake的官方api—GUI界面 https://github.com/xzajyjs/ThunderSearch ThunderSearch
集成多个网络资产测绘平台的搜索工具 https://github.com/Kento-Sec/AsamF AsamF
一个简单实用的FOFA客户端 By flashine https://github.com/wgpsec/fofa_viewer fofa_viewer
0_zone_zpi脚本 https://github.com/lemonlove7/0_zone 0_zone
icp备案查询、企业资产快速收集工具 https://github.com/SiJiDo/IEyes IEyes
一款基于各大企业信息API的工具 https://github.com/wgpsec/ENScan_GO ENScan_GO
基于斗象灯塔ARL修改后的版本。相比原版,增加了OneForAll、中央数据库,修改了altDns https://github.com/ki9mu/ARL-plus-docker ARL-plus-docker
灯塔(最新版)指纹添加脚本! https://github.com/loecho-sec/ARL-Finger-ADD ARL-Finger-ADD

子域名收集工具

项目简介 项目地址 项目名称
在线子域名收集 https://rapiddns.io/subdomain 在线收集
ksubdomain 无状态子域名爆破工具 https://github.com/knownsec/ksubdomain ksubdomain
一款功能强大的子域收集工具 https://github.com/shmilylty/OneForAll oneforall
通过使用被动在线资源来发现网站的有效子域 https://github.com/projectdiscovery/subfinder subfinder
src子域名监控 https://github.com/LangziFun/LangSrcCurise LangSrcCurise
从 github 上发现子域名 https://github.com/gwen001/github-subdomains github-subdomains
Layer子域名挖掘机 https://github.com/euphrat1ca/LayerDomainFinder Layer
好用且强大的子域名扫描工具 https://github.com/yunxu1/dnsub dnsub

目录扫描工具

项目简介 项目地址 项目名称
Web path scanner 目录扫描工具 https://github.com/maurosoria/dirsearch dirsearch
用Rust编写的快速,简单,递归的内容发现工具 https://github.com/epi052/feroxbuster feroxbuster
用Go编写的模糊测试工具 https://github.com/ffuf/ffuf ffuf
一个高级web目录、文件扫描工具 https://github.com/H4ckForJob/dirmap dirmap
网站的敏感目录发掘工具 https://github.com/deibit/cansina cansina
御剑后台扫描工具珍藏版 https://www.fujieace.com/hacker/tools/yujian.html 御剑
使用GoLang开发的目录/子域扫描器 https://github.com/ReddyyZ/urlbrute urlbrute
御剑目录扫描专业版 https://github.com/foryujian/yjdirscan yjdirscan
web目录快速扫描工具,够用 https://github.com/hunyaio/yuhScan yuhScan
类似JSFinder的golang实现,更快更全更舒服 https://github.com/pingc0y/URLFinder URLFinder
爬虫 可以发现搜索引擎发现不了的目录 https://github.com/jaeles-project/gospider gospider
katana 是 projectdiscovery 项目中的一个网页链接抓取工具,可以自动解析js文件。新一代爬行框架。 https://github.com/projectdiscovery/katana katana
dontgo403 是一个绕过 40X 错误的工具。 https://github.com/devploit/dontgo403 dontgo403

指纹识别工具

项目简介 项目地址 项目名称
红队重点攻击系统指纹探测工具 https://github.com/EdgeSecurityTeam/EHole EHole(棱洞)2.0
Golang实现Wappalyzer 指纹识别 https://github.com/projectdiscovery/wappalyzergo wappalyzergo
功能齐全的Web指纹识别和分享平台,内置了一万多条互联网开源的指纹信息。 https://github.com/b1ackc4t/14Finger 14Finger
一个web应用程序指纹识别工具 https://github.com/urbanadventurer/WhatWeb Whatweb
一款红队在大量的资产中存活探测与重点攻击系统指纹探测工具 https://github.com/EASY233/Finger Finger
Glass是一款针对资产列表的快速指纹识别工具 https://github.com/s7ckTeam/Glass Glass
TideFinger——指纹识别小工具,汲取整合了多个web指纹库 https://github.com/TideSec/TideFinger TideFinger

端口扫描工具

项目简介 项目地址 项目名称
naabu 用 go 编写的快速端口扫描器 https://github.com/projectdiscovery/naabu naabu
TXPortMap 实用型的端口扫描、服务识别工具 https://github.com/4dogs-cn/TXPortMap TXPortMap
使用Golang开发的高并发网络扫描、服务探测工具 https://github.com/Adminisme/ServerScan serverScan
masnmapscan 一款端口扫描器。整合了masscan和nmap两款扫描器 https://github.com/hellogoldsnakeman/masnmapscan-V1.0 整合扫描器
gonmap是一个go语言的nmap端口扫描库 https://github.com/lcvvvv/gonmap gonmap
光速扫描 http://pan.baidu.com/s/1pLjaQKF 小米范
在线端口扫描1 http://coolaf.com/tool/port 在线工具
在线端口扫描2 http://tool.cc/port/ 在线工具2

Burp插件

项目简介 项目地址 项目名称
有关burpsuite的插件(非商店),文章以及使用技巧的收集 https://github.com/Mr-xn/BurpSuite-collections BurpSuite-collections
一款基于BurpSuite的被动式shiro检测插件 https://github.com/pmiaowu/BurpShiroPassiveScan BurpShiroPassiveScan
一款基于BurpSuite的被动式FastJson检测插件 https://github.com/pmiaowu/BurpFastJsonScan BurpFastJsonScan
添加一些右键菜单让burp用起来更顺畅 https://github.com/bit4woo/knife knife
fastjson漏洞burp插件,检测fastjson小于1.2.68基于dnslog https://github.com/zilong3033/fastjsonScan fastjsonScan
fastjson利用,支持tomcat、spring回显,哥斯拉内存马;回显利用链为dhcp、ibatis、c3p0 https://github.com/skisw/fastjson-exp fastjson-exp
HaE 请求高亮标记与信息提取的辅助型 BurpSuite 插件 https://github.com/gh0stkey/HaE HaE
domain_hunter_pro 一个资产管理类的Burp插件 https://github.com/bit4woo/domain_hunter_pro domain_hunter_pro
新一代子域名主/被动收集工具 https://github.com/Acmesec/Sylas Sylas
GadgetProbe Burp插件 用来爆破远程类查找Java反序列化 https://github.com/BishopFox/GadgetProbe GadgetProbe
HopLa 自动补全 Payload 的 BurpSuite插件 https://github.com/synacktiv/HopLa HopLa
验证码识别 https://github.com/f0ng/captcha-killer-modified captcha-killer-modified
一款支持多种加密算法、或直接执行浏览器JS代码的BurpSuite插件。 https://github.com/whwlsfb/BurpCrypto BurpCrypto
根据自定义来达到对数据包的处理(适用于加解密、爆破等),类似mitmproxy,不同点在于经过了burp中转 https://github.com/f0ng/autoDecoder autoDecoder
伪造ip地址 https://github.com/TheKingOfDuck/burpFakeIP burpFakeIP
自动发送请求 https://github.com/nccgroup/AutoRepeater AutoRepeater
自动探测请求走私漏洞 https://github.com/portswigger/http-request-smuggler http-request-smuggler

浏览器插件

项目简介 项目地址 项目名称
Hack-Tools 适用于红队的浏览器扩展插件 https://github.com/LasCC/Hack-Tools Hack-Tools
SwitchyOmega 浏览器的代理插件 https://github.com/FelisCatus/SwitchyOmega SwitchyOmega
Chrome插件.使用DevTools查找DOM XSS https://github.com/filedescriptor/untrusted-types untrusted-types
FOFA Pro view 是一款FOFA Pro 资产展示浏览器插件 https://github.com/fofapro/fofa_view fofa_view
mitaka 用于 OSINT 搜索的Chrome和Firefox扩展 https://github.com/ninoseki/mitaka mitaka
Git History 查看git存储库文件的历史记录 https://githistory.xyz/ Git History
一款可以检测WEB蜜罐并阻断请求的Chrome插件 https://github.com/cnrstar/anti-honeypot anti-honeypot
一款基于 Chromium的XSS检测工具 https://github.com/v8blink/Chromium-based-XSS-Taint-Tracking Chromium-based-XSS-Taint-Tracking
一款完全被动监听的谷歌插件,用于高危指纹识别、蜜罐特征告警和拦截、机器特征对抗。 https://github.com/graynjo/Heimdallr Heimdallr

邮箱&钓鱼

项目简介 项目地址 项目名称
邮箱自动化收集爬取 https://github.com/Taonn/EmailAll EmailAll
通过搜索引擎爬取电子邮件 https://github.com/Josue87/EmailFinder EmailFinder
批量检查邮箱账密有效的 Python 脚本 https://github.com/rm1984/IMAPLoginTester IMAPLoginTester
Coremail邮件系统组织通讯录导出脚本 https://github.com/dpu/coremail-address-book coremail-address-book
拥有在线模板设计、发送诱骗广告等功能的钓鱼系统 https://github.com/gophish/gophish gophish
Swaks SMTP界的瑞士军刀 https://github.com/jetmore/swaks swaks
一个在线的任意发件人发送Email邮件网站 http://tool.chacuo.net/mailanonymous mailanonymous
EwoMail是基于Linux的企业邮箱服务器 https://github.com/gyxuehu/EwoMail EwoMail
批量发送钓鱼邮箱 https://github.com/Yang0615777/sendMail sendMail
免杀宏生成器 https://github.com/Inf0secRabbit/BadAssMacros BadAssMacros

社工个人信息收集类

项目简介 项目地址 项目名称
从大量站点中收集用户个人信息 https://github.com/soxoj/maigret maigret
根据邮箱自动搜索泄漏的密码信息 https://github.com/D4Vinci/Cr3dOv3r Cr3dOv3r
密码泄露搜集 https://archive.org/search.php?query= archive
从部分站点中收集个人信息 https://github.com/n0tr00t/Sreg Sreg
输入人名或邮箱地址, 自动从互联网爬取关于此人的信息 https://github.com/famavott/osint-scraper osint-scraper
通过脉脉用户猜测企业邮箱 https://github.com/Ridter/Mailget Mailget
社工字典密码生成 https://github.com/Mebus/cupp cupp
社会工程学密码生成器,是一个利用个人信息生成密码的工具 https://github.com/zgjx6/SocialEngineeringDictionaryGenerator DictionaryGenerator
在线密码生成器 https://zzzteph.github.io/weakpass/ weakpass

APP/公众号/小程序相关工具

项目简介 项目地址 项目名称
一个反编译微信小程序的工具,仓库也收集各种微信小程序/小游戏.wxapkg文件 https://github.com/ezshine/wxapkg-convertor wxapkg-convertor
微信小程序反编译 https://github.com/qwerty472123/wxappUnpacker wxappUnpacker(自行寻找备份仓库)
微信小程序反编译 https://github.com/r3x5ur/wxapkg-unpacker wxapkg-unpacker(二开)
微信小程序信息在线收集,wxapkg源码包内提取信息 https://github.com/moyuwa/wechat_appinfo_wxapkg wechat_appinfo_wxapkg
移动端(Android、iOS、WEB、H5、静态网站)信息收集扫描工具 https://github.com/kelvinBen/AppInfoScanner AppInfoScanner
一款适用于以APP病毒分析、APP漏洞挖掘、APP开发、HW行动/红队/渗透测试团队为场景的移动端(Android、iOS)辅助分析工具 https://github.com/sulab999/AppMessenger AppMessenger
apk爬虫工具可提取包内url等信息 https://github.com/dwisiswant0/apkleaks apkleaks

常用小工具

项目简介 项目地址 项目名称
好用的去重对比工具 https://github.com/tomnomnom/anew anew
视觉侦查工具,用于信息收集屏幕截图 https://github.com/sensepost/gowitness gowitness
一款jar包分析小工具 https://github.com/4ra1n/jar-analyzer jar-analyzer

漏洞利用工具

漏洞扫描框架/工具

项目简介 项目地址 项目名称
高危漏洞精准检测与深度利用框架 https://github.com/woodpecker-framework/woodpecker-framwork-release woodpecker-framwork
一款扩展性高的渗透测试框架渗透测试框架 https://github.com/achuna33/MYExploit MYExploit
Web漏洞攻击框架 https://github.com/Anonymous-ghost/AttackWebFrameworkTools AttackWebFrameworkTools
基于简单 YAML 的 DSL 的快速且可定制的漏洞扫描器。 https://github.com/projectdiscovery/nuclei nuclei
afrog 是一款性能卓越、快速稳定、PoC 可定制化的漏洞扫描工具 https://github.com/zan8in/afrog afrog
一款功能强大的安全评估工具 https://github.com/chaitin/xray Xray
网络安全测试工具 https://github.com/gobysec/Goby Goby
开源的远程漏洞测试框架 https://github.com/knownsec/pocsuite3 pocsuite3
全新的开源在线 poc 测试框架 https://github.com/jweny/pocassist pocassist
是一款 web 漏洞扫描和验证工具 https://github.com/zhzyker/vulmap Vulmap

中间件/应用漏洞利用工具

项目简介 项目地址 项目名称
OA综合利用工具,集合将近20款OA漏洞批量扫描 https://github.com/LittleBear4/OA-EXPTOOL OA-EXPTOOL
综合高危漏洞利用工具 https://github.com/Liqunkit/LiqunKit_ LiqunKit
使用JAVAFX图形化界面检测对HVV中常见的重点CMS系统和OA系统的已公开的漏洞进行验证。 https://github.com/ExpLangcn/HVVExploitApply HVVExploitApply
Spring系列漏洞利用工具 https://github.com/SummerSec/SpringExploit SpringExploit
shiro 反序列 命令执行辅助检测工具 https://github.com/wyzxxz/shiro_rce_tool shiro_rce_tool
shiro反序列化漏洞综合利用,包含(回显执行命令/注入内存马)修复原版中NoCC的问题 https://github.com/SummerSec/ShiroAttack2 ShiroAttack2
shiro反序列化漏洞综合利用,包含(回显执行命令/注入内存马) https://github.com/j1anFen/shiro_attack shiro_attack
Fastjson扫描器,可识别版本、依赖库、autoType状态等。 https://github.com/a1phaboy/FastjsonScan FastjsonScan
FastjonExploit | Fastjson漏洞快速利用框架 https://github.com/c0ny1/FastjsonExploit FastjsonExploit
fastjson_rce_tool fastjson命令执行自动化利用工具 https://github.com/wyzxxz/fastjson_rce_tool fastjson_rce_tool
fastjson一键命令执行 https://github.com/mrknow001/fastjson_rec_exploit fastjson_rec_exploit
Jboss(和 Java 反序列化漏洞)验证和利用工具 https://github.com/joaomatosf/jexboss exBoss
Weblogic漏洞利用图形化工具 支持注入内存马、一键上传webshell、命令执行 https://github.com/sp4zcmd/WeblogicExploit-GUI WeblogicExploit-GUI
Weblogic一键漏洞检测工具,V1.5,更新时间:20200730 https://github.com/rabbitmask/WeblogicScan WeblogicScan
weblogic 漏洞扫描工具。包含2020 https://github.com/0xn0ne/weblogicScanner weblogicScanner
weblogic利用工具weblogic-framework https://github.com/0nise/weblogic-framework weblogic-framework
woodpecker框架weblogic信息探测插件 https://github.com/woodpecker-appstore/weblogic-infodetector weblogic-infodetector
Dubbo反序列化一键快速攻击测试工具 https://github.com/threedr3am/dubbo-exp dubbo-exp
jenkins-attack-framework 针对 Jenkins 的攻击框架 https://github.com/Accenture jenkins-attack-framework
Jiraffe 是为利用 Jira 实例而编写的半自动安全工具。 https://github.com/0x48piraj/Jiraffe Jiraffe
STS2G Struts2漏洞扫描利用工具 - Golang版 https://github.com/xwuyi/STS2G STS2G
Struts2-Scan Struts2全漏洞扫描利用工具 https://github.com/HatBoy/Struts2-Scan Struts2-Scan
log4j漏洞利用工具 https://github.com/kozmer/log4j-shell-poc log4j-shell-poc
Confluence-OGNL一键注入内存shell https://github.com/BeichenDream/CVE-2022-26134-Godzilla-MEMSHELL Confluence
YApi接口管理平台远程命令执行 https://github.com/Tas9er/YApiRCE YApiRCE
一款针对Vcenter的综合利用工具,包含目前最主流的CVE-2021-21972、CVE-2021-21985以及CVE-2021-22005以及log4j,提供一键上传webshell,命令执行或者上传公钥使用SSH免密连接 https://github.com/Schira4396/VcenterKiller VcenterKiller

重点cms利用工具

项目简介 项目地址 项目名称
综合高危漏洞利用工具 https://github.com/Liqunkit/LiqunKit_ LiqunKit
致远OA综合利用工具 https://github.com/Summer177/seeyon_exp seeyon_exp
致远OA综合利用工具GUI-V1.0 https://github.com/God-Ok/SeeyonExploit-GUI SeeyonExploit-GUI
通达OA综合利用工具 https://github.com/xinyu2428/TDOA_RCE TDOA_RCE
蓝凌OA漏洞利用工具/前台无条件RCE/文件写入 https://github.com/yuanhaiGreg/LandrayExploit LandrayExploit
泛微OA漏洞综合利用脚本 https://github.com/z1un/weaver_exp weaver_exp
锐捷网络EG易网关RCE批量安全检测 https://github.com/Tas9er/EgGateWayGetShell EgGateWayGetShell
CMSmap 针对流行CMS进行安全扫描的工具 https://github.com/Dionach/CMSmap CMSmap
使用Go开发的WordPress漏洞扫描工具 https://github.com/blackbinn/wprecon wprecon
一个 Ruby 框架,旨在帮助对 WordPress 系统进行渗透测试 https://github.com/rastating/wordpress-exploit-framework wordpress-exploit-framework
WPScan WordPress 安全扫描器 https://github.com/wpscanteam/wpscan wpscan
WPForce Wordpress 攻击套件 https://github.com/n00py/WPForce WPForce
漏洞POC基本适用ThinkPHP全版本漏洞 https://github.com/zangcc/Aazhen-v3.1 Aazhen-v3.1
Thinkphp(GUI)漏洞利用工具,支持各版本TP漏洞检测,命令执行,getshell。 https://github.com/Lotus6/ThinkphpGUI ThinkphpGUI
ThinkPHP 漏洞 综合利用工具, 图形化界面, 命令执行, 一键getshell, 批量检测, 日志遍历, session包含, 宝塔绕过 https://github.com/bewhale/thinkphp_gui_tools thinkphp_gui_tools

信息泄露利用工具

项目简介 项目地址 项目名称
六大云存储,泄露利用检测工具 https://github.com/UzJu/Cloud-Bucket-Leak-Detection-Tools Cloud-Bucket-Leak-Detection-Tools
AK资源管理工具,阿里云/腾讯云 AccessKey AccessKeySecret https://github.com/wyzxxz/aksk_tool aksk_tool
swagger-exp Swagger REST API 信息泄露利用工具 https://github.com/lijiejie/swagger-exp swagger-exp
swagger-hack 自动化爬取并测试所有swagger-ui.html接口 https://github.com/jayus0821/swagger-hack swagger-hack
heapdump敏感信息查询工具 https://github.com/wyzxxz/heapdump_tool heapdump_tool
Packer Fuzzer 针对Webpack等前端打包工具所构造的网站进行检测的扫描工具 https://github.com/rtcatc/Packer-Fuzzer Packer-Fuzzer
.git源代码泄露利用工具 https://github.com/BugScanTeam/GitHack GitHack
.cvs源代码泄露利用工具 https://github.com/kost/dvcs-ripper.git dvcs-ripper
.DS_store文件泄露利用工具 https://github.com/lijiejie/ds_store_exp ds_store_exp
SvnExploit支持SVN源代码泄露全版本Dump源码 https://github.com/admintony/svnExploit svnExploit
git-dumper 从网站转储git存储库的工具 https://github.com/arthaud/git-dumper git-dumper
GitDorker 通过使用大型的dorks库来从GitHub抓取敏感信息 https://github.com/obheda12/GitDorker GitDorker
从JavaScript文件中提取敏感信息 https://github.com/m4ll0k/SecretFinder SecretFinder
功能比较多的一个JavaScript侦查自动化脚本 https://github.com/KathanP19/JSFScan.sh JSFScan
子域名接管漏洞检测工具,支持30+云服务托管检测 https://github.com/Ice3man543/SubOver SubOver

数据库利用工具

项目简介 项目地址 项目名称
MDUT 2.0 数据库利用工具 https://github.com/SafeGroceryStore/MDUT MDUT
综合高危漏洞利用工具(包含各大数据库) https://github.com/Liqunkit/LiqunKit_ LiqunKit
sqlserver利用工具 https://github.com/uknowsec/SharpSQLTools SharpSQLTools
通过套接字重用通过受损的 Microsoft SQL Server 在受限环境中执行横向移动 https://github.com/blackarrowsec/mssqlproxy mssqlproxy
ODAT:Oracle 数据库攻击工具 https://github.com/quentinhardy/odat ODAT
Redis未授权访问漏洞利用工具 https://github.com/n0b0dyCN/redis-rogue-server redis-rogue-server
Redis未授权访问漏洞利用工具2 https://github.com/Ridter/redis-rce redis-rce
Redis 漏洞利用工具 https://github.com/yuyan-sec/RedisEXP RedisEXP
redis主从复制rce的go版本 https://github.com/zyylhn/redis_rce redis_rce

爆破利用工具

项目简介 项目地址 项目名称
还是推荐fscan吧,还是还用,更新也快 https://github.com/shadow1ng/fscan fscan
爆破神器,懂得都懂 https://github.com/vanhauser-thc/thc-hydra hydra
超级弱口令检查工具是一款Windows平台的弱口令审计工具 https://github.com/shack2/SNETCracker 超级弱口令
集合了fscan和kscan等优秀工具功能的扫描爆破工具。 https://github.com/i11us0ry/goon goon

全网字典收集

项目简介 项目地址 项目名称
渗透测试、SRC漏洞挖掘、爆破、Fuzzing等字典收集项目 https://github.com/insightglacier/Dictionary-Of-Pentesting Dictionary-Of-Pentesting
Fuzz 字典,一个就够了 https://github.com/TheKingOfDuck/fuzzDicts Web Pentesting
Web 模糊测试字典与一些Payloads https://github.com/gh0stkey/Web-Fuzzing-Box Web Fuzzing Box
上传漏洞fuzz字典生成脚本 https://github.com/c0ny1/upload-fuzz-dic-builder upload-fuzz-dic-builder
安全评估期间使用的多种类型列表的集合 https://github.com/danielmiessler/SecLists SecLists
渗透测试仪和Bug赏金猎人的 Payload 库 https://github.com/sh377c0d3/Payloads Payloads
基于实战沉淀下的各种弱口令字典 https://github.com/fuzz-security/SuperWordlist SuperWordlist
各类漏洞的 TOP25 参数字典 https://github.com/lutfumertceylan/top25-parameter top25-parameter
提取收集以往泄露的密码中符合条件的强弱密码 https://github.com/r35tart/RW_Password RW_Password

常规漏洞利用工具

项目简介 项目地址 项目名称
DalFox 是一款功能强大的开源 XSS 扫描工具和参数分析器、实用工具 https://github.com/hahwul/dalfox dalfox
基于DOM的快速XSS漏洞扫描程序 https://github.com/dwisiswant0/findom-xss findom-xss
很常用的XSS平台 https://github.com/beefproject/beef beef
Fast CRLF injection scanning tool https://github.com/Nefcore/CRLFsuite CRLFsuite
快速 CORS 错误配置漏洞扫描程序 https://github.com/chenjj/CORScanner CORScanner
xxe利用工具 https://github.com/BuffaloWill/oxml_xxe oxml_xxe
xxe利用工具2 https://github.com/whitel1st/docem docem
UEditor编辑器批量GetShell / Code By:Tas9er https://github.com/Tas9er/UEditorGetShell UEditorGetShell
子域名接管工具 https://github.com/michenriksen/aquatone aquatone
用于查找常见的Nginx错误配置和漏洞。 https://github.com/stark0de/nginxpwner nginxpwner
安卓应用层抓包通杀脚本 https://github.com/r0ysue/r0capture r0capture
具有交互式界面的自动 SSTI 检测工具 https://github.com/vladko312/SSTImap SSTImap
A simple SSRF-testing sheriff written in Go https://github.com/teknogeek/ssrf-sheriff ssrf-sheriff
文件包含利用工具 https://github.com/mzfr/liffy liffy

反序列化利用工具

项目简介 项目地址 项目名称
jndi注入工具v1.4 https://github.com/WhiteHSBG/JNDIExploit JNDIExploit
JNDI服务利用工具 RMI/LDAP,支持部分场景回显、内存shell,高版本JDK场景下利用等 https://github.com/wyzxxz/jndi_tool jndi_tool
反序列化利用工具 https://github.com/frohoff/ysoserial ysoserial
项目为 ysoserial [su18] 专版,取名为 ysuserial ,在原项目 ysoserial 基础上魔改而来 https://github.com/su18/ysoserial/ ysuserial
ysoserial修改版,着重修改ysoserial.payloads.util.Gadgets.createTemplatesImpl使其可以通过引入自定义class的形式来执行命令、内存马、反序列化回显 https://github.com/Y4er/ysoserial ysoserial修改版

代码审计辅助工具

项目简介 项目地址 项目名称
开源的被动式交互式安全测试(IAST)产品 https://github.com/HXSecurity/DongTai DongTai
一款基于CodeQL实现的自动化代码审计工具,目前仅支持java语言,后期会增加对其他语言的支持。 https://github.com/webraybtl/CodeQLpy CodeQLpy
免费开源的语义代码分析引擎和查询工具 https://github.com/github/codeql-cli-binaries CodeQL
Java Web应用安全漏洞自动化发现-idea插件 https://github.com/find-sec-bugs/find-sec-bugs/wiki/IntelliJ-Tutorial FindSecBugs
IDEA依赖检查插件 https://github.com/jeremylong/DependencyCheck DependencyCheck
TABBY 是一个基于Soot的 Java 代码分析工具。 https://github.com/wh1t3p1g/tabby tabby
查找PHP代码漏洞工具 https://github.com/ecriminal/phpvuln phpvuln
一款不错的静态源代码分析工具,主要用来挖掘PHP程序的漏洞。 http://rips-scanner.sourceforge.net RIPS
源代码静态分析工具,支持Java、PHP、C#、Python、Go等27种编程语言,而且能够集成在IDE、Jenkins、Git等服务。 https://www.sonarqube.org SonarQube
一种适用于 C++、C#、VB、PHP、Java、PL/SQL 和 COBOL 的自动化代码安全审查工具。 https://sourceforge.net/projects/visualcodegrepp/ VCG(VisualCodeGrepper)
一个专门用于查找Python代码中常见安全问题的工具。 https://github.com/PyCQA/bandit bandit
一个静态代码脆弱性检测系统,支持java源码的审计 https://github.com/zsdlove/Hades Hades

内网渗透工具

webshell&&内存马&&shell

项目简介 项目地址 项目名称
反弹shell就用这个,懂得都懂 https://github.com/WangYihang/Platypus Platypus
哥斯拉 https://github.com/BeichenDream/Godzilla Godzilla
“冰蝎”动态二进制加密网站管理客户端 https://github.com/rebeyond/Behinder Behinder
中国蚁剑是一款开源的跨平台网站管理工具 https://github.com/AntSwordProject/antSword antSword
一句话WEB端管理工具 https://github.com/boy-hack/WebshellManager WebshellManager
跨平台版中国菜刀 https://github.com/Chora10/Cknife Cknife
Java内存马注入工具 https://github.com/WisteriaTiger/JundeadShell JundeadShell
拿来即用的Tomcat内存马 https://github.com/ce-automne/TomcatMemShell TomcatMemShell
Memory WebShell Generator https://github.com/hosch3n/msmap msmap
用于生成各类免杀webshell https://github.com/cseroad/Webshell_Generate Webshell_Generate
该工具易于使用,它生成自己的 PowerShell 有效负载并支持加密 (ssl)。 https://github.com/t3l3machus/hoaxshell hoaxshell
cs4.4修改去特征狗狗版(美化ui,去除特征,自带bypass核晶截图等..) https://github.com/TryGOTry/DogCs4.4/tree/dogcs_v2.1 dogcs

提权项目

项目简介 项目地址 项目名称
Linux自动提权 https://github.com/liamg/traitor traitor

内网收集工具

项目简介 项目地址 项目名称
Fscan 一款内网综合扫描工具,方便一键自动化、全方位漏扫扫描。 https://github.com/shadow1ng/fscan fscan
一款快速探测内网主机信息工具(深信服深蓝实验室天威战队强力驱动) https://github.com/shmilylty/SharpHostInfo SharpHostInfo
一款快速探测内网可达网段工具(深信服深蓝实验室天威战队强力驱动) https://github.com/shmilylty/netspy netspy
ATAttack是一款后渗透半自动化侦察工具,它从进攻性和防御性安全角度执行许多面向安全性的主机调查“安全检查”。 https://github.com/c1y2m3/ATAttack ATAttack

域渗透工具

项目简介 项目地址 项目名称
检测域环境内,域机器的本地管理组成员是否存在弱口令和通用口令,对域用户的权限分配以及域内委派查询 https://github.com/0x727/ShuiYing_0x727 SchTask_0x727
一款域渗透扫描工具,方便一键自动化、全方位的信息收集及扫描域提权漏洞。支持常见的域信息收集、Zerologon、Nopac、Spooler、MS17010扫描等功能。 https://github.com/lele8/mscan mscan
一个强大的内网域渗透提权分析工具,构建于 Linkurious 之上 https://github.com/BloodHoundAD/BloodHound BloodHound

横向移动工具

项目简介 项目地址 项目名称
Fscan 一款内网综合扫描工具,方便一键自动化、全方位漏扫扫描。 https://github.com/shadow1ng/fscan fscan
Ladon一款用于大型网络渗透的多线程插件化综合扫描神器 https://github.com/k8gege/Ladon Ladon
可针对指定IP段、资产清单、存活网段自动化进行端口扫描以及TCP指纹识别和Banner抓取 https://github.com/lcvvvv/kscan kscan
sharpwmi基于rpc的横向移动工具,具有上传和执行命令功能 https://github.com/QAX-A-Team/sharpwmi sharpwmi
常见横向移动与域控权限维持方法 https://xz.aliyun.com/t/9382 方法论
一款比较好的CS后渗透模块插件 https://github.com/pandasec888/taowu-cobalt-strike taowu-cobalt-strike
一款CS后渗透模块插件,让大家使用一款插件就够了 https://github.com/d3ckx1/OLa OLa
绕过虚拟机登录验证屏幕的工具 https://github.com/hzphreak/VMInjector VMInjector
WMIHACKER是一款免杀横向渗透远程命令执行工具。 https://github.com/rootclay/WMIHACKER WMIHACKER

密码提取工具

项目简介 项目地址 项目名称
Mimikatz Windows 密码抓取神器 https://github.com/gentilkiwi/mimikatz mimikatz
各种密码提取 https://github.com/kerbyj/goLazagne goLazagne
用于读取常用程序密码,如Navicat、TeamViewer、FileZilla、WinSCP等 https://github.com/RowTeam/SharpDecryptPwd SharpDecryptPwd
Xshell,Xftp密码解密工具 https://github.com/JDArmy/SharpXDecrypt SharpXDecrypt
解密浏览器数据(密码|历史记录|Cookie|书签 | 信用卡 | 下载记录)的导出工具,支持全平台主流浏览器。 https://github.com/moonD4rk/HackBrowserData/ HackBrowserData
一款针对向日葵的识别码和验证码提取工具 https://github.com/wafinfo/Sunflower_get_Password Sunflower_get_Password
一键辅助抓取360安全浏览器密码的CobaltStrike脚本以及解密小工具 https://github.com/hayasec/360SafeBrowsergetpass 360SafeBrowsergetpass
BrowserGhost 抓取浏览器密码的工具 https://github.com/QAX-A-Team/BrowserGhost BrowserGhost
win-brute-logon 无需权限破解任何 Microsoft Windows 用户密码 https://github.com/DarkCoderSc/win-brute-logon win-brute-logon
TeamViewer:Bypass杀软 获取 Teamview 密码的工具 https://github.com/wafinfo/TeamViewer TeamViewer
Xdecrypt Xshell Xftp 密码解密 https://github.com/dzxs/Xdecrypt Xdecrypt
微信客户端取证,可获取用户个人信息(昵称/账号/手机/邮箱/数据库密钥(用来解密聊天记录));支持获取多用户信息 https://github.com/AdminTest0/SharpWxDump SharpWxDump
FakeLogonScreen 是一个伪造 Windows 登录屏幕以获取用户密码的实用程序。输入的密码将根据 Active Directory 或本地计算机进行验证,以确保其正确,然后显示到控制台或保存到磁盘。 https://github.com/bitsadmin/fakelogonscreen fakelogonscreen

隧道代理工具

项目简介 项目地址 项目名称
全平台代理工具,支持多种socks协议 https://www.proxifier.com/ proxifier
专注于内网穿透的高性能的反向代理应用 https://github.com/fatedier/frp frp
轻量级、高性能、功能强大的内网穿透代理服务器 https://github.com/ehang-io/nps nps
改进的reGeorg版本 https://github.com/L-codes/Neo-reGeorg Neo-reGeorg
是一款利用dns协议传输tcp数据的工具 https://github.com/alex-sector/dns2tcp dns2tcp
是一个DNS隧道工具 https://github.com/iagox86/dnscat2 dnscat2
内网渗透代理、端口转发工具 http://rootkiter.com/Termite/ Termite
一个简单的 reverse ICMP shell https://github.com/inquisb/icmpsh icmpsh
正/反向代理,内网穿透,端口转发 https://github.com/inconshreveable/ngrok ngrok
pingtunnel 是把 tcp/udp/sock5 流量伪装成 icmp 流量进行转发的工具 https://github.com/esrrhs/pingtunnel pingtunnel
pystinger - 一款使用webshell进行流量转发的出网工具 https://github.com/FunnyWolf/pystinger pystinger
goproxy 一款轻量级、功能强大、高性能的多种代理工具 https://github.com/snail007/goproxy goproxy
一款可以在不出网的环境下进行反向代理及cs上线的工具 https://github.com/Daybr4ak/C2ReverseProxy C2ReverseProxy
跨平台重构了Cobaltstrike Beacon,目前实现的功能具备免杀性,可过Defender、360核晶、卡巴斯基(除内存操作外,如注入原生cs的dll)、火绒 https://github.com/H4de5-7/geacon_pro geacon_pro
类似于cs https://github.com/t3l3machus/Villain Villain

优秀免杀项目

项目简介 项目地址 项目名称
TideSec团队整理的远控免杀系列文章及配套工具,汇总测试了互联网上的几十种免杀工具。 https://github.com/TideSec/BypassAntiVirus BypassAntiVirus
跟杀软和免杀有关的资料,当前包括200+工具和1300+文章 –Thanks:小雨 https://github.com/alphaSeclab/anti-av anti-av
用于快速生成免杀的 EXE 可执行文件,目前拥有三种免杀方法。 https://github.com/lengjibo/FourEye FourEye
掩日 - 免杀执行器生成工具 用于快速生成免杀的 EXE 可执行文件 https://github.com/1y0n/AV_Evasion_Tool AV_Evasion_Tool
自动化生成 EDR 软件 Bypass Payload 的工具,一键化签名免杀 https://github.com/optiv/ScareCrow ScareCrow
梅花K战队写的Nim一键免杀源码 使用nim语言进行shellcode加载 https://github.com/M-Kings/BypassAv-web BypassAv-web
CS免杀,包括python版\C版本\GO版本\powershell版本 https://github.com/Gality369/CS-Loader CS-Loader
绕3环的shellcode免杀框架 https://github.com/mai1zhi2/ShellCodeFramework ShellCodeFramework
生成完美Powershell Payload的自动化工具 https://github.com/GetRektBoy724/MeterPwrShell MeterPwrShell
js免杀shellcode,绕过杀毒添加自启动 https://github.com/Hzllaga/JsLoader JsLoader
PowerShell 模糊脚本 使用字符串替换和变量串联 Bypass 常见的检测签名 https://github.com/tokyoneon/Chimera Chimera
一款利用加载器以及Python反序列化绕过AV的在线免杀工具 https://github.com/yhy0/AVByPass AVByPass
绕过专业工具检测的Webshell研究文章和免杀的Webshell源码 https://github.com/LandGrey/webshell-detect-bypass webshell-detect-bypass
一种创建欺骗代码的证书签名工具以及对二进制文件和DLL文件进行签名的工具 https://github.com/Tylous/Limelighter Limelighter
Cobalt Strike插件,用于快速生成免杀的可执行文件 https://github.com/hack2fun/BypassAV BypassAV
无落地文件的 Windows 证书导入导出工具 https://github.com/TheWover/CertStealer CertStealer
通过阻止入口点执行来绕过EDR主动防御的DLL https://github.com/CCob/SharpBlock SharpBlock
在线免杀平台 http://bypass.tidesec.com/web/ 在线免杀平台

权限维持工具

项目简介 项目地址 项目名称
创建隐藏计划任务,权限维持,Bypass AV https://github.com/0x727/SchTask_0x727 SchTask_0x727
进行克隆用户、添加用户等账户防护安全检测的轻巧工具 https://github.com/0x727/CloneX_0x727 CloneX_0x727

运维&甲方&防守方工具

Linux应急响应工具

项目简介 项目地址 项目名称
主机侧Checklist的自动全面化检测脚本 https://github.com/grayddq/GScan Gscan
应急响应实战笔记,一个安全工程师的自我修养 https://github.com/Bypass007/Emergency-Response-Notes Bypass007
linux信息收集/应急响应/常见后门/挖矿检测/webshell检测脚本 https://github.com/al0ne/LinuxCheck LinuxCheck
uroboros-一个GNU/Linux监视和概要分析工具,专注于单个进程 https://github.com/evilsocket/uroboros uroboros
whohk linux下一款强大的应急响应工具 https://github.com/heikanet/whohk whohk
Malwoverview 是用于威胁搜寻的第一响应工具 https://github.com/alexandreborges/malwoverview malwoverview
Rootkit Hunter Rootkit猎手 http://rkhunter.sourceforge.net/ Rootkitr

Windows应急响应工具

项目简介 项目地址 项目名称
一个类似于PChunter的多功能分析工具(PChunter已无法适用于最新版windwos) https://github.com/ClownQq/YDArk/ YDArk
包含一系列免费的系统分析工具,如Process Explorer、启动项分析工具 AutoRuns等。 https://docs.microsoft.com/zh-cn/sysinternals/downloads/ SysinternalsSuite
一个免费,功能强大的多功能工具,可帮助您监视系统资源,调试软件和检测恶意软件。 https://processhacker.sourceforge.io/ Process Hacker
微软公司出品的日志分析工具,它功能强大,使用简单。 https://www.microsoft.com/en-us/download/details.aspx?id=24659 Log Parser
火麒麟-网络安全应急响应工具(系统痕迹采集) https://github.com/MountCloud/FireKylin FireKylin
APT-Hunter Windows日志事件应急工具 https://github.com/ahmedkhlief/APT-Hunter APT-Hunter
webshell查杀工具 http://www.shelldetector.com/ Web Shell Detector
河马webshell查杀 https://www.shellpub.com/ 河马webshell
日志分析库,nuclei 的另一种用法 https://github.com/ffffffff0x/LOG-HUB LOG-HUB

内存马查杀工具

项目简介 项目地址 项目名称
Alibaba Java诊断利器Arthas https://github.com/alibaba/arthas arthas
检测绝大部分所谓的内存免杀马 https://github.com/huoji120/DuckMemoryScan DuckMemoryScan
通过jsp脚本扫描java web Filter/Servlet型内存马 https://github.com/c0ny1/java-memshell-scanner java-memshell-scanner
A java memory web shell extracting tool https://github.com/LandGrey/copagent copagent
杀内存马的小工具 https://github.com/r00t4dm/aLIEz aLIEz

xxxx

项目简介 项目地址 项目名称
一款基于 IP 信誉度信息实现的实时检测 Web 恶意流量的工具 https://github.com/CRED-CLUB/ARTIF ARTIF
勒索病毒解密工具汇总 https://github.com/jiansiting/Decryption-Tools/ Decryption-Tools
Shiro-Cookie解密小工具 https://github.com/r00tuser111/SerializationDumper-Shiro SerializationDumper-Shiro

溯源反制工具

项目简介 项目地址 项目名称
伪造Myslq服务端,并利用Mysql逻辑漏洞来获取客户端的任意文件反击攻击者 https://github.com/BeichenDream/MysqlT MysqlT
检测目标Mysql数据库是不是蜜罐 https://github.com/BeichenDream/WhetherMysqlSham WhetherMysqlSham
安全、快捷、高交互、企业级的蜜罐管理系统,护网;支持多种协议蜜罐、蜜签、诱饵等功能。 https://github.com/seccome/Ehoney Ehoney

安全资料整理

红蓝资料集锦

项目简介 项目地址 项目名称
红蓝对抗以及护网相关工具和资料,内存shellcode(cs+msf)和内存马查杀工具 https://github.com/Mr-xn/RedTeam_BlueTeam_HW RedTeam_BlueTeam_HW

云安全资料

项目简介 项目地址 项目名称
也许这是国内第一个云安全知识文库 https://wiki.teamssix.com/About/ T Wiki
从零开始的Kubernetes攻防 https://github.com/neargle/my-re0-k8s-security my-re0-k8s-security
六大云存储,泄露利用检测工具 https://github.com/UzJu/Cloud-Bucket-Leak-Detection-Tools Cloud-Bucket-Leak-Detection-Tools
云环境利用框架 Cloud Exploitation Framework 方便红队人员在获得 AK 的后续工作 https://github.com/teamssix/cf cf

靶场清单

通用漏洞类:

项目简介 项目地址 项目名称
在线靶场 https://hackmyvm.eu/anon/ hackmyvm
Vulfocus 是一个漏洞集成平台,将漏洞环境 docker 镜像,放入即可使用,开箱即用。 https://github.com/fofapro/vulfocus vulfocus
基于 Docker-Compose 的预建易受攻击环境 https://github.com/vulhub/vulhub vulhub
Spring Boot 相关漏洞学习资料,利用方法和技巧合 https://github.com/LandGrey/SpringBootVulExploit SpringBootVulExploit

基础漏洞类:

项目简介 项目地址 项目名称
基础漏洞靶场 https://dvwa.co.uk/ dvwa
常见的web漏洞 https://www.pentesterlab.com/exercises/web_for_pentester/course pentesterlab
Java漏洞平台 https://github.com/j3ers3/Hello-Java-Sec Hello-Java-Sec
JAVA 漏洞靶场 https://github.com/tangxiaofeng7/SecExample SecExample
一个想帮你总结所有类型的上传漏洞的靶场 https://github.com/c0ny1/upload-labs upload-labs
SQLI 实验室测试基于错误、基于布尔值、基于时间。 https://github.com/Audi-1/sqli-labs sqli-labs
一个包含php,java,python,C#等各种语言版本的XXE漏洞Demo https://github.com/c0ny1/xxe-lab xxe-lab

基础设施及环境搭建

项目简介 项目地址 项目名称
红/蓝队环境自动化部署工具 https://github.com/ffffffff0x/f8x f8x
Frps 一键安装脚本&管理脚本 https://github.com/MvsCode/frps-onekey frps-onekey
修改frp支持域前置与配置文件自删除 https://github.com/uknowsec/frpModify frpModify
一款功能强大的代理检查和IP地址轮转工具 https://github.com/kitabisa/mubeng mubeng
利用fofa搜索socks5开放代理进行代理池轮切的工具 https://github.com/akkuman/rotateproxy rotateproxy
利用IP地址池进行自动切换Http代理,防止IP封禁。 https://github.com/Mustard404/Auto_proxy Auto_proxy
命令行全局代理–跨平台通用 https://github.com/rofl0r/proxychains-ng proxychains-ng
Python爬虫代理IP池(proxy pool) https://github.com/jhao104/proxy_pool proxy_pool

正在整理中………………


1. 安装系统

  • 下载镜像并制作系统启动U盘,推荐使用 Ventoy(能够兼容多个系统镜像,能制作多个系统的启动盘)

    • 用法非常简单,下载Ventoy后打开Ventoy2Disk.exe,选择U盘格式化.
    • 下载镜像,然后直接把iso拖进去.
  • 显卡驱动参考Manjaro WiKi的解决方案.

2.pacman(yay)安装删除命令

有什么问题或者需要查找安装包可以自行搜索archlinux官网

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
su # 如果已经在root环境下则不用提权

# 常用安装删除指令一览
pacman -S XXXXX
# 安装XXXXX

pacman -R XXXXX
# 删除XXXXX(Remove)(保留依赖的包)

pacman -Rs XXXXX
# 删除XXXXX以及其依赖的包(诛灭九族)

pacman -U XXXXX
# 安装自己下载的XXXXX包(taz.gz)

pacman -Sc
# 清理未安装的包文件

3.配置

给manjaro换上国内源

1
2
# 手动选择源
sudo pacman-mirrors -i -c China -m rank

添加cn arch源

1
2
3
4
5
6
7
8
sudo nano /etc/pacman.conf

#末尾输入以下内容(需要其它的arch源自行百度)
[archlinuxcn]
SigLevel = Optional TrustedOnly
Server = http://mirrors.163.com/archlinux-cn/$arch
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/$arch

清理pacman更新缓存

1
sudo pacman -Scc

更新系统

1
sudo pacman -Syyu

系统更新完成后安装archlinuxcn-keyring包导入GPG key

1
sudo pacman -S archlinuxcn-keyring

4.安装工具

安装base-devel,一个非常重要的基础库。

这个基础包必须安装,否则我们在使用yay安装AUR软件的时候经常会遇到安装不上的问题。

1
sudo pacman -S base-devel

安装包管理器

Manjaro背靠Arch软件仓库,仓库又全又新,基本上遇不到依赖问题需要手动去搜该怎么安装

yay是一个用Go语言写的一个AUR助手,有些时候官方仓库没有你想要的软件,就需要通过yay来安装

1
sudo pacman -S yay

vim编辑工具

1
sudo pacman -S vim         # vim编辑器永远的神

5.双系统时间同步(单系统跳过)

硬件时间and系统时间
这2个时间不是同步的!如果有一天发现系统的时间不对了,可以分别看看这2个时间。硬件时间写在BIOS里,系统时间就是电脑显示的时间了。
这个显示的是硬件时间。

方法一

使用ntpdate同步网络时间后可以将时间写入到BIOS:

1
2
3
4
5
6
7
8
#同步网络时间:
sudo ntpdate time.windows.com

#写入BIOS:
sudo hwclock -w

#查看时间
sudo hwclock -r

方法二

产生原因:
Windows 将本地硬件时间作为设定时区(如 UTC+8)的区时,而 Linux 默认将其作为 UTC 时间。

解决方式:
让 Manjaro 不要将其作为 UTC 时间:

1
sudo timedatectl set-local-rtc 1

方法三

按照 Arch WiKi 的建议,这里修改Windows系统的注册表:

以管理员方式打开PowerShell,输入

1
2
#如果你的WIndows是32位的,把上述代码中的REG_QWORD改成REG_DWORD
reg add "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation" /v RealTimeIsUniversal /d 1 /t REG_QWORD /f

同时禁用Windows的自动同步时间功能

6.安装输入法

Fcitx5 官方文档
中文及日文输入法均体验良好。

1
2
3
4
5
6
sudo pacman -S fcitx5-im #基础包组
sudo pacman -S fcitx5-chinese-addons #官方中文输入引擎
sudo pacman -S fcitx5-anthy #日文输入引擎
yay -S fcitx5-pinyin-moegirl #萌娘百科词库 由于中国大陆政府对github封锁,你可能在此卡住。如卡住,可根据后文设置好代理后再安装
sudo pacman -S fcitx5-pinyin-zhwiki #中文维基百科词库
sudo pacman -S fcitx5-material-color #主题

设置环境变量 编辑文件 sudo vim /etc/environment 加入以下内容。konsole 以及 dolphin 都需要这些环境变量,倒是 chrome 和 firefox 都不需要就可以输入中文

1
2
3
4
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx

7.字体

windows/Mac字体参考

字体下载地址(推荐安装JetBrainsMono。中心需要显示icon之类的需要nerd补丁的字体)

不用命令行可以进文件管理器里面解压,然后全选字体右键安装

1
2
3
mkdir -p ~/.local/share/fonts
cp -vr JetBrainsMono/ ~/.local/share/fonts
fc-cache -vf

8.配置ohmyzsh

项目拉下来进行安装

1
2
git clone https://github.com/ohmyzsh/ohmyzsh.git
sh ohmyzsh/tools/install.sh

安装zsh-syntax-highlighting:提供命令高亮

1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

安装autosuggestions:记住你之前使用过的命令

1
git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

安装autojump: 目录快捷跳转

1
yay -S autojump

启用所有插件

1
nano ~/.zshrc

修改plugins=(git):

这个sudo是ohmyzsh自带的插件,功能是在你输入的命令的开头添加sudo ,方法是双击Esc

extract也是自带插件,不用再去记不同文件的解压命令,方法是extract +你要解压的文件名

1
plugins=(git autojump zsh-syntax-highlighting zsh-autosuggestions extract sudo)

究极自定义的zsh主题,参见

我这里使用的是p10k主题

1
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

修改使用的主题

将ZSH_THEME的值更改为powerlevel10k/powerlevel10k

1
nano ~/.zshrc

仅仅安装 powerlevel10k 是不够的,你还需要一个能够满足它的字体,包括各种特殊字符和图标(如上图)等,网络中使用最多的是 Hack Nerd Font 。
字体官网链接:https://nerdfonts.com/

截图

完成后重启终端或者执行

1
source ~/.zshrc

9.美化GRUB(自定义开机动画)

  • Gnome-look 找自己喜欢的grub主题,下载

  • 解压后进入目录,有一个子目录和两个sh文件,只需要把子目录copy到

    1
    cp -r 子目录名 /usr/share/grub/themes/
  • 编辑

    1
    2
    3
    4
    vim /etc/default/grub

    #添加下面这行参数
    GRUB_THEME="/usr/share/grub/themes/子目录名/theme.txt"
  • 重新生成一次grub.cfg

    1
    grub-mkconfig -o /boot/grub/grub.cfg

10.安装dock,类似mac的任务栏

安装latte-dock

1
yay -S latte-dock

启动latte-dock,下方就会出现一个dock栏,具体配置看自己爱好

移除那个时钟的方法:右键 配置lattedock 然后右键 那个时钟 移除

11.常用软件

1
2
3
4
5
6
7
8
9
10
11
12
#微信
yay -S deepin-wine-wechat

#QQ
yay -S deepin-wine-qq

#chrome浏览器
yay -S google-chrome

#网易云音乐
yay -S netease-cloud-music

12.下面是wine的安装和一些问题的解决办法

1)wine安装(有需要则安装)

安装wine

其中wine_gecko和wine-mono分别用于运行依赖于Internet Explorer和.NET的程序

1
yay -S wine wine_gecko wine-mono

创建32位、64位容器

1
2
WINEARCH=win32 WINEPREFIX=~/.win32 winecfg
WINEARCH=win64 WINEPREFIX=~/.win64 winecfg

字体设置

保存以下内容到zh.reg文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"

添加到注册表

1
regedit zh.reg

从自己的Windows下 Windows/Fonts 下找到simsun.ttc复制到 /home/user/.wine/drive_c/windows/fonts 里

2)wine软件桌面快捷方式创建

Wine安装应用时一般会添加这个菜单,如果没有的话可以在~/.local/share/applications/wine/下新建目录和.desktop文件,按[Desktop Entry]的格式自行设置

1
2
3
4
5
6
7
8
[Desktop Entry]
Name=WeChat
Exec=env WINEPREFIX="/home/zbg/.wine" wine C:\\\\windows\\\\command\\\\start.exe /Unix /home/zbg/.wine/dosdevices/c:/ProgramData/Microsoft/Windows/Start\\ Menu/Programs/WeChat/WeChat.lnk
Type=Application
StartupNotify=true
Path=/home/zbg/.wine/dosdevices/c:/Program Files (x86)/Tencent/WeChat
Icon=06F2_WeChat.0
StartupWMClass=wechat.exe

如果提示Cannot find the fakeroot binary相关错误则需要重新安装base-devel

1
sudo pacman -S base-devel

3)wine安装exe

安装并运行winetricks

wine的辅助工具,比如添加dll等

1
2
3
yay -S winetricks

winetricks

执行后会打开弹出,选中默认wine容器

截图

选择需要的选项,这里选择dll安装

截图

4)用户文件夹名称为英文

先去手动修改文件夹名称,然后在 设置 -> 应用程序 -> 地点 这修改

截图

5)qq、微信打不开

Manjaro-kde桌面安装TIM/QQ的时候经常出现无法启动,其主要原因是deein-wine-tim打包了Gnome桌面部分内容,因此在KDE桌面环境下需要安装相应的Gnome桌面设置环境

1
sudo pacman -S gnome-settings-daemon

介绍

Termux和Linux Deploy等应用app可以在proot、chroot容器上部署linux。

这里介绍一下proot和chroot:

  • PRoot 是一个 chroot, mount –bind, 和 binfmt_misc 的用户空间实现。这意味着,用户不需要任何特殊权限和设置就可以使用任意目录作为新的根文件系统或者通过QEMU运行为其它CPU架构构建的程序。

    PRoot 通过伪造系统调用的参数和返回值,可以使程序看起来像运行在root用户下,但它并不提供任何方法来真正的提权。确实需要root权限去修改内核或硬件状态的程序将无法工作。

  • chroot,即 change root directory (更改 root 目录),为了进一步提高系统的安全性,Linux引入了chroot机制,chroot是一个系统调用,可以更改一个进程所能看到的根目录。类似创建一个沙盒,进程运行在沙盒之内,进程运行正常与否,并不会影响这个台器的其他进程。

比较 PRoot 与 chroot

chroot和PRoot的一个主要区别是chroot是原生的。PRoot通过使用 ptrace() 劫持系统调用参数和返回值来伪造文件系统布局和用户/组ID。chroot不造成额外的开销,在任何设备上都不会出现问题,但是它需要root权限。

如果你有root过的设备并且希望在Termux中更好的使用Linux发行版,那么请使用chroot。这种情况可以尝试使用 Linux Deploy 这个应用以自动安装Linux发行版。

接下开始介绍Termux和Linux Deploy怎么部署Linux

Termux

使用tetmux不需要root

第一次用这个软件建议先pkg update后再把源换成国内的,具体步骤可自行百度

Termux 在安装好 proot 的情况下,是可以运行 Linux 系统的,利用这个原理,github有大佬写出了 Termux 一键安装 Linux 脚本

项目地址: https://github.com/sqlsec/termux-install-linux

具体安装脚本流程:https://www.sqlsec.com/2020/04/termuxlinux.html#Fedora

Linux Deploy

Linux Deploy是一款可以在Android设备上部署Linux环境的应用,其原理大概是在Android的Linux层跑一个chroot或者proot容器,然后再在容器中运行我们准备好的另外一个Linux系统。值得注意的是,这与我们熟知的虚拟机技术不同,新的Linux系统将和Android系统平行运行(非专业解释不要深究)。

在使用Linux Deploy之前,我们需要获取手机的Root权限(必须),获取Root权限后,由于原机自带的Linux命令集不完整,我们需要安装Busybox来扩充Linux命令集(不安装也可以)。

准备工作

.一台安卓设备(旧手机)

设备硬件要求:建议RAM在1G及以上,手机ROM空闲容量4G左右

设备软件要求:建议安卓版本4.0以上,系统必须是拥有ROOT系统权限的

(我用的是小米mix2s 安卓10)

安装需要的软件

  • Linux Deploy

  • BusyBox

    BusyBox 是一个开源项目,它提供了大约 400 个常见 UNIX/Linux 命令的精简实现。

    BusyBox 是 GNU Coreutils 的绝佳替代品,特别是在操作系统的小尺寸很重要的情况下。

    可以选择不安装,但建议安装

  • JuiceSSH

    一个免费的SSH连接软件

  • 有需要的图形化桌面的可以再安装个VNC viewer

juicessh和VNC我放的是官网的链接,下载需要魔法,没魔法的可以去找资源,实在找不到的可以在下面评论给我留言

busybox的设置

安装路径不改,因为这个路径我们在linux deploy软件的设置中有一个环境变量的选项,就是填入这个,然后更新环境变量,安装组件和替换组件勾选

2564615615

回到主页点击安装,安装完成以后查看安装信息,显示下面的就是安装完成,现在手机基本都是aarch64,也就是arm64的

9846131

如果安装busybox失败,另一种安装方式

上面直接用apk来安装busybox一般来说没有出现fail都是成功了,但我就是出现fail,安装失败了,然后我就用另一种安装方式了

1.下载BusyBox的binary

我旧手机mix2s的骁龙845支持armv7l,所有我下载了arm71

下载了之后找到它,改名为 busybox

2.把busybox移动到手机的/system/xbin

我用宿主机操作,已经下载了adb shell

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
root@ubuntu:~# adb shell
ploris:/$ su
#把根目录挂载成可读可写模式
ploris:/# mount -o rw,remount,rw /system

#如果以上命令出现错误提示“Operation not permitted”,则需要先执行以下命令,禁用SELinux:
ploris:/# setenforce 0

ploris:/# mkdir /system/xbin
ploris:/# cp /sdcard/busybox /system/xbin

#把根目录重新挂载成只读模式
ploris:/# mount -o remount,ro /

#(要注意,尾部的那个点也是命令内容,表示安装在当前目录)
ploris:/system/xbin# busybox --install .

linux deploy的设置

在左上角三个横杠打开设置

打勾三个的都点亮,正式运行的时候屏幕黑掉之后,后天运行会非常卡,建议点亮

165161681

开机自动启动根据自己的需求设置,其它的默认就好

1587646427613234

PATH变量填入安装BusyBox的路径,这个很重要

在这里插入图片描述

telnet这个可以开一下,ssh连不上可以用telnet连接

在这里插入图片描述

然后在右下角停止旁边的三个横杠打开配置

安装类型默认的是镜像文件,我选择的是目录,安装完成以后能和手机共享磁盘空间

选择镜像安装的要注意镜像大小要分配2G以上,或者直接10240M

配置源地址方式有两种,一种是在线安装,另一种是tar包安装

在线安装

img

tar包安装

tar打包linux具体可看我另一篇制作rootfs的博客,这里安装类型也建议改为目录

img

其它配置

本地化选择中文包就可以了

在这里插入图片描述

sdcard挂载到根系统img

启用SSH打勾,建议更改SSH的端口,例如7777,8888,22端口可能会在手机上被别的服务占用,SSH可能会连接不上

图形界面有需求可选择打勾安装

img

这样就配置完成了

安装

245614151

configuring extra/ssh 没有fail

<<<deploy

说明安装完成

824641148

安装完成后一定要先点停止后再点启动!!!

不然直接点启动又会重新安装一遍。

用JuiceSSH连接

用SSH连接时注意你配置时有没有更改端口

562411

使用debootstrap构建制作aarch64/arm64 Debian rootfs文件系统

1.宿主机软件安装

PC端宿主机使用的系统为Ubuntu22.04 amd64,在制作debian10系统之前,需要安装制作系统所需要的一些工具软件。

1
root@ubuntu:~# apt-get install apt-transport-https qemu qemu-user-static qemu-system-arm binfmt-support debootstrap
  • qemu-system-arm 用于模拟arm架构的设备,在此平台上进行debian系统的运行演示。

  • debootstrap 构建debian基本文件子系统的工具。

  • qemu-user-static 在PC端非arm架构的ubuntu系统上,需要借助于qemu-arm-static工具来模拟arm环境安才可以安装arm架构下所需要的软件。

2.使用debootstrap工具下载debian文件系统

1
root@ubuntu:~# debootstrap --arch=arm64 --variant=minbase --include=whiptail,ca-certificates,tzdata --foreign buster rootfs http://mirrors.ustc.edu.cn/debian/
  • –arch : 指定系统架构

  • –foreign :指定要下载的系统代号(debian-10 为 buster)

  • rootfs : 指定存放下载内容的目录

  • http://mirrors.ustc.edu.cn/debian :下载路径(此处使用的是国内中科大源)

  • –variant 说明

    • minbase: 只包含必要的包和apt;

    • buildd: 包含编译工具包

    • fakechroot: 包含不用root权限的包

    • scratchbox: 包含scratchbox(交叉编译工具链)相关包

3.复制qemu-arm-static到debian文件系统/usr/bin/目录

因为使用的宿主机是ubuntu18.04 amd64,所以需要使用qemu-arm-static来模拟arm环境,下载安装所需要的软件。

1
root@ubuntu:~# cp /usr/bin/qemu-arm-static rootfs/usr/bin/

4.执行第二阶段的下载

1
root@ubuntu:~# DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true LC_ALL=C LANG=zh_CN.UTF-8 chroot rootfs/ debootstrap/debootstrap --second-stage

设置环境变量,然后切换至文件系统存放目录,使用目录下的debootstrap/debootstrap命令,执行第二阶段的下载。等待几分钟后,命令执行完成,终端输出“I: Base system installed successfully.”即为系统下载完成。

5.换源

1
2
3
4
5
root@ubuntu:~# sed -i 's#http://deb.debian.org#http://mirrors.ustc.edu.cn#g' rootfs/etc/apt/sources.list

# 原始源

root@ubuntu:~# sed -i 's#http://ports.ubuntu.com#http://mirrors.ustc.edu.cn#g' rootfs/etc/apt/sources.list

6.配置网络信息

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
root@ubuntu:~# echo 'nameserver 192.168.2.1' > rootfs/etc/resolv.conf

root@ubuntu:~# mkdir rootfs/etc/netplan

root@ubuntu:~# cat > rootfs/etc/netplan/50-cloud-init.yaml <<EOF

network:

ethernets:

eth0:

dhcp4: no

addresses: [192.168.168.6/24]

gateway4: 192.168.168.1

nameservers:

addresses: [192.168.168.1]

version: 2

EOF

可选设置网络DHCP

1
2
3
4
5
6
7
cat > /etc/netplan/50-cloud-init.yaml <<EOF
network:
ethernets:
eth0:
dhcp4: yes
version: 2
EOF

7.配置系统信息

1
2
3
root@ubuntu:~# echo 'Debian10' > rootfs/etc/hostname
root@ubuntu:~# echo "127.0.0.1 localhost" > rootfs/etc/hosts
root@ubuntu:~# echo "127.0.0.1 Debian10" >> rootfs/etc/hosts

8.挂载本地设备文件到rootfs

1
2
3
4
root@ubuntu:~# mount -t proc /proc  rootfs/proc
root@ubuntu:~# mount -t sysfs /sys rootfs/sys
root@ubuntu:~# mount -o bind /dev rootfs/dev
root@ubuntu:~# mount -o bind /dev/pts rootfs/dev/pts

9.系统磁盘挂载配置

系统开机时会主动读取/etc/fstab这个文件中的内容,根据文件里面的配置挂载磁盘

1
2
3
4
5
root@ubuntu:~# vim rootfs/etc/fstab
#添加以下内容
# UNCONFIGURED FSTAB FOR BASE SYSTEM
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0

10.进入chroot rootfs 内配置

1
2
3
4
5
6
7
8
root@ubuntu:~# chroot rootfs

root@ubuntu:/# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

root@ubuntu:/# apt update && apt upgrade -y

root@ubuntu:/# apt install rsyslog udev dbus kmod openssh-server openssh-client netplan.io man vim wget net-tools sysstat tmux less wireless-regdb wireless-tools ethtool crda dosfstools parted sudo git iputils-ping systemd ifupdown iputils-ping htop wpasupplicant -y

需要工具链的可以执行以下命令

1
2
root@ubuntu:/# apt install gcc g++ -y #(或者选择buildd的包)
root@ubuntu:/# echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config

设置swap分区

1
2
3
4
5
6
7
8
9
10
root@ubuntu:/# dd if=/dev/zero of=/swapfile bs=1M count=16384 status=progress #创建16G的交换空间 大小根据需要自定

root@ubuntu:/# chmod 600 /swapfile #设置正确的权限

root@ubuntu:/# mkswap /swapfile #格式化swap文件

root@ubuntu:/# swapon /swapfile #启用swap文件

root@ubuntu:/# echo '/swapfile none swap defaults 0 0' >> /etc/fstab #向/etc/fstab 中追加该内容

如需要关闭swap和swap文件,则可以输入以下命令

1
2
3
sudo swapoff /swapfile
sudo rm /swapfile
sudo sed -i '/\/swapfile none swap defaults 0 0/d' /etc/fstab

11.最后的准备

如果需要添加用户,使用

1
2
#创建用户debian
root@ubuntu:/# useradd -m debian -g sudo -s /bin/bash -d /home/debian

设置密码,取消挂载,退出chroot

1
2
3
4
5
root@ubuntu:/# passwd root
root@ubuntu:/# umount /dev/pts/ /dev/ /proc/ /sys
root@ubuntu:/# exit
#退出后会变回进容器之前的用户
root@ubuntu:~#

12.打包rootfs

1
2
root@ubuntu:~# cd rootfs
root@ubuntu:~# tar -czvf debian_buster_arm64.tgz ./*

前言

一、JDK是什么?

1、JDK : Java Development ToolKit(Java开发工具包)。JDK是整个JAVA的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工具(javac/java/jdb等)和Java基础的类库(即Java API 包括rt.jar)。

最主流的JDK是Oracle公司发布的JDK,除了Oracle之外,还有很多公司和组织都开发了属于自己的JDK,例如国外IBM公司开发了属于自己的JDK,国内淘宝也开发了属于自己的JDK,各个组织开发自己的JDK都是为了在某些方面得到一些提高,以适应自己的需求,比如IBM的JDK据说运行效率就比Oralce的JDK高的多。但不管怎么说,我们还是需要先把基础的Oracle JDK掌握好。

2、JDK是java开发工具包,在其安装目录下面有五个文件夹、一些描述文件、一个src压缩文件。bin、lib、 jre这四个文件夹起作用。可以看出来JDK包含JRE,而JRE包含JVM。

·bin:最主要的是编译器(javac.exe)

·lib:类库(开发中需要使用到的一些jdk提供的一些类)

·jre:java运行环境(注意:这里的bin、lib文件夹和jre里的bin、lib是不同的)

· 总的来说JDK是用于java程序的开发,而jre则是只能运行class而没有编译的功能

3、JDK是提供给Java开发人员使用的,其中包含了java的开发工具,也包括了JRE。所以安装了JDK,就不用在单独安装JRE了。

二、jdk和jre的区别?

JRE顾名思义是java运行时环境,包含了java虚拟机,java基础类库。是使用java语言编写的程序运行所需要的软件环境,是提供给想运行java程序的用户使用的。

一句话: jre就是Java程序运行的环境。

Windows

jvms工具

需要用到一个工具jvms

jvms项目地址

打开项目,点击右边Releases,下载工具,我下载的是jvms_v2.1.3_amd64.zip

解压工具

解压到你想放置的盘里

例如我放到D盘下,重命名为jvms,路径为D:\jvms

在jvms文件夹里新建两个子文件夹store和download

image-20230517175753265

运行工具

然后以管理员身份运行cmd或者powershell

image-20230517175644642

初始化工具

输入以下命令来初始化jvms配置文件

用 D:\jvms\jvms.exe init –help 命令 在OPTIONS选项中可以看到设置的默认值

OPTIONS:
–java_home value the JAVA_HOME location (default: “C:\Program Files\jdk”)
–originalpath value the jdk download index file url. (default: “https://raw.githubusercontent.com/ystyle/jvms/new/jdkdlindex.json")

1
D:\jvms\jvms.exe init

下载JDK

因为是国内网,访问raw.githubusercontent.com一般都会连不上,这时候有两种方法解决

第一种方法:

raw.github的ip经常更换,所以我们先去查一下该网址IP,打开IP查询然后输入

1
raw.githubusercontent.com

在今天 2023/05/17 查询得有4个ipv4的地址

1
2
3
4
185.199.108.133
185.199.109.133
185.199.110.133
185.199.111.133

修改hosts文件

位置:C:\Windows\System32\drivers\etc\hosts

直接在最下面添加上面查到的随便一个IP,保存

1
185.199.108.133 raw.githubusercontent.com

我用这个方法偶尔可以偶尔又不行,我放弃了

第二种方法:

直接在搜索引擎搜github国内镜像站,找一找应该能找到能用的,我找到的https://kkgithub.com/,在今天2023/05/17 还能用

直接把原先的地址中的``raw.githubusercontent换成raw.kkgithub`就行

或者用cdn加速的github镜像仓库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#我没有用作者的集成的jdk下载链接,我自己写了一个ZuluJDK(一个OpenJDK的发行版本)的下载链接
jvms init --originalpath https://fastly.jsdelivr.net/gh/AienH/jvms@master/openjdk.json

#列出可供下载的可用 jdk 版本
jvms rls
#这个是列出的版本
1) 20.0.1
2) 19.0.2
3) 17.0.7
4) 13.0.14
5) 11.0.19
6) 8.0.372
7) 7.0.352
8) 6.0.119
9) 21.0.0-ea
10) OpenJDK8U-jdk_x64_windows_hotspot_8u372b07

use "jvm rls -a" show all the versions

For a complete list, visit https://fastly.jsdelivr.net/gh/AienH/jvms@master/openjdk.json

#下载JDK17和JDK11
jvms install 11.0.19
jvms install 17.0.7

#查看下载的jdk版本
jvms ls

下载完后在D:\jvms\store目录下能看到下载的几个不同版本的jdk,在D:\jvms\download目录看到jdk的源码包

配置JAVA

C:\Program Files目录下新建文件夹jdk

D:\jvms\store目录下的所有jdk版本复制到C:\Program Files\jdk目录下

然后切换想要使用的ava版本

1
2
#使用jdk17
jvms switch 17.0.7

测试环境是否成功

1
java --version

手动下载JDK包

不通过jvms install在线下载

直接把自己下载好的jdk包解压到D:\jvms\storeC:\Program Files\jdk目录下

例如:添加jdk 17.0.1

  1. 将 jdk 主文件夹复制到jvms/store
  2. 将文件夹重命名为17.0.1
  3. jvms list检查是否显示存在

前言

一、JDK是什么?

1、JDK : Java Development ToolKit(Java开发工具包)。JDK是整个JAVA的核心,包括了Java运行环境(Java Runtime Envirnment),一堆Java工具(javac/java/jdb等)和Java基础的类库(即Java API 包括rt.jar)。

最主流的JDK是Oracle公司发布的JDK,除了Oracle之外,还有很多公司和组织都开发了属于自己的JDK,例如国外IBM公司开发了属于自己的JDK,国内淘宝也开发了属于自己的JDK,各个组织开发自己的JDK都是为了在某些方面得到一些提高,以适应自己的需求,比如IBM的JDK据说运行效率就比Oralce的JDK高的多。但不管怎么说,我们还是需要先把基础的Oracle JDK掌握好。

2、JDK是java开发工具包,在其安装目录下面有五个文件夹、一些描述文件、一个src压缩文件。bin、lib、 jre这四个文件夹起作用。可以看出来JDK包含JRE,而JRE包含JVM。

·bin:最主要的是编译器(javac.exe)

·lib:类库(开发中需要使用到的一些jdk提供的一些类)

·jre:java运行环境(注意:这里的bin、lib文件夹和jre里的bin、lib是不同的)

· 总的来说JDK是用于java程序的开发,而jre则是只能运行class而没有编译的功能

3、JDK是提供给Java开发人员使用的,其中包含了java的开发工具,也包括了JRE。所以安装了JDK,就不用在单独安装JRE了。

二、jdk和jre的区别?

JRE顾名思义是java运行时环境,包含了java虚拟机,java基础类库。是使用java语言编写的程序运行所需要的软件环境,是提供给想运行java程序的用户使用的。

一句话: jre就是Java程序运行的环境。

Linux

1.包管理安装

1.1centos7

随意使用一条命令便可以查询到java的安装信息

1
2
3
root@centos:~#yum list installed | grep java

root@centos:~#rpm -qa | grep java

出现内容,表明你系统已经安装了java,如果安装的版本不适合将要搭建的服务环境,你就需要卸载掉。

1
root@centos:~#yum -y remove java-11-openjdk* #卸载所有java-11-openjdk

查看所有JDK版本

1
root@centos:~#yum search java | grep jdk

选择版本并安装(这里我安装的是java8)

1
root@centos:~#yum install -y java-1.8.0-openjdk*

检查jdk是否安装成功


1
root@ubuntu:~#java --version

注意这里是–version

1.2ubuntu

查询已安装java的信息

1
root@ubuntu:~#java -version

注意这里是-version

先卸载之前的版本

1
2
3
4
#之前安装过jdk11
root@ubuntu:~#apt remove openjdk-11-jdk

root@ubuntu:~#apt autoremove

查看所有JDK版本

1
root@ubuntu:~#apt search openjdk

选择版本并安装(这里我安装的是java8)

1
root@ubuntu:~#apt install -y openjdk-8-jdk

检查jdk是否安装成功


1
root@ubuntu:~#java -version

2.源码包安装

这里就和windows安装java差不多了,linux是下载压缩包后,解压完添加环境变量即可使用

winget给出了所有jdk的最新版本列表,winget查找JDK的网址==> whichjdk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
winget search OpenJDK
Name Id Version Match Source
---------------------------------------------------------------------------------------------------------
ojdkbuild OpenJDK JRE 8 ojdkbuild.ojdkbuild 1.8.3221.6 winget
Java SE Development Kit 18 Oracle.JDK.18 18.0.2.0 Tag: openjdk winget
Java SE Development Kit 17 Oracle.JDK.17 17.0.4.0 Tag: openjdk winget
ojdkbuild OpenJDK JRE 17 ojdkbuild.openjdk.17.jre 17.0030.6.1 Tag: openjdk winget
ojdkbuild OpenJDK 17 ojdkbuild.openjdk.17.jdk 17.0030.6.1 Tag: openjdk winget
OpenJDK JRE 11 ojdkbuild.openjdk.11.jre 11.0.15.1 Tag: openjdk winget
OpenJDK 11 ojdkbuild.openjdk.11.jdk 11.0.15.1 Tag: openjdk winget
Microsoft Build of OpenJDK with Hotspot 17 Microsoft.OpenJDK.17 17.0.4.8 Tag: openjdk winget
Microsoft Build of OpenJDK with Hotspot 16 Microsoft.OpenJDK.16 16.0.2.7 Tag: openjdk winget
Microsoft Build of OpenJDK with Hotspot 11 Microsoft.OpenJDK.11 11.0.16.8 Tag: openjdk winget
Eclipse Temurin JRE with Hotspot 8 EclipseAdoptium.TemurinJRE.8 8.0.322.9 Tag: openjdk winget
Eclipse Temurin JRE with Hotspot 18 EclipseAdoptium.TemurinJRE.18 18.0.1.10 Tag: openjdk winget
Eclipse Temurin JRE with Hotspot 17 EclipseAdoptium.TemurinJRE.17 17.0.4.8 Tag: openjdk winget
Eclipse Temurin JRE with Hotspot 11 EclipseAdoptium.TemurinJRE.11 11.0.16.8 Tag: openjdk winget
Liberica JDK 8 Full BellSoft.LibericaJDK.8.Full 8.0.342.7 Tag: openjdk winget
Liberica JDK 8 BellSoft.LibericaJDK.8 8.0.342.7 Tag: openjdk winget
Liberica JDK 18 Full BellSoft.LibericaJDK.18.Full 18.0.2.10 Tag: openjdk winget
Liberica JDK 18 BellSoft.LibericaJDK.18 18.0.2.10 Tag: openjdk winget
Liberica JDK 17 Full BellSoft.LibericaJDK.17.Full 17.0.4.8 Tag: openjdk winget
Liberica JDK 17 BellSoft.LibericaJDK.17 17.0.4.8 Tag: openjdk winget
Liberica JDK 16 Full BellSoft.LibericaJDK.16.Full 16.0.2.7 Tag: openjdk winget
Liberica JDK 16 BellSoft.LibericaJDK.16 16.0.2.7 Tag: openjdk winget
Liberica JDK 15 Full BellSoft.LibericaJDK.15.Full 15.0.2.10 Tag: openjdk winget
Liberica JDK 15 BellSoft.LibericaJDK.15 15.0.2.10 Tag: openjdk winget
Liberica JDK 14 Full BellSoft.LibericaJDK.14.Full 14.0.2.13 Tag: openjdk winget
Liberica JDK 14 BellSoft.LibericaJDK.14 14.0.2.13 Tag: openjdk winget
Liberica JDK 11 Full BellSoft.LibericaJDK.11.Full 11.0.16.8 Tag: openjdk winget
Liberica JDK 11 BellSoft.LibericaJDK.11 11.0.16.8 Tag: openjdk winget
Azul Zulu JDK 7 Azul.Zulu.7 7.56.0.11 Tag: openjdk winget
Azul Zulu JDK 6 Azul.Zulu.6 6.22.0.3 Tag: openjdk winget
AdoptOpenJDK JDK with Hotspot 8 AdoptOpenJDK.OpenJDK.8 8.0.292.10 Tag: openjdk winget
AdoptOpenJDK JDK with Hotspot 16 AdoptOpenJDK.OpenJDK.16 16.0.1.9 Tag: openjdk winget
AdoptOpenJDK JDK with Hotspot 15 AdoptOpenJDK.OpenJDK.15 15.0.2.7 Tag: openjdk winget
AdoptOpenJDK JDK with Hotspot 14 AdoptOpenJDK.OpenJDK.14 14.0.2.12 Tag: openjdk winget
AdoptOpenJDK JDK with Hotspot 11 AdoptOpenJDK.OpenJDK.11 11.0.11.9 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 8 EclipseAdoptium.Temurin.8.JDK 8.0.332.9 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 11 EclipseAdoptium.Temurin.11.JDK 11.0.16.8 Tag: openjdk winget
Azul Zulu JDK 17 Azul.Zulu.17.JDK 17.36.15 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 20 (Beta) EclipseAdoptium.Temurin.20.JDK 20.0.0.5 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 19 (Beta) EclipseAdoptium.Temurin.19.JDK 19.0.0.30 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 18 EclipseAdoptium.Temurin.18.JDK 18.0.2.9 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 17 EclipseAdoptium.Temurin.17.JDK 17.0.4.8 Tag: openjdk winget
Eclipse Temurin JDK with Hotspot 16 EclipseAdoptium.Temurin.16.JDK 16.0.2.7 Tag: openjdk winget
Azul Zulu JDK 18 Azul.Zulu.18.JDK 18.32.11 Tag: openjdk winget
Azul Zulu JDK 16 Azul.Zulu.16.JDK 16.32.15 Tag: openjdk winget
Azul Zulu JDK 15 Azul.Zulu.15.JDK 15.42.15 Tag: openjdk winget
Azul Zulu JDK 13 Azul.Zulu.13.JDK 13.50.15 Tag: openjdk winget
Azul Zulu JDK 11 Azul.Zulu.11.JDK 11.58.17 Tag: openjdk winget
Azul Zulu JDK 8 Azul.Zulu.8.JDK 8.64.0.15 Tag: openjdk winget
OpenJDK 14 ojdkbuild.openjdk.14.jdk 14.0.1.1 winget
OpenJDK 13 ojdkbuild.openjdk.13.jdk 13.0.3.1 winget
AdoptOpenJDK JDK with Eclipse OpenJ9 17 AdoptOpenJDK.OpenJDK.17 17.0.0.18 winget
Update Watcher for AdoptOpenJDK tushev.org.AJUpdateWatcher 2.0.4.0 winget

oracle官网下载Java压缩包

Java8:Java SE Development Kit 8 Downloads

image-20230404181515372

注册登录后即可获得下载链接,这里注意自己的系统是arm64还是amd64

也可使用ZuluJDK(一个OpenJDK的发行版本)

我arm64架构的系统试过安装多个这种版本的openjdk,会报错,所以我重新选择了oracle的jdk

1
root@ubuntu:~#wget https://cdn.azul.com/zulu/bin/zulu8.66.0.15-ca-jdk8.0.352-linux_x64.tar.gz

2.1创建一个存放源码包的目录并解压

1
2
3
4
root@ubuntu:~#mkdir /usr/local/JDK
root@ubuntu:~#cd /usr/local/JDK
root@ubuntu:~#tar -xvf jdk-8u361-linux-i586.tar.gz -C /usr/local/JDK
root@ubuntu:~# mv jdk1.8.0_361 jdk8

3.配置环境

3.1添加环境变量的两种方法:

适用于centos,ubuntu

1)vim /etc/profile

  • 推荐使用这种方法,因为所有用户的shell都有权使用这些环境变量,缺点是可能会给系统带来安全性问题。 这里是针对所有的用户的,所有的shell;
1
2
3
vim /etc/profile
# 使用source命令使修改立刻生效:
source /etc/profile

2)vi ~/.bashrc

修改.bashrc文件,这种方法更为安全,它可以把使用这些环境变量的权限控制到用户级别,这里是针对某一个特定的用户,如果需要给某个用户权限
使用这些环境变量,只需要修改其个人用户主目录下的.bashrc文件就可以了。

1
2
3
vi ~/.bashrc

source ~/.bashrc

3.2添加java环境变量

我用的是vi ~/.bashrc

1
2
3
4
5
6
7
8
9
10
11
12
root@ubuntu:~#vim ~/.bashrc

#然后在文本末端,加上这么几句
JAVA_HOME=/usr/local/JDK/jdk8 #安装java的路径,路径一定要对
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin/
export PATH JAVA_HOME CLASSSPATH


root@ubuntu:~#source ~/.bashrc

#执行java -version或java --version,到Java的版本号就成功了

4.切换java版本

  • 用包管理安装可能不是很全,没有自己需要的java版本,管理也不方便,所以一般都是用源码包方式来安装的多个版本的java

  • 不管理只使用的话也可以直接用包管理安装

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    root@Debian:~# apt search openjdk
    #比如我安装11和17
    root@Debian:~# apt install openjdk-11-jdk -y && apt install openjdk-17-jdk -y
    root@Debian:~# which java
    /usr/bin/java
    root@Debian:~# ls -l /usr/bin/java
    lrwxrwxrwx 1 root root 22 May 17 17:27 /usr/bin/java -> /etc/alternatives/java
    root@Debian:~# ls -l /etc/alternatives/java
    lrwxrwxrwx 1 root root 43 May 17 17:27 /etc/alternatives/java -> /usr/lib/jvm/java-11-openjdk-amd64/bin/java

    #用apt安装的不需要用update-alternatives --install 来添加链接,因为它自己会自动添加的
    root@Debian:~# update-alternatives --display java
    java - auto mode
    link best version is /usr/lib/jvm/java-17-openjdk-amd64/bin/java
    link currently points to /usr/lib/jvm/java-17-openjdk-amd64/bin/java
    link java is /usr/bin/java
    slave java.1.gz is /usr/share/man/man1/java.1.gz
    /usr/lib/jvm/java-11-openjdk-amd64/bin/java - priority 1111
    slave java.1.gz: /usr/lib/jvm/java-11-openjdk-amd64/man/man1/java.1.gz
    /usr/lib/jvm/java-17-openjdk-amd64/bin/java - priority 1711
    slave java.1.gz: /usr/lib/jvm/java-17-openjdk-amd64/man/man1/java.1.gz

    #切换java
    root@Debian:~# update-alternatives --config java

alternatives命令介绍

当我们频繁使用java的不同版本,不可能采用卸载java后在重新安装需要用的java的版本的方法,这时我们可以用到alternatives命令。

alternatives是Linux下的一个功能强大的命令。只能在root权限下执行。如系统中有几个命令功能十分类似,却又不能随意删除,那么可以用 alternatives 来指定一个全局的设置。
alternatives常用于同一个系统中安装同一软件的多个版本。比如为了开发需要,我需要安装JDK16,同时还需要JDK8,我怎么样才能忽略安装路径,按照我自己的意思,使用我想要的java版本呢?
命令格式:
update-alternatives [options] command

1
2
3
4
5
6
7
8
9
10
update-alternatives
用法:alternatives --install <链接> <名称> <路径> <优先度>
[--initscript <服务>]
[--slave <链接> <名称> <路径>]*
alternatives --remove <名称> <路径>
alternatives --auto <名称>
alternatives --config <名称>
alternatives --display <名称>
alternatives --set <名称> <路径>
alternatives --list

4.1使用方法

通过以下指令来看我们安装了多少openJDK

我的用到ubuntu,centos命令则把apt改为yum

1
root@ubuntu:~#apt list installed | grep jdk

在这里我又下载了一个jdk17,解压放到了/usr/local/JDK/目录下

先修改添加的java环境变量,修改为

1
2
3
4
5
#在这里添加你想切换的jdk版本,例如我在8和17之间切换,如需更多版本则将路径添加到JAVA_HOME中(冒号添加路径)
JAVA_HOME=/usr/local/JDK/jdk8:/usr/local/JDK/jdk17
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin/
export PATH JAVA_HOME CLASSSPATH

使配置生效

1
root@ubuntu:~# source ~/.bashrc

然后用update-alternatives –install 命令

1
2
3
4
5
6
7
8
root@ubuntu:~#update-alternatives --install /usr/bin/java java /usr/local/JDK/jdk8/bin/java 8

root@ubuntu:~#update-alternatives --install /usr/bin/javac javac /usr/local/JDK/jdk8/bin/javac 8

root@ubuntu:~#update-alternatives --install /usr/bin/java java /usr/local/JDK/jdk17/bin/java 17

root@ubuntu:~#update-alternatives --install /usr/bin/javac javac /usr/local/JDK/jdk17/bin/javac 17

–install 选项

使用语法:
update-alternatives –install link name path priority [–slave link name path]…
其中link为系统中功能相同软件的 公共链接目录,比如/usr/bin/java(需绝对目录);

name为命令链接符名称,如java;

path为你所要使用新命令、新软件的所在目录;

priority为优先级, 当命令链接已存在时,需高于当前值,因为当alternative为自动模式时,系统默认启用priority高的链接;

–slave为从alternative。

alternative有两种模式:auto和manual,默认都为auto模式,因为大多数情况下update-alternatives命令都被postinst (configure) or prerm (install)调用的,如果将其更改成手动的话安装脚本将不会更新它了。

切换java版本命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
root@ubuntu:~# update-alternatives --config java   #java是我设置的链接符名称
There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/local/JDK/jdk17/bin/java 17 auto mode
1 /usr/local/JDK/jdk8/bin/java 8 manual mode
2 /usr/local/JDK/jdk17/bin/java 17 manual mode


Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/local/JDK/jdk8 to provide /usr/local/JDK/ (java) in manual mode
update-alternatives: warning: not replacing /usr/local/JDK/ with a link
root@ubuntu:~# java -version
java version "1.8.0_361"
Java(TM) SE Runtime Environment (build 1.8.0_361-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.361-b09, mixed mode)

5.切换其它的环境(例如python)

其实切换其它的依赖环境也是可以的,例如debian内置python2和python3,我的默认使用python2,然后切换成python3

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@orangepi5:~# whereis python2
python2: /usr/bin/python2.7 /usr/bin/python2 /usr/lib/python2.7 /etc/python2.7 /usr/local/lib/python2.7 /usr/share/man/man1/python2.1.gz
root@orangepi5:~# whereis python3
python3: /usr/bin/python3.9-config /usr/bin/python3 /usr/bin/python3.9 /usr/lib/aarch64-linux-gnu/python3.9 /usr/lib/python3 /usr/lib/python3.9 /etc/python3 /etc/python3.9 /usr/local/lib/python3.9 /usr/include/python3.9 /usr/share/python3 /usr/share/man/man1/python3.1.gz


root@orangepi5:~# update-alternatives --install /usr/bin/python python /usr/bin/python2 100
root@orangepi5:~# update-alternatives --install /usr/bin/python python /usr/bin/python3 150
root@orangepi5:~# update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3 150 auto mode
1 /usr/bin/python2 100 manual mode
2 /usr/bin/python3 150 manual mode

Press <enter> to keep the current choice[*], or type selection number: 2


root@orangepi5:~# python --version

6.centos7中安装python3后使用yum命令报错解决办法

1
vi /usr/bin/yum

把第一行#! /usr/bin/python后面的python改成 python2保存退出

1
vi /usr/libexec/urlgrabber-ext-down

同样把第一行#! /usr/bin/python后面的python改成 python2保存退出

介绍

几种通过自己服务器实现内网穿透的教程

基于Docker的FRP内网穿透部署

服务器搭建(FRPS)

创建配置文件

1
2
3
4
# 创建存放目录
sudo mkdir /etc/frp
# 创建frps.ini文件
nano /etc/frp/frps.ini

frps.ini内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[common]
# 监听端口
bind_port = 7000
# 面板端口
dashboard_port = 7500
# 登录面板账号设置
dashboard_user = admin
dashboard_pwd = spoto1234
# 设置http及https协议下代理端口(非重要)
vhost_http_port = 7080
vhost_https_port = 7081


# 身份验证
token = 12345678
1
2
3
4
5
6
#服务器镜像:snowdreamtech/frps
#重启:always
#网络模式:host
#文件映射:/etc/frp/frps.ini:/etc/frp/frps.ini

docker run --restart=always --network host -d -v /etc/frp/frps.ini:/etc/frp/frps.ini --name frps snowdreamtech/frps

中转客户端配置(FRPC)

1
2
3
4
5
6
服务器镜像:snowdreamtech/frpc
重启:always
网络模式:host
文件映射:/路径/frp/:/etc/frp/

docker run --restart=always --network host -d -v /etc/frp/frpc.ini:/etc/frp/frpc.ini --name frpc snowdreamtech/frpc

配置文件示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
[common]
# server_addr为FRPS服务器IP地址
server_addr = x.x.x.x
# server_port为服务端监听端口,bind_port
server_port = 7000
# 身份验证
token = 12345678

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 2288

# [ssh] 为服务名称,下方此处设置为,访问frp服务段的2288端口时,等同于通过中转服务器访问127.0.0.1的22端口。
# type 为连接的类型,此处为tcp
# local_ip 为中转客户端实际访问的IP
# local_port 为目标端口
# remote_port 为远程端口

[ssh]
type = tcp
local_ip = 192.168.1.229
local_port = 80
remote_port = 18022

[unRAID web]
type = tcp
local_ip = 192.168.1.229
local_port = 80
remote_port = 18088

[Truenas web]
type = tcp
local_ip = 192.168.1.235
local_port = 80
remote_port = 18188

[speedtest]
type = tcp
local_ip = 192.168.1.229
local_port = 6580
remote_port = 18190


[webdav]
type = tcp
local_ip = 192.168.1.235
local_port = 18080
remote_port = 18189

[RDP PC1]
type = tcp
local_ip = 192.168.1.235
local_port = 3389
remote_port = 18389
  • 如果监听服务可以有IP限制的设置,需要允许的访问IP为中转内网设备的内网IP;
  • FRP由于端口会暴露在互联网上,虽然说使用方便但安全性较差;

基于Zerotier根服务器的内网穿透部署

创建(伪)根服务器 | 项目地址:https://github.com/Jonnyan404/zerotier-planet

1
docker run --restart=on-failure:3 -d --name ztncui -e HTTP_PORT=4000 -e HTTP_ALL_INTERFACES=yes -e ZTNCUI_PASSWD=mrdoc.fun -p 4000:4000 keynetworks/ztncui

创建 moon 服务器 | 项目地址:https://github.com/jonnyan404/docker-zerotier-moon

1
2
3
4
5
#创建容器
docker run --name zerotier-moon -d -p 9993:9993 -p 9993:9993/udp -v /etc/ztconf/:/var/lib/zerotier-one jonnyan404/zerotier-moon -4 [公网ipx.x.x.x]

#查看moon ID
docker logs zerotier-moon

群晖 DSM 7.x 安装Zerotier客户端

登录SSH并创建虚拟网络设备TUN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#获取权限
sudo -i

#创建“创建虚拟网络设备TUN”的脚本,并设为开机自动运行
echo -e '#!/bin/sh -e \ninsmod /lib/modules/tun.ko' > /usr/local/etc/rc.d/tun.sh

#给予脚本运行权限
chmod a+x /usr/local/etc/rc.d/tun.sh

#运行脚本创建TUN
/usr/local/etc/rc.d/tun.sh

#确认TUN是否创建成功
ls /dev/net/tun

创建存放配置文件的目录

1
mkdir /var/lib/zerotier-one

创建Zerotier应用容器:

1
2
3
4
5
6
7
8
docker run -d           \
--name zt \
--restart=always \
--device=/dev/net/tun \
--net=host \
--cap-add=NET_ADMIN \
--cap-add=SYS_ADMIN \
-v /var/lib/zerotier-one:/var/lib/zerotier-one zerotier/zerotier-synology:latest

常用命令:

1
2
3
4
5
#查看zerotier状态
docker exec -it zt zerotier-cli status

#加入网络
docker exec -it zt zerotier-cli join [xxxxxxxxxxxx]
1
2
3
4
#加入moon服务器
docker exec zt zerotier-cli orbit [moon_ID] [moon_ID]
#确认是否加入
docker exec zt zerotier-cli listpeers

Windows 客户端加入moon服务器

1
2
cd C:\ProgramData\ZeroTier\One
zerotier-cli orbit [moon_id] [moon_id]

介绍

Hexo 是一个快速、简洁且高效的博客框架。Hexo 使用 Markdown(或其他渲染引擎)解析文章,在几秒内,即可利用靓丽的主题生成静态网页,这边就教大家怎么搭建Hexo并配置。大家可以参考Hexo官方文档配合使用。

安装前提

安装 Hexo 相当简单,只需要先安装下列应用程序即可:

  • Node.js (Node.js 版本需不低于 10.13,建议使用 Node.js 12.0 及以上版本)
  • Git

随着大前端的快速发展,node版本更新很快,我们在工作中,可以会有老版本的node的项目需要维护,也可能有新版本的node的项目需要开发,如果我们只有一个node版本的话将会很麻烦,nvm 应运而生,nvm 是 Mac 下的 node 管理工具,有点类似管理 Ruby 的 rvm,如果需要管理 Windows 下的 node,官方推荐使用 nvmwnvm-windows。不过,nvm-windows 并不是 nvm 的简单移植,他们也没有任何关系。但下面介绍的所有命令,都可以在 nvm-windows 中运行,nvm是node的版本管理器,可以方便地安装&切换不同版本的node

安装NVM

进入NVM-Windows项目发布地址: https://github.com/coreybutler/nvm-windows/releases ,选择最新发行版本nvm-setup.zip下载:

20210531232213538

安装需要注意两点

1、 把电脑上面的node环境先卸载干净(C:\Users\用户名\AppData\Roaming\node下面的文件也要解决干净)

2、 安装时,建议选择手动安装版,然后疯狂下一步就行,不要尝试改变安装目录。

如果不想放在C盘,例如放在D盘,安装路径是这样的:

第一步:D:/你想放的文件夹名

第二步:D:/你想放的文件夹名(最好不要中文名)/nodejs

检查安装是否成功

在搜索栏查找poweshell,选中x86powershell鼠标右击选择以管理员身份运行image-20221127134846193

Powershell下,输入NVM,即可发现安装完成:

配置国内源

到你NVM安装路径,*打开setting.txt文件(如果没有,则创建即可),更改为:

1
2
3
4
5
6
root: D:\NVM
path: D:\NVM\nodejs
arch: 64
proxy: none
node_mirror: https://npmmirror.com/mirrors/node/
npm_mirror: https://npmmirror.com/mirrors/npm/

解释参数:

  • root:NVM的安装地址。即上文的%NVM_HOME%
  • path:激活node.js时的存储路径,即上文的%NVM_SYMLINK%
  • arch:系统架构,如果你的Windwos不是x64,则填32
  • proxy:是否走代理
  • node_mirror:node.js的下载源,这里使用的是淘宝源
  • npm_mirror:npm的下载源,这里使用的是淘宝源

20250329191540

使用NVM

在cmd或pwoershell使用命令

1
nvm list available

image-20220710002047715

1
2
3
4
5
6
7
8
9
10
2、安装方式 nvm install 版本号
current:当前最新的版本
LTS:稳定版本

nvm install 19.8.1 (当前稳定的最新版)

我安装了两个
nvm install 18.13.0
nvm install 16.15.1
使用nvm ls 或者 nvm list可以查看安装的不同node版本,*指向的就是当前版本

激活Node.js版本

我们安装好Node.js以后,需要激活它

1
2

nvm use 16.15.1

安装Git

无脑下一步!!!Git的官网地址

安装hexo

先在NVM安装目录内建立2个目录node_cache和node_global

image-20230331224443212

输入下面命令

1
2
npm config set prefix "D:\NVM\node_global"
npm config set cache "D:\NVM\node_cache"

更换源

1
npm config set registry=http://mirrors.cloud.tencent.com/npm/ 

所有必备的应用程序安装完成后,还需要配置npm的全局变量到系统的变量里面

配置系统变量

配置NVM_HOMENVM_SYMLINK

20250329190659

1
2
D:\NVM
D:\NVM\nodejs

编辑path

20250329190753

1
2
3
4
%NVM_HOME%
%NVM_SYMLINK%
%NVM_HOME%\node_global\
%NVM_SYMLINK%\node_modules

使用Npm安装Hexo

1
npm install -g hexo-cli

如报错,更新一下npm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
npm install -g npm-windows-upgrade


set-ExecutionPolicy RemoteSigned

执行策略更改
执行策略可帮助你防止执行不信任的脚本。更改执行策略可能会产生安全风险,如 https:/go.microsoft.com/fwlink/?LinkID=135170
中的 about_Execution_Policies 帮助主题所述。是否要更改执行策略?
[Y] 是(Y) [A] 全是(A) [N] 否(N) [L] 全否(L) [S] 暂停(S) [?] 帮助 (默认值为“N”): y


npm-windows-upgrade
npm-windows-upgrade v6.0.1
? Which version do you want to install? 8.13.2
Checked system for npm installation:
According to PowerShell: D:\nodejs
According to npm: D:\nodejs
Decided that npm is installed in D:\nodejs
Upgrading npm... |

Upgrade finished. Your new npm version is 8.13.2. Have a nice day!

安装好以后,测试一下:

1
hexo

没有出现未知命令,说明安装成功。可以接下来操作了。

如果出现hexo : 无法加载文件 C:\Program Files\nodejs\hexo.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.micros oft.com/fwlink/?LinkID=135170 中的 about_Execution_Policies。 所在位置 行:1 字符: 1。

那是因为你用的是win11系统,你需要在设置->隐私和安全性->开发者选项->允许本地powershell脚本在为签名的情况下运行image-20230308210045396

应用之后,重新打开新的powershell,再次输入hexo即可。

创建hexo

创建你的博客的空白文件夹,然后打开文件夹,我们已经安装好Git,所以我们直接是由鼠标右键的Git Bash Here

image-20220710233249939

在博客目录内初始化博客

初始化目录:

1
2
# 进目录之后,在Git bash里面输入下面目录初始化
hexo init

初始化后回生成许多文件

image-20230331230347045

输入命令后,它会自动爬取hexo的初始化目录,在国内网络是非常不好的,如果出错需要删除目录内容重新执行命令直到成功。

构建hexo

初始化Hexo后,其实Hexo就可以使用了;构建Hexo:

1
2

hexo g

启动Hexo内建服务器

其实,整个public文件就是一个博客了,但是我们还要部署Nginx等网络环境或者使用HBuilderX等根据,启动Web服务器才能用浏览器本地IP(即:127.0.0.1localhost)加端口进行访问;为了减少麻烦,可以使用Hexo内建服务器:

1
2

hexo s

image-20220710234306097

我们可以去127.0.0.1:4000网址看看初始化页面的样子image-20220710234335015

部署Hexo到github

上述操作,我们已经把Hexo部署在本地;接下来,我们来看看怎么部署到远程平台,部署到远程平台后,公网用户就可以访问了(也就是可以让你小伙伴通过浏览器访问到你的博客)。

创建github仓库

image-20230407151939650

需要注意的是作为网站访问的这个仓库,仓库名称一定是,拥有者名+github.io

生成ssh keys

在博客文件夹根目录下,右键,调用git bash here功能

输入命令,本地生成ssh keys ,有回车按回车,有(y/n)?就输入y

1
ssh-keygen -t ed25519 -C "your_email@example.com"

注意:如果你使用的是不支持 Ed25519 算法的旧系统,请使用以下命令:

1
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

出现这个则生成成功

image-20230407152653491

在电脑打开生成公钥的文件夹

路径:C:/用户/你的用户名/.ssh

找到后打开id_rsa.pub(默认记事本打开),复制公钥(ctrl+A全选, ctrl+C复制)

打开github,头像箭头,下拉选项setting(设置)-SSH与GPG keys -new ssh keys(新建ssh秘钥)

tilte随便起,然后ctrl+V粘贴到key里面

image-20230416135608274

测试是否绑定成功

1
ssh -T git@github.com

image-20230416134842427

yes,然后按回车

出现successfully字样则绑定成功

上传博客到github仓库

修改配置文件

在创建博客文件夹的根目录下修改-config.yml文件

image-20230407163241369

输入时注意冒号后面有空格,然后保存退出

安装hexo-deployer-git

1
2
3
#注意这些插件是安装在博客目录内的,所以是跟随博客内容一起走的
#这个插件是提供上传git能力
npm install hexo-deployer-git --save

因为github在国外,有些时候推送会出现ssl出错,其实就是网络差,我们在Git Bash里面输入下面这行命令,不验证ssl:

1
git config --global http.sslVerify "false"

博客推送

在博客目录下命令窗口/终端输入

1
2
3
4
5
6
7
8
9
#配置git push的信息
git config --global user.email "your_email"
git config --global user.name "your_name"

#查看和检查配置的信息
git config --list

# hexo d就是推送博客到指定的地方(本博客推送的地方是Github)
hexo cl && hexo g && hexo d

博客主题

打开hexo的主题网站

image-20230508003429447

比如打开Ayer这款主题,打开后能看到主题的效果

image-20230508003515559

一般在博客主题内会有github的项目链接或者安装和使用的指南

image-20230508003741044

打开github项目有下面有个README.md的安装教程,其安装步骤我就不一一展示了,按教程来有手就行[doge]

image-20230508003943456

解决图片不显示问题

更改hexo配置文件

1
vim _config.yml #配置_config.yml里面的post_asset_folder:false 设置为 true 如图

031161b88a660fd50ecc872d942c43fa

安装npm插件

1
npm install https://github.com/CodeFalling/hexo-asset-image --save

修改Typora设置

打开文件菜单的偏好设置

image-20240514232927394

打开图像选项,设置如下图

image-20240514233130356

0%