Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

why wouldn't you just download the official iso. did you know? if you don't activate windows 10, a few features are locked out but it mostly works?

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Achmed Jones posted:

I'm a founding member of my company's new security team. A week ago, I was a hobbyist with an OSCP certification. We're starting on risk assessment, prioritization, and all that, but I'd love any links y'all might have (or books to read) that'll help us out.

are you already familiar with this article? https://medium.com/starting-up-security/starting-up-security-87839ab21bae

Shaggar posted:

the torrent is probably advertised as activation cracked

once I needed a windows vm and was anxious about it. I bit down and just downloaded and installed windows 10, figuring that I'd just reinstall the vm if the evaluation period ran out. instead it turned out that windows works at, like, 99% capacity without activation. you can't configure telemetry, personalize the taskbar, things like that

Heresiarch posted:

you still can't download a windows 7 ISO from MS afaict, but they even have a tool for downloading windows 10

downloading windows was, for the longest time, exclusively allowed to msdn subscribers. except windows 2000, because it had java built in and the settlement with sun means they can't distribute it any longer in any way or form, you have to find a 3rd party reseller that still has it

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
I wonder if 1password could use a custom keyboard instead of the clipboard, as an interface between password database and applications

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

ratbert90 posted:

Random question:

Is there a way for me to NOT have a self-signed certificate on an production embedded device that may not be connected to the internet?

on our appliance, we use a built-in hardcoded wildcard certificate. of course it's not secure, it's not hard at all to dump the private key shared by all appliances, but it's just for bootstrapping, the admin interface (with a hardcoded default password that must be changed at the first login btw :eng101:) has a function to generate a unique private key and a csr, and load a new certificate. you need something like that

our appliance requires adding a line to the hosts file with the initial hostname and ip of the device, but you could skip that step by using a hardcoded hostname like device.domain.tld that resolves to the hardcoded initial ip

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
just my luck, I get out of kitty jail just in time for the thread to be disappeared <:mad:>

italy is currently being rocked by a bizarre scandal of the cyber persuasion. the occhionero siblings, entrepreneurs in the finance sector, freemasons and by all accounts smart people (he's a nuclear engineer, she's a chemistry phd), are found to be conducting a multi-year spearfishing campaign against politicians, entrepreneurs and... other freemasons. their spyware appears to have been entirely developed in-house, and it's been active since at least 2011. kaspersky describes it as "amateurish" but I've gotten my hands on a recent sample and it appears to have been developed by someone who, if not a cybercriminal, has at least an idea of how malware analysis is done and how to slow it down. well, at least the anti-analysis protection and obfuscation was, and I know it's not a commercial framework because the few unobfuscated strings are unique to the malware

on the other hand, the occhionero siblings made huge, gigantic opsec blunders, and I argue that they had outside help with the malware development, because they clearly aren't serious criminals. consider the strongest piece of evidence against them: the malware exfiltrates data by sending e-mails and uses a commercial component to do so, which requires a license code to unlock. not only the malware contains said license code, but italian police asked the fbi for help, the fbi obtained the name of the licensee, and it was the occhionero brother: the guy had virtually embedded his real name in his phishing malware

on the other other hand, when the police came to arrest them, the brother rebooted the bitlocker-encrypted computer and now refuses to provide the password, while the sister locked her smartcard by entering the wrong pin several times. it's not going to help them much because the amount of evidence against them is impressive: they didn't just embed personally identifying information in the malware, they also hosted the c&c server on their company's website, and they talked about their dirty business on regular cleartext phone calls, that the police duly wiretapped

all considered, the campaign wasn't terribly successful. of about 18000 targets, only about 10% are estimated to have been compromised

the motive is still a mystery. insider trading seems to be the current consensus

the malware samples I've seen raise some extremely obvious red flags when run in the simplest of the automated analysis tools, and they're clearly part of a shared lineage dating back years, so it's a little amazing to me that it took so long for it to be noticed

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

flosofl posted:

Cool post, and keep us updated. This seems bizarrely inept.

I'm just wondering what the significance of being a freemason and targeting freemasons was. Is freemasonry different in Italy compared to the US? In my area they seem to be guys who hang out once a week and help sponsor kids/families to the Shriner's hospital. Honestly, they seem like Elks with less pancake breakfasts.

fun fact: they kept the information stolen from other freemasons in a folder (or category, I should reread the report) called "BROS". spankmeister gave a good summary of freemasons in italy and their historical significance

Powaqoatse posted:

but it does seem that they are "serious criminals" (if guilty) so i dunno what you mean by that one sentence

inexperienced and super cocky is what I mean

some gossip: it seems the sister's defense will throw the brother under the bus. italian press is inadvertently playing into their hand by being good ol sexists: they aren't a criminal enterprise but "an engineer and his sister", he is "a nuclear engineer" while she's painted mostly as a healthy eating freak and marathon runner, completely glossing over her considerable professional and academic resume and personal investment in the crime. one article in particular is this whole funny little sketch, where she comes to jail with a bag of expensive designer clothes and as soon as she has to leave it unguarded to go to her first hearing, the lot is stolen. she shakes her head, gets on the phone with a friend, and tells her in a controlled but exasperated tone to bring her a couple changes of the cheapest, ugliest clothes she can find. curtains, polite tittering from the dames

some technical details: contacts in the italian malware research community have shared a recent sample of eyepyramid (the official name of the malware - author given! - and an obvious reference to the all seeing eye). I'm very rusty re. reverse engineering as I haven't done it professionally in years, and only rarely recreationally, but I can tell a few things beyond a shade of doubt:
  • it was written in visual basic .net. this is super obvious from the heavy usage of the vb.net runtime library, but also from certain other characteristics of the code (I'll explain later). arguably, by a programmer not terribly familiar with the language
  • symbols (with some glaring omissions) have been obfuscated into big random strings. I'm unfamiliar with .net obfuscators and can't tell if it's a known commercial obfuscator or not (e: DURRRH it says dotfuscator right there I'm dum)
  • all strings have been obfuscated with an algorithm that's rather trivial to reverse through symbolic execution. if I had a tool like simplify for .net, I could strip this layer of obfuscation in a matter of seconds. I don't and I'm lazy and nobody is paying me for this, so I did it by hand. symbol names of the deobfuscation code have some irregularities that suggest that the string obfuscation class is part of the same suite as the symbol obfuscator
  • this is where it gets interesting. sensitive strings, such as phone-home addresses and credentials, have been obfuscated with a second, separate obfuscator, that doubles as an anti-debugging/anti-analysis component. symbolic execution won't help: the deobfuscation key isn't hardcoded, but it's derived from 16 runtime checks (was a debugger detected? is the malware in the autorun list? are we running in a vm? etc. and much more specific and kinda bizarre conditions). since it boils down to a 16 bit 3DES key, it's really easy to blindly bruteforce the entire key space, but still. those fuckers. well, don't come tell me someone with no experience in malware writing came up with this. don't tell me it's a commercial component they bought either, because a bug/omission in the symbol obfuscator left some symbols in cleartext, and by googling them all hits are from earlier variants of eyepyramid
  • finally, an assembly linker was used to merge external libraries (such as the aforementioned mail component with which the siblings doxxed themselves) into the executable. I can totally believe they did this part themselves because instead of link-then-obfuscate, they obfuscate-then-link, making it trivial to separate the external libraries from the malware and greatly simplifying the analysis

I said that it would be obvious it was written in vb.net even if it didn't use the vb.net runtime library, and I'll explain why. let's look at a typical routine, messily and partly incorrectly decompiled by dotpeek:

C# code:
  public static void f6J8eFg3YUvv4j3xEUTV3E1CEBj3xEUTV3E1CE0PYUanFmGRebVA0srGwqvHpDYA()
  {
label_0:
    int num1;
    int num2;
    try
    {
      ProjectData.ClearProjectError();
      num1 = 1;
label_1:
      int num3 = 2;
      if (kPd9dIhV/* long name omitted */.hhqKbrLk/* etc. */())
        goto label_8;
label_2:
      num3 = 5;
      if (!erRFjb3s/* ... */.HEKvagU1/* ... */())
        goto label_8;
      else
        goto label_8;
label_4:
      num2 = num3;
      switch (num1)
      {
        case 1:
          int num4 = num2 + 1;
          num2 = 0;
          switch (num4)
          {
            case 1:
              goto label_0;
            case 2:
              goto label_1;
            case 3:
            case 6:
            case 7:
              goto label_8;
            case 4:
            case 5:
              goto label_2;
          }
      }
    }
    catch (Exception ex) when (ex is Exception & (uint) num1 > 0U & num2 == 0)
    {
      ProjectData.SetProjectError(ex);
      goto label_4;
    }
    throw ProjectData.CreateProjectError(-2146828237);
label_8:
    if (num2 != 0)
    {
      ProjectData.ClearProjectError();
    }
    else
    {
      int num3;
      int num4;
      while (num3 == num4)
      {
        num4 = 1;
        int num5 = num4;
        int num6 = num3;
        num3 = num5;
        if (num3 > num6)
          break;
      }
    }
  }
(ilspy is nearly useless here as it spits out internal garbage when it gets to the switch statement. unsurprising, as those gotos are illegal in c# because the labels are out of scope in the switch statement)

initially I thought this bizarre code pattern (repeated over and over) was a form of code flow obfuscation. it doesn't make sense though, because if you can alter code flow, why do it in this very specific, deterministic way that isn't terribly hard to undo? why a try/catch and a switch? well, thanks to my past experience with visual basic (my first "serious" language!), I soon recognized it as "on error resume next", a notorious error non-handling construct that just throws any errors away. on classic vb, "on error resume next" actually produces more efficient code, as it omits error checks. on a platform like .net where errors are reported through structured exception handling, always, the compiler has to emit... that. mark position, catch exception, switch on current position, goto next statement. the above function simplifies to a more palatable:

C# code:
  public static void f6J8eFg3YUvv4j3xEUTV3E1CEBj3xEUTV3E1CE0PYUanFmGRebVA0srGwqvHpDYA()
  {
    ProjectData.ClearProjectError();

    if (kPd9dIhV/* ... */.hhqKbrLk/* ... */())
      goto label_8;

    if (!erRFjb3s/* ... */.HEKvagU1/* ... */())
      goto label_8;
    else
      goto label_8;

label_8:
    return;
  }
and by removing more useless vb cruft and translating unstructured gotos into structured code by hand, further into:

C# code:
  public static void f6J8eFg3YUvv4j3xEUTV3E1CEBj3xEUTV3E1CE0PYUanFmGRebVA0srGwqvHpDYA()
  {
    if (!kPd9dIhV/* ... */.hhqKbrLk/* ... */()) {
      erRFjb3s/* ... */.HEKvagU1/* ... */();
    }
  }
it would be nice if decompilers could recognize this automatically, but they don't. once you get used to it, though, you can skip all the extraneous code at a glance, without even editing it away

other telltale signs of vb.net are the many reference variables, which are illegal in c# but not in vb (dotpeek can only decompile to c#):

C# code:
  public static int x4SlgKmPmgp18FZP4R6VdaGkIBKWb9HjgdCqVbAKWb9HjgdCqVbAoM5WyXRRPRuA(bool install = false)
  {
    int num;
    try
    {
      string olw48CagNqKpmDleguA = Xpg7jswb/* ... */.JdKDN9YX/* ... */;
      // ISSUE: explicit reference operation
      // ISSUE: variable of a reference type
      string& keypath = @olw48CagNqKpmDleguA;
      string zkpk2Ax1Q44ZvmyRpA = Xpg7jswb/* ... */.gNqKPmDL/* ... */;
      // ISSUE: explicit reference operation
      // ISSUE: variable of a reference type
      string& keyname = @zkpk2Ax1Q44ZvmyRpA;
      // ...
and of course, the many gratuitous reference function arguments, because in vb.net, for backwards compatibility, function arguments are always passed by reference if you don't specify otherwise. oh and all the classes full of static methods that are obvious vb modules. it's all very vb

Powaqoatse posted:

also please dont troll negrotown (i hope thats what it was)

nein tyrante

e: unbroke tables

hackbunny fucked around with this message at 06:31 on Jan 17, 2017

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
sorry to disappoint with a relatively lame post and no eyepyramid update, but the opera 12 source code has just been leaked:

https://github.com/prestocore/browser

already dmca'd lol but mirrored here:

https://bitbucket.org/prestocore-fan/presto/

it's out and about! if you're still using opera 12 for some goddamn reason (not even I am) it's time to quit it for good

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Powaqoatse posted:

goddamn youre amazing

no I'm really not but thanks anyway

btw there is no writeup yet, and all my contacts have gone silent so I guess they won't give updates outside of official channels from now on. everything you'll read here from me is an Official SA Forums Exclusive™ (tagline: "Where your :10bux: count")

spankmeister posted:

Did you try de4dot? (and then ilspy)

no! but I will now. I have to redo my work from scratch anyway

I'm not too familiar with .net reversing, basically I tried to load the sample in ida pro, ida gave up due to "corrupted" metadata, and I literally turned to a wikipedia search for ".net decompiler", and found ilspy and dotpeek. they both have their strengths and weaknesses (eg. ilspy supports vb.net, but dotpeek doesn't poo poo the bed as much), and neither is quite as good as java decompilers like procyon and (:rip:) jad. they recommended I try dnspy to edit things like the invalid symbol names before running the assembly through a decompiler, but if a tool can do it automatically, even better

I have time to spare and I'm running out of interesting cars to buy in gran turismo 6, so I'll give it another shot. stay tuned

ynohtna posted:

hrm, i think you need to spend a few days gently meditating on the purity of procrastination

I'm lazy but patient and I can do repetitive chores for hours no problem. the non-lazy alternative is finding or writing a symbolic execution engine that supports .net and p-invoked native code, because I imagine that crypto routines are native. alternatively hand-coding hooks for all external routines. and that's :effort:

e:

crazysim posted:

i should add there's a de4dot integrated/engine replacement of ilspy called dnspy

oooh so much to learn

hackbunny fucked around with this message at 19:24 on Jan 17, 2017

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
hackingteam :salt:: https://motherboard.vice.com/read/after-cellebrite-breach-hacking-team-lashes-out-against-vigilante-hackers

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Wiggly Wayne DDS posted:

more eyepyramid info, it uses a lot more third-party software than previously thought: https://blog.trendmicro.com/trendlabs-security-intelligence/uncovering-inner-workings-eyepyramid/

dang I'm slow. apparently I have one of the most recent samples! crrr.exe, but the table at https://documents.trendmicro.com/assets/Appendix_uncovering-the-inner-workings-of-eyepyramid.pdf doesn't include the c&c url (it's still https://webdav.hidrive.strato.com/users/oncole3991 btw, and don't bother going there as the account has been deactivated), and their "notable email addresses" column is misleading, it's really the usernames of the exfiltration webdav boxes, afaict

btw thanks spankmeister and/or whoever recommended de4dot because it was a godsend

I did eventually write the code to bruteforce the string encryption/anti-debugging protection hybrid algorithm, found some of the webdav boxes used for exfiltration, and wouldn't you know



one of those was still up! I'm terribly curious what's inside those files. I have to look up the exact encryption scheme used but the key and iv should simply be derived by hashing the filename

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

still handles vb code horribly. dotpeek works better for now, even when decompiling vb to c#

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
eyepyramid trivia: there's some unused code related to captchas, functions to download/upload both images and text from <url>/captcha/<unique id>. the same module contains code to scrape forms from the page currently open in IE and upload them. no idea about the captcha stuff but it seems out of place. I wonder if eyepyramid is part of a larger family of malware

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Wiggly Wayne DDS posted:

from what i surmised the captcha section is a misdirect when communicating moderately sized blobs to weird domains

the code seems simply unused to me, and the "captcha" url component would go through the usual sha1 obfuscation anyway, so I'm not sure about this. and it really seems to be related to captchas, as it can for example deserialize received data to a System.Drawing.Image

unless you're talking about an older sample, I guess. crrr.exe/d3ad32bcb255e56cd2a768b3cbf6bafda88233288fc6650d0dfa3810be75f74c does nothing with it

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

A Man With A Plan posted:

While very cool, I'd recommend a lot of caution with putting any computer-linkable stuff related to you on a server that will almost certainly be part of a criminal investigation.

I took precautions. barring stupid mistakes I should be fine

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Phone posted:

brianna wu has weighed in on the meitu thing ITS A MATTER OF NATIONAL SECURITY

keep challenging state actors to a street fighter 2 battle to the death lol

brianna who?

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
eyepyramid update: I'm now 99% sure that the sample I was given is just a download-and-execute and that the real payload is elsewhere. bummer. all it does outside of executing other components downloaded from the c&c is to disable various os and office security features, attempt to kill antivirus software, and open windows firewall

writeup on the string encryption/self-protection hybrid later. man, what a drag

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

LeftistMuslimObama posted:

i bet it was really someone's big ole donger. some guy on the plane had to buy another seat in which to sling his truly gargantuan and yet somehow tenderly beautiful meat monster and the captain radioed down to the tarmac "houston we have the biggest drat darn ding donger i ever did see were gonna need to burn some fuel so we can get this elegant creature there iykwim"

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
why do I keep raving about eyepyramid's string encryption? because you see, it's actually quite interesting. let's take the typical encrypted string:
C# code:
    public static string tXmat8k68AD15JNkI0ZLvLcbh9NKczW8BvlBZb0NKczW8BvlBZbAmBtKbwu6wn6A()
    {
        // compiler generated "on error resume next" code excised
        byte[] hgrghk = new byte[24] { 46, 248, 3, 205, 79, 223, 48, 194, 157, 28, 73, 207,
            64, 110, 193, 246, 239, 23, 169, 135, 200, 121, 110, 230 };
        byte[] tmpwebshell = new byte[24] { 118, 67, 213, 247, 212, 109, 179, 250, 185,
            125, 44, 82, 118, 64, 226, 0, 125, 212, 185, 61, 135, 177, 30, 246 };
        byte[] carrier = new byte[24] { 85, 196, 232, 151, 14, 97, 20, 134, 82, 26, 214,
            184, 145, 233, 79, 79, 57, 122, 131, 156, 209, byte.MaxValue, 197, 11 };
        return Secrets.DecryptString(hgrghk, tmpwebshell, carrier);
    }
encrypted strings all look like this, the only thing that changes is the byte arrays. I renamed the module that deals with this encryption scheme "Secrets" and the function that decrypts strings "DecryptString". note that the variable names (hgrghk, tmpwebshell and carrier) were derived by the decompiler from the argument names of DecryptString, which the obfuscator, whether intentionally or mistakenly, didn't rename, and they provide hints to their meaning. we'll see later. for now, let's have a look at DecryptString:
C# code:
public sealed class Secrets
{
    internal static string DecryptString(byte[] hgrghk, byte[] tmpwebshell, byte[] carrier)
    {
        string s;
        byte[] bytes;
        
        bytes = Module7.DecryptData(hgrghk, Module8.GetMasterTDESKey(),
            Module8.GetMasterTDESIV());
        s = Encoding.Unicode.GetString(bytes);
        if (!string.IsNullOrEmpty(s) && Encoding.Unicode.GetBytes(s).SequenceEqual(bytes))
            return s;

        bytes = Module7.DecryptData(tmpwebshell, Module8.GetMasterTDESKey(),
            Module8.GetMasterTDESIV());
        s = Encoding.Unicode.GetString(bytes);
        if (!string.IsNullOrEmpty(s) && Encoding.Unicode.GetBytes(s).SequenceEqual(bytes))
            return s;
    
        bytes = Module7.DecryptData(carrier, Module9.GetMasterTDESKey(),
            Module9.GetMasterTDESIV());
        s = Encoding.Unicode.GetString(bytes);
        if (!string.IsNullOrEmpty(s) && Encoding.Unicode.GetBytes(s).SequenceEqual(bytes))
            return s;

        return "";
    }

    // ...
as you can see, it decrypts the string from one of the three byte arrays, whichever decrypts correctly. without showing too much code, the decryption algorithm is:
  • let E be the byte array to be decrypted
  • let M be a sequence of bytes (master key)
  • let K be MD5(M)
  • let IV be SHA256(M)
  • let P be 3DES-CBC(K, IV, E)
not terribly competent use of cryptography but pretty straightforward. what makes it interesting is where M comes from. M is a serialized object, specifically an array of booleans serialized by System.Runtime.Serialization.Formatters.Binary.BinaryFormatter. the array of booleans is what makes this relatively crappy obfuscation true encryption and very, very interesting. every time the malware needs to decrypt a sensitive string (url, hostname, username, password etc.), it recalculates the whole array with a series of very interesting runtime checks:
C# code:
    internal static void InitializeMasterKey()
    {
        MasterKeyBits[0] = WasDebuggerDetected();
        MasterKeyBits[1] = AreRunExeOrGhkExeOrStkrExeInstalled();
        MasterKeyBits[2] = ApplicationHasExeExtension();
        MasterKeyBits[3] = ApplicationDoesSystemAutorun();
        MasterKeyBits[4] = RunningFromDesktop();
        MasterKeyBits[5] = RunningFromDocuments();
        MasterKeyBits[6] = RunningFromSystem();
        MasterKeyBits[7] = RunningFromTemp();
        MasterKeyBits[8] = StartedManuallySoonAfterDrop();
        MasterKeyBits[9] = StartedByAutorun();
        MasterKeyBits[10] = ApplicationHasTmpExtension();
        MasterKeyBits[11] = RunningInVMAndApplicationOlderThan5Days();
        MasterKeyBits[12] = Module9.GetExeHasBasename1();
        MasterKeyBits[13] = Module5.CachedDoesHardwareIdFileExist();
    }
first of all, note that the last two booleans are always false, which restricts the encryption to a 14 bit key - extremely easy to bruteforce (which I did). the checks range from the predictable to the clever to the extremely interesting, let's see them quick:
  • WasDebuggerDetected: was a debugger ever attached to this process? if we don't know yet, is a debugger attached right now? predictably, this must always be false: if we attach a debugger, this flag will eventually go true (and stay true until the process terminates), the key will go bad, none of the sensitive strings will ever decrypt again and the malware will stop working, hindering analysis. it's a simple but really clever idea that completely kills automated deobfuscation through symbolic execution, and makes analyzing a live sample a real pain in the rear end
  • AreRunExeOrGhkExeOrStkrExeInstalled: I mentioned that the sample I analyzed seems to be a simple dropper. it can drop up to three executables, internally named run.exe, ghk.exe and stkr.exe (on disk, they have different names - for example, run.exe can be called vasqy.exe, vrtdrv.exe, winxdrv.exe etc.). this check returns true if any of the three is currently installed in the system directory (windows\system32). surprisingly, bruteforcing the key reveals that this check must return true, which means an apparent chicken-and-egg problem: how can the dropper download those executables, if downloading them requires them to be already installed? well, if you read the code of DecryptString carefully, you'll see that there is, in fact, a second, distinct master key, used to decrypt the third byte array ("carrier"). we'll look at this in detail, later
  • ApplicationHasExeExtension: whether the program's executable file is something.exe. true for "hgrghk", false for "tmpwebshell". this is our first hint that hgrghk, tmpwebshell and carrier are three distinct agents of this malware, sharing a common code base, but fulfilling different roles
  • ApplicationDoesSystemAutorun: whether the currently running program is configured to autorun from the system-wide Run registry key. true for "hgrghk", false for "tmpwebshell", which suggests that hgrghk is the persistent agent
  • RunningFromDesktop: whether we're running from the desktop folder, or a subfolder of the desktop. must always be false. a really simple anti-analysis roadblock
  • RunningFromDocuments: same except from the documents folder
  • RunningFromSystem: whether we're running from the system32 directory. predictably, true for "hgrghk", false for "tmpwebshell"
  • RunningFromTemp: whether we're running from %tmp%. unsurprisingly, false for "hgrghk", true for "tmpwebshell"
  • StartedManuallySoonAfterDrop: a relatively complex check. the process start time must be within 2 minutes from the executable's last write time, and the executable must not be configured for autorun. false for "hgrghk", true for "tmpwebshell", meaning that tmpwebshell agents are downloaded to %tmp%, executed immediately and must not autorun at logon. an anti-analysis trick to ensure that agents only work in a restricted set of expected circumstances
  • StartedByAutorun: another non-trivial - and pretty clever - check. it finds a process named explorer.exe, takes it start time, adds 2 minutes, and returns true if the current process was started before then and if the current executable is configured to autorun. pretty much ensures that a malware analyst can't run an unmodified copy of this malware without some awkward gymnastics. mirrors the previous check, and must be true for "hgrghk" and false for "tmpwebshell"
  • ApplicationHasTmpExtension: whether the program's executable file is something.tmp. false for "hgrghk", true for "tmpwebshell"
  • RunningInVMAndApplicationOlderThan5Days: eyepyramid has a couple checks against running in a vm, and this is one of them. it queries wmi namespace root\cimv2 with query SELECT * FROM Win32_ComputerSystemProduct, which returns an object that represents the computer hardware. it queries this object's Name property, and sees if it contains the substring "virtual", which typically indicates a virtual machine (try it yourself in a windows vm, using builtin utility wbemtest). then, it takes the main executable's version number, x.y.z.w, and extracts the z and w fields, and uses them to build a timestamp (jan 1st 2000 + z days + w * 2 seconds). my sample has version 4.5.5519.26999, which comes out to february 10th 2015, two seconds to 3 PM, which agrees with the linker timestamp (Tue Feb 10 15:03:13 2015) and is almost certainly the build timestamp. RunningInVMAndApplicationOlderThan5Days takes these two values, and checks whether we're currently running in a VM and it's at least 5 days from when the malware was built. this check is expected to be false: we can only run in a VM within 5 days from the build time. probably both an anti-analysis check and a way for the malware author to do some in-house testing before deployment
  • Module9.GetExeHasBasename1: whether the program's executable file is named plfyp.exe, pming.exe, etc. (see the trend micro article for the full list). perhaps surprisingly the expected value of this check is false, meaning that those names are reserved for the "carrier" agent
  • Module5.CachedDoesHardwareIdFileExist: whether a file that uniquely identifies the current machine exists. must be true. this file is just an infection token, it contains 33 bytes of random garbage, and its name is the sha1 hash (in hex) of the utf-16 encoding of the hexadecimal representation of the sha1 hash of the utf-16 encoding of a concatenation of processor id, disk signature, computer system name and motherboard serial number (whew!). eyepyramid is this strange mix of pretty solid knowledge of malware development and analysis, and borderline inept use of .net. like how it's entirely written in procedural vb.net, using on error resume next and byref function arguments, using utf-16 instead of utf-8 (which I guess is entirely because the utf-16 codec class is called UnicodeEncoding, and the author was looking for the shortest, most obvious path from string to byte array). I'll hazard the guess that the author (or well, one of the authors) is an old school virus writer who never learned much about windows or high level programming languages, and taught himself vb.net for this project. he probably hadn't done any serious malware development in a while, but it's clear that he was somewhat on top of the state of the art of malware analysis
this covers "hgrghk" and "tmpwebshell". probably due to a mistake in my bruteforcer, I couldn't find the key for "carrier", but give me some time and I'm confident that I will

and remember, you heard it first here: it's a Dead Gay Forums Exclusive™ - Where Your :10bux: Count

hackbunny fucked around with this message at 05:19 on Jan 24, 2017

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
huh it was quick, I wonder what I was getting wrong the first time. as I mentioned, the "carrier" type of agent uses a different master key to decrypt its sensitive strings. since the master key is derived from a number of runtime checks, and only one set of outcomes is the correct one (i.e. it allows the decryption of strings that allow the malware to work), we can deduce a little bit more about the purpose and operation of the malware. specifically, the master key is derived from an array of booleans, filled thus:
C# code:
    internal static void InitializeMasterKey()
    {
        MasterKeyBits[0] = Module8.WasDebuggerDetected();
        MasterKeyBits[1] = GetExeHasBasename1();
        MasterKeyBits[2] = Module8.ApplicationHasExeExtension();
        MasterKeyBits[3] = Module8.ApplicationDoesSystemAutorun();
        MasterKeyBits[4] = Module8.RunningFromDesktop();
        MasterKeyBits[5] = Module8.RunningFromDocuments();
        MasterKeyBits[6] = Module8.RunningFromSystem();
        MasterKeyBits[7] = Module8.RunningFromTemp();
        MasterKeyBits[8] = Module8.StartedManuallySoonAfterDrop();
        MasterKeyBits[9] = Module8.StartedByAutorun();
        MasterKeyBits[10] = Module8.ApplicationHasTmpExtension();
        MasterKeyBits[11] = Module.GetSmallHardDiskAndNotXP();
        MasterKeyBits[12] = IsBuildOlderThan20150211();
        MasterKeyBits[13] = IsBuildOlderThan8Days();
        MasterKeyBits[14] = DateTimeUtils.IsClockAccurate();
        MasterKeyBits[15] = Module4.Computer.Network.IsAvailable;
    }
many checks are the same performed to decrypt the hgrghk and tmpwebshell strings but in a different order. some checks have pretty obvious expected outcomes: 0, 4 and 5 must be false, 14 and 15 must be true, and 1 is likely true (it was false for hgrghk and tmpwebshell). by hardcoding 6 out of 16 checks, we reduce the key strength to a mere 10 bits, which can be bruteforced in a matter of seconds (it's just 1024 tries at most), giving the following set of expected outcomes:
  • WasDebuggerDetected: obviously false
  • GetExeHasBasename1: true, as I expected. from now on, I can call the nebulously named "Basename1" entity "CarrierBasename", as it's the set of valid on-disk filenames (minus the .exe extension) for "carrier" type agents, making the decompiled code a little more readable. this newfound readability emboldens me to state that the sample I analyzed is a "carrier" type agent, and that, therefore, a "carrier" agent is a dropper that downloads other agents and executes them (including updates to itself)
  • ApplicationHasExeExtension: true
  • ApplicationDoesSystemAutorun: true
  • RunningFromDesktop: false, as expected
  • RunningFromDocuments: same
  • RunningFromSystem: true, but it pretty much followed from ApplicationHasExeExtension being true
  • RunningFromTemp: false, by exclusion. if the key was larger and bruteforcing impractical, I could slash the key space a bit by ensuring that only one of the RunningFrom flags could be true at the same time, reducing 16 possible cases to 5 and almost halving the key space twice
  • StartedManuallySoonAfterDrop: false. this pretty much followed from ApplicationDoesSystemAutorun being true
  • StartedByAutorun: true, predictably. mostly noting this to myself for future reference
  • ApplicationHasTmpExtension: can't be true because ApplicationHasExeExtension is true
  • GetSmallHardDiskAndNotXP: hey, now, this is an interesting check. it checks if the system disk is smaller than 50 GB and if the operating system name does not contain the string "Microsoft Windows XP"; expected value is false. I'm positive that this is an anti-vm check: if the disk is unrealistically small, and the machine isn't old enough to justify it, then we're probably running in a fake environment of some kind and not a real target
  • IsBuildOlderThan20150211: false. what a weird check! it compares two static dates: the build timestamp encoded in the version number, and february 11th, 2015 (the next day). always evaluates to false, regardless of when, where and how the code is executed. very confusing
  • IsBuildOlderThan8Days: false. it seems carrier agents are timebombed and automatically die if they can't update themselves after 8 days
  • DateTimeUtils.IsClockAccurate(): I expected this to be true, and it was. what this check does is, every 5 hours, download the front page of a randomly chosen major website (among which amazon, aol, google and youtube), and derive the current date and time from the Date http header field. if the local clock is within 60 minutes of the remote time, then the check returns true. I have no idea why the carrier cares so much about this
  • Module4.Computer.Network.IsAvailable: true. since the previous check defaults to true if the network isn't available, this ensures that true means we actually checked. I have never used vb.net so I'm not sure what's the meaning of the automatically generated module and all the machinery behind the "Computer" variable which is, in fact, a static property getter based on a, dunno, some kind of singleton based on System.Activator. I suspect com fuckery. I should use vb.net to see exactly what makes the compiler generate this kind of code
the press and antivirus firms were very quick to dismiss this as an unsophisticated malware. in fact, I've found evidence of:
  • a considerable amount of planning
  • a certain degree of opsec (although with glaring mistakes that eventually killed the whole operation)
  • knowledge of how malware is analyzed by malware experts and automated software
  • a unusual and clever "store and forward" model of c&c where all communication between agents and console happens through a third party (specifically, wbem folders, imap folders and emails)
  • self-updating software
  • non-trivial features like provisioning x509 certificates
  • a rather complex console that can push updates and receive operational logs from agents... written in vb.net
on the other hand, it's true that the author(s) show some naivety:
  • vb.net for christ's sake, and entirely procedural vb.net at it. I found like one lambda function though, as a linq "where" expression
  • clearly unfamiliar with medium-advanced programming concepts like encryption and unicode
  • use of a commercial obfuscator that can be trivially defeated
  • misuse of a commercial obfuscator in fact, as third party libraries like SevenZip and MailBee were left unobfuscated. reminder that this made it trivial for investigators to realize that the string "MN600-...-0E8C" was a MailBee license, which was tracked back to the occhioneros and led to their arrest. well if I get bored, I could try to crack MailBee's license key scheme :v:

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Bhodi posted:

I suspect this is a check to short-circuit similar to RunningInVMAndApplicationOlderThan5Days to prevent 'dev' builds (built after the hard-coded feb 2015 date) executing automatically. It's a way to pin auto-execution to only code that has (presumably) been tested to work in the build-test vm framework and prevent auto-execution for newer code, though it's a really wacky way it do it. I could see doing it this way if you have some sort of framework that you use for both development of new features and testing of the operation of mature ones, and your build system inserts that date into the code based on last tested-good configuration (or you alter it manually).

note that the protection code only prevents communication with the c&c and exfiltration hosts. the malware uses a different set of checks at startup, and iirc the build date check isn't among them (ok, I checked, and the only build date check done at startup is IsBuildOlderThan8Days)

Munkeymon posted:

makes it harder to change the date just to see how the behavior changes or get the date-based behavior you want?

but only carrier does this check, hgrghk and tmpwebshell don't. no, it occurs to me it's because of code I haven't shown yet: when a carrier downloads other agents, it performs several freshness checks on their last modified and build dates

Munkeymon posted:

why the autorun checks? do analysis tools like to just use windows autorun to start the malware in the VM?

this:

Volmarias posted:

Sounds like the opposite; starting it manually to see what it does would result in nothing if "true" was the expected value here.

Chalks posted:

The use of a paid for library implies for me that more than one person was developing this, and the second less experienced person probably just picked up a library for sending mail that they had used in a previous legitimate project without realising it was tied to their personal details. It seems impossible to believe that someone who was so deep into illegal activity wouldn't simply pirate a copy of the library (or if it was the more experienced developer, I'm sure they would be capable of interacting with the email protocol directly or at least using an open source alternative)

don't underestimate MailBee, it seems an incredibly good library. it's not just an smtp client, it does imap too, and even smime. oooh I almost forgot, there's a couple embedded x509 certificates, I really should dump them. it could be interesting

Chalks posted:

I guess there wasn't any information released about how long ago the license for the mail library was purchased vs when the malware first included it? I expect the dates will be some time apart.

I'll have to look for older samples. this thing has been around, under everyone's radar, for almost 6 years!

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
huh actually. hm. they're not the kind of certificates I expected. the first is a root authority, Global Systems Comm. CA. is it even legit? supposedly a company in singapore. anyway, this is installed as a trusted ca in the system certificate store

the second is an encryption certificate, as I expected (it's used to encrypt messages with s/mime), but it doesn't have any interesting information: it's self-signed and the subject common name is simply "Administrator", clearly a test certificate generated with some wizard on a windows machine. maybe a bit more interesting is the issue date: sept 12th 2011, it's been around for a while. sadly, it's probably not an easily searchable pattern because the byte array is built element by element by compiler generated code. if only I could get my hands on just another sample... the expiration date is a little weird, jan 28th 2039, which doesn't seem a nice round date. maybe it's hardcoded in the wizard, does it ring a bell for anyone? (fake edit nevermind, it is a round date: 10000 days after the issue date)

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

huh. just today I looked in my spam folder and found a long forgotten sign-up confirmation e-mail from them. clicked the link and the site was down. I open the secfuck thread and welp

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
guy I helped with the eyepyramid analysis finally released his writeup: http://blog.talosintel.com/2017/01/Eye-Pyramid.html

some notes:

quote:

The sample is written in .Net and it is heavily obfuscated. Although at first sight we can also extract some interesting strings which are useful for possible ClamAV or Yara signatures. The author paid attention to hide the core functionalities by using either known .Net obfuscators or cryptography to hide crucial information such as URLs, email addresses and credentials.

as I noted before, the obfuscators, for one reason or another, were actually unable to hide a large number of uniquely identifying strings, for example argument or enum names, such as hgrghk, tmpwebshell and THISPROPERRUN. go ahead and google them, they're unique to eyepyramid and will reveal a few more samples (that however don't appear to be downloadable. anyone have access to a yara-searchable repository and wants to give me a hand?). the order for custody against the occhioneros pops up in that search too and it's full of details on the c&c infrastructure and the kind of exfiltrated data... I should really go and reread it more closely, and cross-reference it with what I have

quote:

Generally speaking, reversing .Net applications is not a difficult task because it is possible to decompile the binary. There are many tools do it such as ILSpy, dotPeek, etc. We first tried decompiling the sample with ILSpy but the obfuscation was heavy and all over the place. As a result the ILSpy output was not very useful and we had problems identifying the entry point of the application. The sample cannot be debugged, and it does not run inside virtual machines due to several and sometimes trivial (but effective) anti-debugging and anti-vm checks.

dotpeek works a little better, but barely: it still produces non-compiling output, due to not supporting visual basic, which produces .net code that can't be decompiled to c# - some examples:
  • vb has byref variables, but c# can only do ref arguments
  • vb's on error resume next construct yields a spaghetti dish of switches, gotos and try-excepts that no decompiler can currently unravel
  • vb emits exception catch filters that can't be expressed in c#
vb also emits certain statements and expressions as calls to internal runtime library functions. ilspy nominally supports vb, but it doesn't seem to know that, say, a call to the string comparison function can be decompiled to a string comparison expression, which is more concise and immediately readable. or that calls to ProjectData.SetProjectError are unnecessary because the compiler automatically inserts them

the entry point is actually easy to find: just ask dotpeek (or dnspy) to jump to it. sure, you can't grep for "main" because it's been renamed by the obfuscator, but the metadata can't be obfuscated so much that the entry point isn't hardcoded in the executable and easy to look up (or the executable won't run!). for example, in my sample, the entry point is token 600003D, as shown by a simple dumpbin /clrheader:
pre:
Microsoft (R) COFF/PE Dumper Version 14.00.23918.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file d3ad32bcb255e56cd2a768b3cbf6bafda88233288fc6650d0dfa3810be75f74c.bin

File Type: EXECUTABLE IMAGE

  clr Header:

              48 cb
            2.05 runtime version
           CFF54 [  10DD60] RVA [size] of MetaData Directory
               1 flags
                   IL Only
         600003D entry point token
          1DDCB4 [    6E02] RVA [size] of Resources Directory
               0 [       0] RVA [size] of StrongNameSignature Directory
               0 [       0] RVA [size] of CodeManagerTable Directory
               0 [       0] RVA [size] of VTableFixups Directory
               0 [       0] RVA [size] of ExportAddressTableJumps Directory
               0 [       0] RVA [size] of ManagedNativeHeader Directory


  Summary

        2000 .reloc
       42000 .rsrc
        2000 .sdata
      1E4000 .text
if we dump the raw IL disassembly with another basic tool like ildasm, we'll see that token 600003D is static method sCmC2l6KkDsh1x8asULRL1PGbAx8asULRL1PGbABAvEd7g8ENYEAFxPIULW8eacA of class kYtRMaTKS2nV0kYtRMaTKS2nVAPOcntMo7f1m7A1LkTwxy7wES1A1LkTwxy7wESA. in fact we could use ildasm alone, as it helpfully marks the entry point method with the ".entrypoint" directive:
code:
.class /*02000009*/ public auto ansi sealed kYtRMaTKS2nV0kYtRMaTKS2nVAPOcntMo7f1m7A1LkTwxy7wES1A1LkTwxy7wESA
       extends [mscorlib/*23000001*/]System.Object/*01000012*/
{
  .custom /*0C000027:0A000012*/ instance void [Microsoft.VisualBasic/*23000002*/]
Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute
/*01000014*/::.ctor() /* 0A000012 */ = ( 01 00 00 00 ) 
  .method /*0600003D*/ public static void 
          sCmC2l6KkDsh1x8asULRL1PGbAx8asULRL1PGbABAvEd7g8ENYEAFxPIULW8eacA() cil managed noinlining nooptimization
  {
    .entrypoint
    // ...
easy peasy!

quote:

For instance, it creates a registry key named 'default.reg' and it is added to the registry by directly invoking the regedit command.

this is glossing over a couple important points. first, all writes to the registry, both additions and deletions, go through temporary .reg files passed to regedit (yes! .reg files can delete keys and values, other than adding/changing them. it's a little known feature), no idea why. maybe the malware author was lazy

second, the default.reg file is extremely interesting. not only it seems part of a named component, as its full name is in fact Shutil.default.reg (and there's a few other unobfuscated references to "shutil" scattered about), but it does many, many things of note. I'm extrapolating a little, but it seems to:
  • lower the security level of office suite applications, including apparently whitelisting dangerous attachments in outlook
  • lower the security level of internet explorer (or so I assume)
  • adds several antivirus main executables (avgnt.exe, avguard.exe, etc.) under the DisallowRun group policy. the article mentions this too
  • disables wpf sandboxing or something like that
  • disables all security center and windows firewall alerts. nasty!
  • specifically disables "antivirus disabled" security center alerts for a dozen av products
  • mucks with a couple security policies: sets EnableLUA to 0 and LocalAccountTokenFilterPolicy to 1. no idea what these do but it can't be anything nice
  • enables the clearing of the swap file at shutdown. not sure what this is meant to accomplish
  • disables the security center service for good measure
  • configures some services for autostart, like CryptSvc, HTTPFilter (server-side https, part of iis), ose (part of the office installer), WebClient (webdav client), wuauserv (Windows update). weird, weird, weird! most of these make sense but what does it care about HTTPFilter or ose?
  • the weirdest yet: configures the windows time service. default.reg contains a full dump of the configuration from (I assume) the dev's machine, but I'm not sure what are the relevant parameters. some parameters, in fact, seem completely obsolete in windows 10, and I wonder if applying this configuration isn't actually liable to screw up the time service unpredictably. the parameters that I can find on my machine, on the other hand, have identical values, so I wonder if it's just meant as a way to reset the configuration to the default

here is the whole thing for your reading pleasure: http://pastebin.com/28BdEsvY

something about default.reg rubs me the wrong way. it looks copy pasted from another project, as the list of av software doesn't match the list embedded in the executable, there's a couple of weird comments embedded in it, and there's that component name (Shutil). sadly I don't get any google matches for the weird random alphanumeric strings in comments

quote:

The next step is to check and 'fix' the security descriptors of many folders via 'cacls.exe'. Specifically, this code is interested in the Windows Firewall and a long list of possible antivirus software (among them also 'ClamAV for Windows'). To find these programs the malware looks in typical locations such as ProgramFiles, ProgramFiles (x86), etc. You can see from the picture below 'cacls.exe' and part of the security products list:

or more specifically:
  • for each of program files directory, 32-bit program files directory, local app data, common program files:
    • for each subdirectory (Ad-Aware Antivirus, Alice Total Security, AhnLab, etc.), if it exists:
      • recursively grant full access to administrators, users, system. some antivirus software protects itself with restrictive acls and I guess this is supposed to undo that protection
      • recursively revoke full access to current user. I suppose this is to (superficially) prevent the user from fixing it
      • recursively, for each file: deny access to system, users, administrators. this prevents the targeted antivirus software from running or accessing any of its files

quote:

As we already said the sample is still obfuscated and it massively adopts cryptography. As reported by other sources, the strings are encrypted with 3DES. Here we report how the key is generated and the overall structure for the encryption phase. The key is an array of 16 booleans at the beginning all set to false. The key is initialized in the the steps listed in the table below. The result of every step is a boolean value (true/false).

minus the fancy graphics, I have already given you a thorough (and much more accurate, ha) rundown of this part in my previous Dead Gay Forums Exclusive Report

quote:



so much for my scruples :suicide: dude redact that poo poo, you're a professional goddamnit :cripes:

quote:

If this is less than 46.5 GB and the operating system is Windows XP, this is not a valid environment

:fishmech: actually hard drives use base 10 units so no, it's 50 GB

quote:

Another interesting point is related to the way in which the domains are rotated. This is not a real a domain generation algorithm (DGA), because the domains are not generated on the fly. This is simply how the agent gets the required information. This works in the following way:

I didn't get around to it but yes, it does this! another clue that some thought was put into this malware

quote:

The exfiltration is done mainly via email and partially via WebDAV and HTTP.

in the sample me and this guy analyzed, this entire part of code is, actually, completely unused and effectively dead :eng101: so this is all at best an educated guess. I mean the code does do what he says it does, but from this sample alone we have no idea what conditions actually trigger it, and what kind of data is actually exfiltrated. well, in fact, I have an idea about some of the data: operational logs, for example, are encrypted and sent as s/mime emails; plus, there's a component that screen scrapes the page currently open in IE, makes a list of all form fields, serializes it to xml, compresses it, and e-mails it; maybe more but my time to play with eyepyramid ran out

quote:

There are other executables that appear to be executed, such as 'stkr.exe', but the analysis of that malware in beyond the scope of this post. For the reader interested in a further analysis, the sha256 for 'stkr.exe' is: 0af665d7d81871474039f08d96ba067d5a0bd5a95088009ea7344d23a27ca824.

this sample is publicly known and downloadable. I might give it a shot. some time. maybe

well. I looked at the strings dump at least. all of our good old friends like THISPROPERRUN, THISCANDIDATE, tmpwebshell and of course our beloved star, hgrghk are all there having a party. sadly string dumps aren't indexed for searching so I can't use the known keywords to find other samples under https://www.hybrid-analysis.com/

quote:

The authors would like to thank the research community for sharing the hashes and 'hackbunny' for the support and information sharing.

:tipshat:

quote:

Posted by Paul Rascagneres at 2:40 PM

this isn't the guy I helped with the analysis btw, it must be his boss

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

hackbunny posted:

so much for my scruples :suicide: dude redact that poo poo, you're a professional goddamnit :cripes:

almost forgot! one of the passwords you can see in that string dump is "caccoletta". it means "litte booger". themoreyouknow.gif

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

cheese-cube posted:

this. but what happened to your av hackbunny?

someone's idea of a joke

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Bonfire Lit posted:

turns off UAC and "UAC remote restrictions". if you connect to a computer via smb with a local account with admin privs (as opposed to a domain account with local admin privs) windows usually disables the admin group in your token. the second setting turns that off, I don't know where the point is when UAC is already disabled but maybe it's in order to keep access if someone turns UAC back on via the control panel

I don't get the point though! it seems completely unrelated to anything the malware does

btw remember that webdav folder that investigators missed? and the files I downloaded from it? I managed to decrypt two out of four, and they're lists of accounts on gmx.com. nothing new basically, just a copy of data investigators already found elsewhere. I wonder about the other two files... my sample contains no reference to them. I'll try to brute force them, all I need to do is reverse sha1 a couple short, simple strings. why can't I use existing rainbow tables you ask, because the idiot hell fucker who cumpissed this abortion of a malware encodes the strings in utf-16 before hashing them, I answer

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Wiggly Wayne DDS posted:

it still sounds like stitched together hackforums tutorials

kinda yeah

ate all the Oreos posted:

lol malware written by shaggar

... but I'm afraid this is closer. do you know what format these configuration files are in? they are serialized .net objects. specifically, NameValueCollection objects serialized with BinaryFormatter, a ridiculously verbose format for a key-multivalue map that can only contain strings

Subjunctive posted:

I never considered character encodings as a way to protect against rainbow tables, but in hindsight it's obvious. who has ebcdic tables?

there are some really clever and effective ideas in there but I think this one is entirely accidental

the way remote files are encrypted, string encodings notwithstanding, is one of the clever and effective ideas, imo. files are encrypted with their filename as the key, and the filename is replaced with its hash before it's written anywhere. only the original code, where the filename is in cleartext, can both locate the files and decrypt them: the two files I could decrypt? I could only do it so quickly because the names (ghkch and hgrch) are in clear text, in the code. it also shows a degree of opsec foresight that not all information is included in all agents: if you catch one, you can only decrypt the files relevant to it. all local files (like caches of remote files, or temporary files) are similarly encrypted, and sometimes padded with random data. it's somewhat well thought out

on the other hand the key derivation from the filename is very weak (key = md5(utf16(filename)), iv = sha256(utf16(filename))), the encryption is 3des for some reason (pity it isn't des), and the obfuscation of the filename is a straight unsalted sha1 hash instead of something more expensive, like bcrypt or scrypt (sure, salting the hash means you can't just open the file by its filename hash, you have to list the directory and check the filenames one by one, but since all remote files are on webdav or ftp, you can list directories no problem). the weak hashing of the filename, and the nature of filenames used elsewhere in the code (short, lowercase alpha strings), make me confident that I could probably bruteforce them

not to mention the jucier details in the order of custody (that I really really really should read) that show that the siblings communicated operational details on cleartext channels, but that's a story for another day

hackbunny fucked around with this message at 15:15 on Jan 31, 2017

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Cybernetic Vermin posted:

don't think this is about npapi support, but rather the extensions based on the xul/xpcom framework, basically the same customization level that turned the same base application into both firefox and thunderbird with just different xml/javascript tossed in

going to webextensions, same relatively weaksauce thing that chrome and edge uses. no doubt way safer and easier to maintain, but the possiblities are also certainly not as many

gently caress xul/xpcom extensions. yes, they can do anything. they can completely rewrite the functionality of the application. it's a really bad way of doing things, and xul so bad that it's bad even for legit use

nothing against xpcom and xpconnect though. love those guys

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
have the duress password irreversibly lock the account for two weeks
better yet have the duress password delete your stupid account

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

apseudonym posted:

Generally I'm not convinced there are many situations where they'll just go "darn, foiled by this clever nerd" and not just make your life rather unpleasant.

why would they do that?

Volmarias posted:

Pretty much this. What a shame, you're failing to cooperate, time to go to a detention center where your rights don't exist because technically you're still at the border until you "smarten up".

why would that happen?

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

apseudonym posted:

I mean, yeah? That's been the legal precedent and its not like they're going to say "darn, foiled by this clever nerd" when you refuse to provide them access.

but he did foil them? they can't write anywhere that he's a pedophile. it's not a small victory for a pedophile that was caught

why do people have to turn instantly dumb and resort to absolutes when certain topics are discussed. no consideration of risk, reward, precedent, just straight to the scenario where they beat you for the password (which is trivial to solve btw: just don't know the password). why the hell would they do that?! (answer: because the solution is too much work and you'd just throw your hands up and pretend it's unsolvable)

you desperately want to frame the border police poo poo, how about this: the usa is now the kind of country with an asterisk next to it in international travelers guides

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

apseudonym posted:

I wouldn't call being held in contempt of court until he provides access winning. :shrug:

"the worst that could happen", when you're a pedophile and you get caught, handily beats that, I'd say

apseudonym posted:

I don't think any of these duress features have been properly thought through in any of the considerations you listed. Your adversary doesn't care if you don't know your password or if you wont share it, this isn't some sovereign citizen poo poo where you say some magic gotcha and they shrug and give up, they want the access and dont give a gently caress about excuses and if they think you're lying they can be pretty lovely to you.

there are tons of magic gotchas that make people shrug and give up. they're called laws. the usa in particular is full of magic gotcha laws, like all the magic spells around traffic stops. moving in groups, open-carrying firearms, is another magic gotcha that has proven in the past to make police look the other way instead of gratuitously harassing someone. that you would intentionally confuse refusing to pay taxes or whatever part of the social contract is it sovereign citizens want to get out of, with violation of loving rights, makes me furious. what in the gently caress is loving wrong with your head, that you will side with authority unquestioningly, as if nothing could be done

so apseudonym, here I am, returning to my country, like the nasa employee from the article. I have taken precautions because, like the nasa employee from the article, I look like An Enemy of the country. I don't know the password to this social media account. my father does, and he has been instructed to contact a lawyer if anyone asks it. he lives outside of your jurisdiction btw

YOU DONT LIVE IN A REPRESSSIVE REGIME YOU GIGANTIC WIMP

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

ate all the Oreos posted:

just let them look through your poo poo unless you have something to hide, citizen

better yet ask a lawyer or legal defense organization and not some random forum

Midjack posted:

boy howdy i sure am enjoying watching this chicken get hosed

I just wanted to add schindler's list but instead of schindler it's a regular guy: "herr schindler these don't look qualified workers to me!" "welp the gig's up, ship them off to the ovens" *spends rest of war in mansion catching up to favorite radio dramas* "laut lachen that schlemiel what a character"

hackbunny fucked around with this message at 06:10 on Feb 13, 2017

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
LMO imo it's perfectly reasonable that a trans person would close their social media profiles. I'm sure you can think of more than a few events in recent memory that could have made you realistically do it. maybe you'll actually do it for real :v:

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
the only qualified statement we can make about it is that we aren't qualified to make statements about it, though

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

flosofl posted:

Jesus, shut the gently caress up. You're gonna get the thread closed. Go to D&D and masturbate about laws and civil resistance there.

enrique, my salts! not a closed thread nooo 😱

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
stack protection, aslr etc. force you to start from advanced* techniques like heap spraying, rop, etc. if you disable them you can approach binary exploitation from the basics, like return address overwrite. it's good for teaching

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Deep Dish Fuckfest posted:

algorithms? why didn't i think of that!

"algorithms" is a buzzword for "squeezing blood from a rock big data"

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
new proposed law in italy will regulate forensically sound "implants" (ie. trojan horses) for lawful client-side "wiretapping":

https://boingboing.net/2017/02/15/title-italy-unveils-a-law-pro.html

Adbot
ADBOT LOVES YOU

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

Sapozhnik posted:

actually a friend linked me to this

https://github.com/volatilityfoundation/volatility

looks like just what i need

are you sure?

quote:

Volatility does not provide memory sample acquisition capabilities. For acquisition, there are both free and commercial solutions available.

  • Locked thread