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

File upload Script For Direct link Malware

I know this is not the best Tutorial in the world but if you have questions shoot me a pm and i will help you with the script......

There are a few things you will need to get started....

1. Domain(free or purchased)

2. Hosting shared or vps

3. The upload Script (can be found here)

Code
<?php

$uploadpath = 'private/';      // directory to store the uploaded files
$max_size = 2000;          // maximum file size, in KiloBytes
$allowtype = array('bmp', 'gif', 'jpg', 'jpe', 'zip', 'exe');        // allowed extensions

if(isset($_FILES['fileup']) && strlen($_FILES['fileup']['name']) > 1) {
  $uploadpath = $uploadpath . basename( $_FILES['fileup']['name']);       // gets the file name
  $sepext = explode('.', strtolower($_FILES['fileup']['name']));
  $type = end($sepext);       // gets extension
  $err = '';         // to store the errors

  // Checks if the file has allowed type, size, width and height (for images)
  if(!in_array($type, $allowtype)) $err .= 'The file: <b>'. $_FILES['fileup']['name']. '</b> not has the allowed extension type.';
  if($_FILES['fileup']['size'] > $max_size*1000) $err .= '<br/>Maximum file size must be: '. $max_size. ' KB.';

  // If no errors, upload the file, else, output the errors
  if($err == '') {
    if(move_uploaded_file($_FILES['fileup']['tmp_name'], $uploadpath)) {
      echo 'File: <b>'. basename( $_FILES['fileup']['name']). '</b> successfully uploaded:';
      echo '<br/>File type: <b>'. $_FILES['fileup']['type'] .'</b>';
      echo '<br />Size: <b>'. number_format($_FILES['fileup']['size']/1024, 3, '.', '') .'</b> KB';
      echo '<br/><br/>File address: <b>http://'.$_SERVER['HTTP_HOST'].rtrim(dirname($_SERVER['REQUEST_URI']), '\\/').'/'.$uploadpath.'</b>';
    }
    else echo '<b>Unable to upload the file.</b>';
  }
  else echo $err;
}
?>
<div style="margin:1em auto; width:333px; text-align:center;">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data">
  Upload File: <input type="file" name="fileup" /><br/>
  <input type="submit" name='submit' value="Upload" />
</form>
</div>

Make a directory called private or something else and edit the script....

Chmod the directory to 777

then go to the script nameoffile.php select your file and click upload... Then you will get a direct link.....
Thank you!
Appreciate your time.
-Keelan
Can you make a customization , so the script can store files on another domain / path ?

because if you use it like this, then the domain where you upload the direct file will be detected very soon.
yes this script is basic enough for people who just want their own place to host the malware... It can be advanced, i will make a more advanced script for those looking for remote storage location away from the script itself... But in reality as long as you setup a cronjob to prune the directory of all uploaded files once a week or so you will be fine...
thats actually really helpful thanks
(Apr 27, 2015 01:06 PM)JP-Design Wrote:  thats actually really helpful thanks

Your welcome if anyone needs help with the script feel free to shoot me a pm..
(Apr 27, 2015 11:33 AM)__Digital__ Wrote:  yes this script is basic enough for people who just want their own place to host the malware... It can be advanced, i will make a more advanced script for those looking for remote storage location away from the script itself... But in reality as long as you setup a cronjob to prune the directory of all uploaded files once a week or so you will be fine...

Not completely true, domain will be detected very fast if files stay 1 week on the host. That can cause hosting issues, low execution rates etc.. Check other websites like pomf etc, you will see that the real download link is based on a subdomain or a completely different domain.
(Apr 27, 2015 01:50 PM)Johny.s Wrote:  Not completely true, domain will be detected very fast if files stay 1 week on the host. That can cause hosting issues, low execution rates etc.. Check other websites like pomf etc, you will see that the real download link is based on a subdomain or a completely different domain.

Yes i know all this, i am working on a script right now that allows fallback domains and generates subdomains... i have 3 servers setup for all this...... 1 for dns 2 for domains 3 for storage..... I am not going to release my personal script but i will make more advanced for the community here....
(Apr 27, 2015 11:33 AM)__Digital__ Wrote:  yes this script is basic enough for people who just want their own place to host the malware... It can be advanced, i will make a more advanced script for those looking for remote storage location away from the script itself... But in reality as long as you setup a cronjob to prune the directory of all uploaded files once a week or so you will be fine...

Anyone here who knows what a cronjob is would probably just scp it instead of uploading a script just to upload a file
(Jun 13, 2016 04:28 PM)ASLR Wrote:  Anyone here who knows what a cronjob is would probably just scp it instead of uploading a script just to upload a file

The easy way. Only way I do it.
Where others see walls, Legends see doorways.
Nice tutorial! Good work sharing to the community for free!
Thanks man...i really appreciate for the share..will try
Working on advancing the script, i am glad others have found it useful... The next version will have multi domain support and user management, delete file etc...
Great work and looking forward for your updates. HQ work.
(Dec 13, 2016 07:18 AM)roosterbabe36 Wrote:  Great work and looking forward for your updates. HQ work.

Nice gravedig.

Also that is some ugly php code.


Possibly Related Threads...
Thread / Author Replies Views Last Post
by HypnotizeOct 30, 2021 08:52 AM 6 341 Oct 30, 2021 08:52 AM
Last Post: palmy
by Sexy NameFeb 7, 2021 01:55 PM 16 1,083 Feb 7, 2021 01:55 PM
Last Post: Sexy Name
by 0xzlJun 24, 2019 12:15 AM 11 853 Jun 24, 2019 12:15 AM
Last Post: Stevbosco