docker 使用(mysql5.7为例)
拉取镜像配置加速地址国内停服风波后,拉取镜像出现失败的现象,可通过配置加速地址解决(卡顿也可使用此方法)
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}
EOF
sudo systemctl daemon-re ...
Docker 安装
centos自动安装docker使用官方安装脚本自动安装:1curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun国内安装命令:1curl -sSL https://get.daocloud.io/docker | sh
手动安装卸载旧版本较旧的 Docker 版本称为 docker 或 docker-engine 。如果已安装这些程序,请卸载它们以及相关的依赖项。12345678yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-engine
安装 Docker Engine-CommunityDocker Engine-Community:这是 Docker Eng ...
hexo-butterfly美化
hexo博客一图流实现效果展示头部背景与主体部分背景无缝连接
实现方法通过开启butterfly主题留下的inject模块功能
添加css代码先在主题的css文件夹中创建custom.css文件1cd themes/butterfly/source/css/
编辑让顶部背景和页脚背景透明的css文件vim custom.css1234567891011121314151617181920#footer { background: transparent !important;}#page-header { background: transparent !important;}#footer::before{ background: transparent !important;}#page-header::before{ background: transparent !important;}[data-theme="dark"] #footer::before{ ...
github部署hexo
本地ssh连接 GitHub创建密钥确保下载了git后输入命令12git config --global user.name "你的 GitHub 用户名"git config --global user.email "你的 GitHub 邮箱"
用户名执行命令:1git config --global --add safe.directory D:/hexo/.deploy_git
指定密钥文件,在保存密钥文件的目录中创建文件:config12345Host github.com HostName github.com User git IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes
创建 SSH 密匙(可以-f指定输出目录)1ssh-keygen -t rsa -C "你的 GitHub 邮箱"什么都不用管,一路回车就行,创建好之后可以在.ssh看到有id_rsa.pub(.pub是公钥,id_rsa是私钥)。打开 id_rsa.pub 并复制里面的内容。
在 Gi ...
ansible命令
ansible是一个批量执行命令的工具
安装软件安装 EPEL 仓库1yum install epel-release -y安装 Ansible1yum install ansible -y
使用
使用前需要定义两个文件:一个指定需要批量执行的主机hosts.ini,可以随意指定名称;一个指定需要运行的命令和动作command.yml,虽然可以直接指定需要运行的命令,但通过该文件可以回显执行成功或失败的主机和成功或失败的动作。
hosts.ini:12345[hostst_g]此处填写ip[hosts_g:vars]ansible_ssh_user=root ##账号ansible_ssh_pass=123456 ##密码
command.yml:12345678910111213141516- name: 在远程主机上执行任意命令 hosts: all gather_facts: no tasks: - name: 执行一个特定命令 command: echo "你好,世界!" # 使用 command 模 ...
msfconsole命令
攻击模块软件更新
apt update # 更新安装包信息;只检查,不更新
apt upgrade # 更新已安装的软件包,不删除旧包;
apt full-upgrade # 升级包,删除旧包
基础使用
msfconsole //进入框架
search ms17_010 //使用search命令查找相关漏洞
use exploit/windows/smb/ms17_010_eternalblue //使用use进入模块
info //使用info查看模块信息
show options //查看参数
set RHOST 192.168.100.158 //设置参数
exploit/run
辅助模块(auxiliary)
漏洞利用(exploit)
攻击载荷(payload): Stager中几种常见的payload: windows/meterpreter/bind_tcp //正向连接 windows/meterpreter/reverse_tcp //反向连接,常用 windows/meterpreter/reverse_http ...
hydra命令
参数详解-l login 小写,指定用户名进行破解
-L file 大写,指定用户的用户名字典
-p pass 小写,用于指定密码破解,很少使用,一般采用密码字典
-P file 大写,用于指定密码字典
-s PORT 指定默认端口
-C使用冒号分割格式,例如“登录名:密码”来代替 -L/-P 参数
-e ns 额外的选项,n:空密码试探,s:使用指定账户和密码试探
-M file 指定目标ip列表文件,批量破解
-o file 指定结果输出文件
-f 找到第一对登录名或者密码的时候中止破解
-t tasks 同时运行的线程数,默认是16
-S大写,采用SSL链接
-w time 设置最大超时时间,单位
-v / -V 显示详细过程
-R 恢复爆破(如果破解中断了,下次执行 hydra -R /path/to/hydra.restore 就可以继续任务。)
-x 自定义密码
爆破协议举例SSH暴力破解
hydra -L 用户名字典 -P 密码字典 -t -vV -o ssh.log -e ns IP ssh
mysql暴力破解
hydra -L 用户名字典 -P 密码字典 -t 5 I ...
arp欺骗
使用arpspoof命令:arpspoof -i eth0 -t 目标IP地址 网关IP地址
-i interface 指定要使用的接口。-c own|host|both 指定范围own|host|both(自己|主机|两者)-t target 指定一台特定主机进行ARP(如果未指定,则为LAN上的所有主机)-r 两个主机(主机和目标)以捕获两个方向的流量。(仅对-t有效)host 指定您希望抓取数据包的host(通常是本地网关)
使用ettercap -G 蜘蛛工具实例演示-arp欺骗
1.打开ettercap,选择你要使用的网卡,点击”对号”。
2.点击”搜索”按钮,进行主机发现。
3.点击”红色方框里面的按钮”,我们可以查看”host list”.
4.将想要欺骗的网关和受害者分别添加到”add to target 1”和”add to target 2”。
5.点击”圆圈”,选择”arp poisoning spoofing”。
6.选择”sni ...
nmap命令
常用命令总结命令格式
nmap [参数] [ip]
主机探测(隐蔽扫描/TCP ACK/TCP SYN/TCP空扫描欺骗防火墙)
nmap -sS/-PS/-PA/-sN ip
命令表格
命令
描述
nmap IP
扫描IP
nmap -v IP
加强扫描
nmap IP1 IP2 …
扫描多IP
nmap a.b.c.*
扫描整个子网
nmap a.b.c.x,y,…
扫描多子网地址
nmap -iL xxx.txt
根据文件扫描多IP
nmap a.b.c.x-y
扫描子网IP范围
nmap a.b.c.* —exclude IP
排除指定IP扫描整个子网
nmap -A IP
扫描操作系统和路由跟踪
nmap -O IP
探测操作系统
nmap -sA/-PN IP
探测防火墙
nmap -sP a.b.c.*
探测在线主机
nmap -F IP
快速扫描
nmap -r IP
按顺序扫描
nmap -iflist
显示接口和路由信息
nmap -p n1,n2… IP
扫描指定端口
nmap -p ...
安全-内网渗透
信息收集主机存活 ettercap -G 蜘蛛 nmap nmap -sS 网段
漏洞搜集 awvs 网站扫描 gvm(openvas) 系统扫描 nmap nmap —script=vuln //常见漏洞 nmap —script-default //默认收集信息脚本
进入目标后提权 创建高权限用户 windows net use linux user add
留后门 创建木马 木马(msfconsole) 上传木马 meterpreter upload
攻击方式改变流量走向 ettercap(arp欺骗、dns劫持等) arpspoof arpspoof -i 网卡名称 -t 目标IP 网关
爆破密码 hydra(九头蛇) msfconsole(爆破密码模块)
漏洞攻击 msfconsole(漏洞攻击目录)
