Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[+] New DIOS / [Tut] MariaDB [Tut] / My SQLi challenge # 02 Solution [+]

Hello Everyone,
Here is the solution of my challenge # 02

Challenge thread link --> https://hackforums.net/showthread.php?tid=5351851
Tasks were easy but after viewing the rules, common reactions of peolple were as follows ;

[Image: NOwTjWn.jpg]
[Image: v4N5Lqv.jpg]
[Image: SWhXnJ7.jpg]
[Image: WAmySWT.jpg]

Last one was correct " something new ".
That something new is the new string function which is REGEXP_REPLACE ().
I know never seen it at "dev. mysql .com" string functions category.
This function belongs to "MariaDB" and the site in challenge was also MariaDB based.
Here is quick introduction of MariaDB below;🙂

" MariaDB is a community-developed fork of the MySQL relational database management system intended to remain free under the GNU GPL.It is notable for being led by the original developers of MySQL, who forked it due to concerns over its acquisition by Oracle.MariaDB intends to maintain high compatibility with MySQL, ensuring a "drop-in" replacement capability with library binary equivalency and exact matching with MySQL APIs and commands. It includes the XtraDB storage engine for replacing InnoDB, as well as a new storage engine, Aria, that intends to be both a transactional and non-transactional engine perhaps even included in future versions of MySQL.
Its lead developer is Michael "Monty" Widenius, one of the founders of MySQL AB and the founder of Monty Program AB. On 16 January 2008, MySQL AB announced that it had agreed to be acquired by Sun Microsystems for approximately $1 billion. The acquisition completed on 26 February 2008. MariaDB is named after Monty's younger daughter "Maria", similar to how MySQL is named after his other daughter "My".
That's the brief introduction taken from (https://en.wikipedia.org/wiki/MariaDB).You can learn more about its versions from there. "

The function which i mentioned was introduced in MariaDB version 10.0.5 and the site in challenge has as follows;

PHP Code

<?php 
http
://www.kabelindo.co.id/readnews.php?id=-4 UnIon select 1,version(),3,4,5-- - 

Bingo!!!! Its 10.1.16 🎉
We can use that function.The syntax of this function is same as MySQL Replace () function .

PHP Code

<?php 
REGEXP_REPLACE 
(subject, pattern, replace) 

So, here is my DIOS exclusively for MariaDB versions 10.0.5 and above.We can also say that it's the first ever DIOS exclusively for MariaDB;🤗

http : // pastebin.com/Jx593ZNx


Here i used " Case statement in place of if () function".Many injectors on hf are aware of case statement so i can't show the basics here.If someone don't know he can visit https : // mariadb.com/kb/en/mariadb/control-flow-functions/ and see the syntax of CASE STATEMENT.

I was absolutely screwed while converting the above strings to 0x form because of the error so i just added one more regexp_replace () and done the job.😝

http : // pastebin.com/WTeWq8ki

As i mentioned before this function is similar to replace () function so here is my syntax with same output with replace function and i didn't faced any issue in it while converting to 0x form and u can use it for both MySQL and MariaDB versions 5 and above,

http : // pastebin.com/0CiECJKx

Column numbering was not a task in the challenge.So below is the DIOS with numbering both tables and columns with regexp_replace () and replace ().

http : // pastebin.com/cZiB5vVR

Now u guys must be curious about the other functions Of MriaDB ,U can find their syntax in below link and much more info about MariaDB from MariaDB's website;👍

http s : / / mariadb.com/kb/en/mariadb/ regular-expressions-functions/



Author : Irfan Qadoos (7h3_Ph3n0m).

Leave your valuable replies.🙂
GreaT DOne 😉 Keep Posting Challenges 😉
Thanks for appreciating🙂
wow nice explanation bro 👍 really learned something new 🙂
Thanks and keep learning 🙂
As I expected But I Didn't Try This Way...........I Checked Functions Of MariaDB one or two times before this challenge But After You Post This Challenge,I never Checked Functions of MariaDB or you can say It was Not in my luck to learn about this function by myself.......
Thanks For Sharing.Nice Effort.
Regards
You know what. Learned something new. Many injectors too will learn this

Thanks
Thanks guys , learning is the main objective, keep learning 🙂
Love it when folks release new sqli dios methods / techniques. Thanks for sharing.
wow good work sir ^__^ , ^__^
The_Defiant_One welcome 🤝
InjectorBoy thanks for appreciating 🤝
Awesome One Thanks For Sharing Keep Share Knowledge Like That :)
welcome AkDK ....... 🙂


Possibly Related Threads...
Thread / Author Replies Views Last Post
by GOD_SLAYERDec 24, 2022 12:16 PM 9 604 Dec 24, 2022 12:16 PM
Last Post: Skorp
by GOD_SLAYERAug 19, 2022 07:11 PM 0 166 Aug 19, 2022 07:11 PM
Last Post: GOD_SLAYER
by Berry WhiteApr 24, 2020 11:08 AM 4 508 Apr 24, 2020 11:08 AM
Last Post: ApertureSecurity