首页 热点专区 小学知识 中学知识 出国留学 考研考公
您的当前位置:首页正文

CTF中常见的敏感文件列表

2024-12-10 来源:要发发知识网

项目地址 :



运行效果 :

Paste_Image.png Paste_Image.png Paste_Image.png Paste_Image.png

以后逐步完善 :

#############################
分布式版本控制系统(git)源码泄漏
    .git
    README.MD
        .gitignore
集中式版本控制系统(svn)源码泄漏
    .svn
#############################
VIM编辑器
    备份文件 : 
        *.*~
    异常退出备份文件 : 
        .*.*.swp
        .*.*.swo
        .*.*.swn
        .*.*.swm
        .*.*.swl
    日志文件 : 
        _viminfo
        .viminfo
#############################
Emacs编辑器
    *.*~
    *.*~1~
    *.*~2~
    *.*~3~
#############################
nano编辑器
    *.*.save
    *.*.save1
    *.*.save2
    *.*.save3
#############################
Editplus编辑器
    *.*.bak_Edietplus
#############################
其他编辑器
    *.*.bak
    *.*.back
#############################
开发人员测试失误遗留文件
    phpinfo.php
    test.php

#############################
Bash命令历史记录
    .bash_history

Python批量验证脚本 :

#!/usr/bin/env python 
# -*- coding: utf-8 -*- 

import requests
import winsound
import ctypes
import sys


# config-start
timeout = 5
website = sys.argv[1] # 注意格式 , 一定要加上后面的斜杠
# config-end

if not website.endswith("/"):
    website += "/"

STD_INPUT_HANDLE = -10  
STD_OUTPUT_HANDLE= -11  
STD_ERROR_HANDLE = -12  
  
FOREGROUND_BLACK = 0x0  
FOREGROUND_BLUE = 0x01 # text color contains blue.  
FOREGROUND_GREEN= 0x02 # text color contains green.  
FOREGROUND_RED = 0x04 # text color contains red.  
FOREGROUND_INTENSITY = 0x08 # text color is intensified.  
  
BACKGROUND_BLUE = 0x10 # background color contains blue.  
BACKGROUND_GREEN= 0x20 # background color contains green.  
BACKGROUND_RED = 0x40 # background color contains red.  
BACKGROUND_INTENSITY = 0x80 # background color is intensified.  

class ColorPrinter:  
    ''''' See  
    for information on Windows APIs.'''  
    std_out_handle = ctypes.windll.kernel32.GetStdHandle(STD_OUTPUT_HANDLE)  
      
    def set_cmd_color(self, color, handle=std_out_handle):  
        """(color) -> bit 
        Example: set_cmd_color(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_INTENSITY) 
        """  
        bool = ctypes.windll.kernel32.SetConsoleTextAttribute(handle, color)  
        return bool  
      
    def reset_color(self):  
        self.set_cmd_color(FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE)  
      
    def print_red_text(self, print_text):  
        self.set_cmd_color(FOREGROUND_RED | FOREGROUND_INTENSITY)  
        print print_text  
        self.reset_color()  
          
    def print_green_text(self, print_text):  
        self.set_cmd_color(FOREGROUND_GREEN | FOREGROUND_INTENSITY)  
        print print_text  
        self.reset_color()  
      
    def print_blue_text(self, print_text):   
        self.set_cmd_color(FOREGROUND_BLUE | FOREGROUND_INTENSITY)  
        print print_text  
        self.reset_color()  
            
    def print_red_text_with_blue_bg(self, print_text):  
        self.set_cmd_color(FOREGROUND_RED | FOREGROUND_INTENSITY| BACKGROUND_BLUE | BACKGROUND_INTENSITY)  
        print print_text  
        self.reset_color()     

colorPrinter = ColorPrinter()

listFile = open('list.txt', 'r')

urls = []

for i in listFile:
    i = i[0:-1]
    if "?" in i:
        fileFile = open('file.txt', 'r')
        for j in fileFile:
            j = j[0:-1]
            temp = i.replace("?",j)
            urls.append(website + temp)
    else:
        urls.append(website + i)

for url in urls:
    try:
        print "Checking : ",
        response = requests.get(url,timeout = timeout)
        if response.status_code == 200:
            winsound.Beep(1000,1000)
            colorPrinter.print_green_text(url + '\tOK!')
            # if "404" in response.text:
            #   colorPrinter.print_blue_text(url + "\tMaybe every page same!")
        else:
            colorPrinter.print_red_text(url + "\tError")
    except Exception as e:
        print e

字典文件 : (list.txt)

.git
README.MD
.gitignore
.svn
?~
.?.swp
.?.swo
.?.swn
.?.swm
.?.swl
_viminfo
.viminfo
?~
?~1~
?~2~
?~3~
?.save
?.save1
?.save2
?.save3
?.bak_Edietplus
?.bak
?.back
phpinfo.php
test.php
.bash_history

字典文件 (file.txt) :

index.php
login.php
register.php
test.php
phpinfo.php
t.php
显示全文