邓老师 发布的文章

1、我们以root权限登录系统

sudo su

2、修改root账号的密码(此处可以根据自己的需求进行修改或者不修改)

sudo passwd root
root@eve-ng:~# sudo passwd root
Enter new UNIX password: eve
Retype new UNIX password: eve
passwd: password updated successfully

3、安装vim编辑器应用程序

apt-get install vim

4、修改hosts文件,让本机名称解析到本地IP地址

vim /etc/hostname
eve-ng

vim /etc/hosts
127.0.0.1 localhost
127.0.1.1 eve-ng.example.com eve-ng

5、允许以root用户登录SSH

sed -i -e "s/PermitRootLogin .*/PermitRootLogin yes/" /etc/ssh/sshd_config
允许密码认证
sed -i -e "s/PasswordAuthentication .*/PasswordAuthentication yes/" /etc/ssh/sshd_config

6、保存设置(ctrl + o,ctrl + x)并重新启动ssh服务

sudo service ssh restart

7、重新生成GRUB的启动菜单配置文件

1: sed -i -e 's/GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 noquiet"/' /etc/default/grub
2: update-grub

8、重要! ! !配置服务器的IP地址(建议使用静态IP)。! ! !警告! ! !在GRUB更新改变接口名称到ethX后,原来的名字在第一次启动后将不会工作! !!!!您必须编辑以下接口并重新启动! !! 将原始接口名称更改为eth0

9、安装万兆网卡驱动(如果有万兆网卡,请执行此操作)

apt-get install firmware-bnx2x

10、保存以上所有操作步骤并reboot服务器

11、从repo获取EVE Key

wget http://www.eve-ng.net/repo/eczema@ecze.com.gpg.key
apt-key add eczema@ecze.com.gpg.key

12、获取服务器更新

apt-get update
apt-get -y install software-properties-common
add-apt-repository "deb [arch=amd64] http://www.eve-ng.net/repo xenial main"
apt-get update

13、安装EVE

apt-get -y install eve-ng

14、复制broadcom firmware。

broadcom firmware
cp -rp /lib/firmware/$(uname -r)/bnx2 /lib/firmware/

15、重启服务器、并登陆系统操作界面,按照步骤安装EVE(安装步骤)。

16、升级更新EVE。

apt-get update
apt-get upgrade

17、安装docker

apt-get install eve-ng-dockers

查看已经下载的镜像
dc images

Linux下怎样使用chmod命令让一个目录下的子目录都加上可执行(x)权限,却不改变这个目录中的文件的可执行属性的状态。也就是只给所有子目录+x

find . -type d -exec chmod a+x {} \;

1.创建docker macvlan类型网络

docker network create -d macvlan --subnet=192.168.10.0/24 --gateway=192.168.10.1 -o parent=enp2s0 macnet
注意:macvlan类型网络在无线网卡中可能有故障

容器与宿主主机不能通信

查看docker网络
docker network ls

2.拉取openwrt镜像

docker pull openwrt:latest

3.创建并启动容器

docker run --restart always --name openwrt -d --network macnet --privileged openwrt:latest /sbin/init

4.进入容器并修改相关参数

docker exec -it openwrt bash

5.修改网络

vim /etc/config/network
config interface 'lan'

    option ifname 'eth0'
    option proto 'static'
    option netmask '255.255.255.0'
    option gateway '192.168.10.1'
    option dns '192.168.10.1'
    option ipaddr '192.168.10.254'

6.重启网络

/etc/init.d/network restart

用户名:root
密码:password

openwrt官方镜像下载

https://downloads.openwrt.org/releases/
http://mirrors.ustc.edu.cn/openwrt/releases

openwrt-x86-generic-rootfs.tar.gz是docker镜像
可以通过以下命令导入
docker import openwrt-x86-generic-rootfs.tar.gz

在线CTF平台
XCTF攻防世界
https://adworld.xctf.org.cn/

BUUCTF 北京联合大学CTF
https://buuoj.cn/

ctfhub
https://www.ctfhub.com/#/index

hacker101 CTF(英文)
https://ctf.hacker101.com/

广东省红帽杯网络安全攻防大赛 CTF - Write Up
https://imlonghao.com/48.html

2018 XJNU CTF Web Writeup
https://imlonghao.com/54.html

USTC Hackergame 2020 - Writeup
https://imlonghao.com/58.html

CTF4靶机训练
https://blog.csdn.net/weixin_44132032/article/details/99755928

漏洞利用、实战练习平台、CTF比赛资源库
http://www.dufengvip.cn/post-395.html

CTFd线上平台搭建

方法1:直接运行docker
https://github.com/CTFd/CTFd
安装docker后直接执行下面,即可安装
docker run -p 8000:8000 -it ctfd/ctfd

方法2:手工安装
http://www.manongjc.com/detail/8-ngfrwxtuqdhyuzs.html

搭建CTF-AWD训练平台(在ubuntu18.04环境中搭建成功)

https://blog.csdn.net/huanghelouzi/article/details/90204325

AWD平台搭建
http://www.manongjc.com/detail/22-stvakhmxmkspbpf.html

CTF实战题目
https://github.com/CTFTraining/CTFTraining

CTF线下AWD攻防步骤总结
https://blog.csdn.net/qq_43442524/article/details/102652029

新增规则:
netsh advfirewall firewall add rule name= "TCP80" dir=in action=allow protocol=TCP localport=80

删除规则:
netsh advfirewall firewall delete rule name= "TCP80"

https://cloud.tencent.com/developer/article/1462776

1.Powershell对app pool管理
1.1 查看:
Get-ChildItem –Path IIS:\AppPools

1.2 新建:
New-Item –Path IIS:\AppPools\MyAppPool

1.3 停止:
Stop-WebAppPool -Name MyAppPool

1.4 运行:
Start-WebAppPool -Name MyAppPool

1.5 重启:
ReStart-WebAppPool -Name MyAppPool

1.6 编辑属性:
Get-ItemProperty –Path IIS:\AppPools\MyAppPool | select *
Set-ItemProperty -Path IIS:\AppPools\MyAppPool -Name managedRuntimeVersion -Value v4.0

2.Powershell对web sites管理

2.1 查看
Get-Website

2.2 新建:

New-Website –Name MyWebApp –PhysicalPath D:\apidd
2.3 停止:

Stop-Website –Name MyWebApp
2.4 运行:

Start-Website –Name MyWebApp
2.5 重启:

Stop-Website –Name MyWebApp
Start-Website –Name MyWebApp

2.6 绑定:
Get-Website -Name MyWebApp
Get-WebBinding -Name MyWebApp
(Get-Website -Name MyWebApp).bindings.Collection
Set-WebBinding -Name 'MyWebApp' -BindingInformation "*:80:" -PropertyName Port -Value 81
New-WebBinding -Name MyWebApp -Protocol http -Port 82
//SSL bindings ??不确定
get-childItem IIS:SslBindings
$cert = Get-ChildItem cert:\localmachine\my
$bindingInfo = "IIS:\SSLBindings*!445"
$cert | Set-Item -Path $bindingInfo

2.9 移除:
Remove-WebSite -Name MyWebApp2