Foreword: The network is no absolute whole security. This is a classic famous saying, I don't have to say more! Today is mainly demonstrated, how to download Access database and prevent the Access database from being downloaded. Attack: First, play your imagination To modify the database file name, theoretically not necessarily to prevent being downloaded. Modify the database name, its purpose is to prevent us from being downloaded and downloaded. But if we guess the database name, you can download it directly. So this Cannot guarantee 100% can't be downloaded. The common way to guess the database is to write the program to guess the database name. If the Web returns to 404 errors, if you submit a MDB file, if you have returned 404 error, then you will guess, Direct download. Of course, this has a certain limitation because if the database name is very complicated, it will generate a lot of logs. The administrator may have discovered it early. And there will be time to get a long. 2: Database name suffix Change to ASA, ASP, etc., do not necessarily prevent being downloaded. IIS is directly output to the content other than <%%> through the ASP.DLL. SASP extension file, do not do any processing directly, but MDB files If there is no "ASP laminar" such as <%%>, we enter the URL directly in IE to return data in IE. It is the data of the MDB file. We can download it directly with the software, such as flashget. It can be used later. As shown in Figure 1: How about?
(Figure 1) 3: Database name "#", must prevent the downloaded. Some people mistaken: "I only need to add the database file before #, then modify the database connection file (such as conn.asp) Address. The principle is to identify the previously named part of the ##, for the automatic removal. "This is more secure. This is only the general people can't download it. Because they don't know, I don't know about IE Code technology. We use% 23 in the encoding instead # 号. So if there is a database is: http://www.xxx.com/data/#DataPro.mdb We directly enter: http: / /www.xxx.com/data/#DataPro.mdb can be downloaded. As shown in Figure 2:
(Figure 2) 4: Encrypted database, download, 2 seconds to solve the database password. Some people think that encrypt the Access database, even if it is obtained, there is no way to get any information inside. This is a missented The encryption mechanism of the .access database is very fragile. Encrypted database system forms an encrypted string by "distinguishing the user entered password" videolius ", and stores it in * .mdb file from address" & H42 "Started area. Use the program to easily write crack code. There is already such a program online. Now I recommend a more old, but very practical crack database password program: AccessKey.exe (provided in the CD) Figure 3:
(Figure 3): We use special requests to parse the script error to get the database path. On the network, there are many people directly use the following code to connect to the database, see: .... db_path = "DATA / ABCD1234! @ # 1Po.mdb "db_string =" provider = microsoft.jet.Oledb.4.0; data source = "& server.mappath (db_path) set conn = server.createObject (" adodb.connection "Conn.open db_string .... database The file name is also complex enough, use the program to crack, I think no one wants to try. We can directly get his database path directly. This method is too dangerous, knowing the method There are very few people. I dare not announce this here. Once I publish how many websites will be downloaded. Waiting for the situation later. So I only provide a temporary patch to everyone. Plus a sentence: Plus in conn.open db_string: On Error ResMe next, you can solve this problem. Defense: The above introduces how to download the database. Here I will explain some ways to prevent the database to be downloaded. First, you are using a virtual host: first in your MDB Built a table in the file. Take a field name in the table: NOTDOWNLOAD. Enter a field in the table name. Fill in the field: <% = 'a'-1%> Figure 4: (Figure 4) Oh, then This is called .asp. Why is you named <% = 'a'-1%> Actually =' a'-1 Here you can make a chaotic input as long as it is not the correct ASP statement. Because this is changed to the extension. When you entered the IE after IE. If you encounter <%%> He will explain the code between the interpretation, let him explain. Oh, it will be wrong, so the database will never be downloaded correctly. As shown in Figure 5:
(Figure 5) Are you safe? Oh, it is still not safe. We have to add a ## before the database. Such as: # Data.asp The # number here is not used to prevent download. Preventing the downloaded process has been explained. When you have multiple MDB files, put it in the same directory. Such as: 12YES's whole station system. If we guess the location of the admin MDB file and from another system Simultaneous Method of Access Inter-library query can be used in the SQL injection vulnerability. To get records in the administrator library. If we add # 号 in front of the library name, you can guess. We are not afraid: SELECT * From d: /web/data/#Data.asp.admin SQL query statement, the system will prompt an error. Because # in the SQL syntax, there is a function of the date. The syntax error will not perform the query criteria. (huh, 12yes There is still a vulnerability I use Access cross-library method attack success!) I think the more secure database should be # file name .asp and build a temporary table, one field input ASP code, let ASP can't be correct Explanation. Second, you use a hosting host: This method of preventing download is too good. Hehe put your database into the directory other than IIS. Kill me, I can't. As your web directory In the D: / Web / Website directory. So save the database in the D: / Web / Data directory. Conclusion: See this article, I don't know what you think, I believe that only practices will be truth. Everyone will try Try it, maybe you will find a better anti-download method and communicate with me.