text stringlengths 0 2.35k |
|---|
**Natalie Pistunovich:** Yes, ARM is out of the box indeed. Yeah. |
**Ivan Kwiatkowski:** Okay. |
**Natalie Pistunovich:** ARM-64, and so on. Yeah. And MIPS - some of the variations are not, but most of them, yes. The ones that are not out of the box is MIPS-64 P32 and MIPS-64 P32LE. |
**Ivan Kwiatkowski:** \[12:15\] Okay. So yeah, overall, these are probably architectures that most people don't care about. So I don't think this is a big fault on the part of the Go language. What I will say though is that, as far as I'm concerned, C is already a multi-platform language as it is, and if other language... |
**Natalie Pistunovich:** Yeah, that's fair. Lots of DevOps people do love that feature, that you don't need to do much to ship everything to everyone in your favorite architecture. |
**Ivan Kwiatkowski:** Yeah. That aspect is pretty important, and also very appreciated by malware authors; it's the fact that - yeah, when you write some program in C, then you might have modules that are distributed in the form of a DLL file in Windows, or .so shared object on Linux, and so on... And then you end up w... |
**Natalie Pistunovich:** Another is - tell me what you think - the concept of modules, where it has this file that says what are all the dependencies, and what version specifically is used where, in case you're using some package of an older version, and whatnot. So given that this is all kind of compiled into a module... |
**Ivan Kwiatkowski:** Well, for a security researcher or a hacker, I'm not exactly sure. I mean, as far as developers go, it prevents you from falling into this pithole of dependency hell, where -- this is stuff I actually experienced last week, while working on a Python project. I updated all my packages, and some of ... |
When it comes to security, making sure that hackers are able to compile their thing is really not something we worry about too much. What we do worry about is the fact that when you end up with a single binary that contains everything, it's kind of an issue for reverse engineers. when you compare this to a C program or... |
So when you have those big malware platforms that you have to work on, then having several files is actually a pretty good thing for us. When you have a big Go binary, that is 5 to 10 megabytes big, and then you have to just dive in there and try to find out where the interesting code is located - it's a good thing; wh... |
**Natalie Pistunovich:** \[16:22\] I wonder if there's any particular feature that is good for the defensive side... But I'll keep asking questions until we find something. Or do you have one in mind? |
**Ivan Kwiatkowski:** I do have one in mind... The best, and I think one of the strongest selling points of Go over C and C++ and all those unmanaged languages is going to be that when you write programs in Go as a developer, you know that you're never going to have any problems with memory corruption, buffer overflows... |
So overall, for defenders, less vulnerabilities and less ways for developers to make tragic, tragic mistakes is always going to be a good thing. And I think this, in fact, overshadows any advantage that the attackers are gaining over us, on the personal level, with the reverse engineers. |
**Natalie Pistunovich:** That is a very interesting point. I guess it would be interesting to see if overall Go code is more secure, however you would measure that. It's probably going to be interesting to see how to do that. |
**Ivan Kwiatkowski:** Well, having precise metrics is always going to be difficult, but if you compare CVE number quantities for projects written in the GO language and for projects within C, then I think it's very likely that you would find that programs written in memory-unmanaged languages, like C, C++ and the like,... |
So if you take the developers with equivalent skill, and for one of them some bugs are just unavailable, and for the other one you have twice as much mistakes that you can make, it feels very obvious to me that no matter if the developers have the same level of skill, then the person using the unsafe language is always... |
**Break:** \[19:35\] |
**Natalie Pistunovich:** Have you ever seen malware in COBOL? |
**Ivan Kwiatkowski:** I haven't, actually. |
**Natalie Pistunovich:** I wonder how would you evaluate that - on the more safe, or on the less safe side, how would you say all that? |
**Ivan Kwiatkowski:** I actually have no idea. COBOL is one of the languages that I know of; I know that if he wants to work in banks and be paid the big bucks, then you should definitely learn COBOL, because all the former COBOL developers - they died of old age by now, so they are kind of hard to find... Beyond this,... |
**Natalie Pistunovich:** Which is the spiritual parent of Go. |
**Ivan Kwiatkowski:** Yeah, I suppose. And also spiritual parents of many other languages, because it came from the '80s, maybe the '70s, right? I remember learning Pascal, or at least the basics, when I was in school; something like 15 years ago now. |
**Natalie Pistunovich:** Same. It was my high school graduation project; it had to be in Pascal. |
**Ivan Kwiatkowski:** Yeah. There you go. I probably wrote a little bit of Pascal myself; probably never actual projects that did anything meaningful... But I did have to look at some APT malware, like real-life APT. |
**Natalie Pistunovich:** What does APT stand for? |
**Ivan Kwiatkowski:** Oh, sorry, it means Advanced Persistent Threat. So APTs are one of the categories of hackers that we track in our daily work. So you have on one end the attackers that are financially motivated, or cybercrime, ransomware groups and all the like, and on the other end of the spectrum, you have what ... |
\[23:59\] But in any case - yeah, this week I was working on another APT case, taking place in some of the STEM countries, in the CIS, Commonwealth Independent States, I think... Anyway, and one of the malware implants that we found there was actually written in Pascal, and so it was kind of a trip down the memory lane... |
**Natalie Pistunovich:** That's interesting to know, because there is a lot of similarity between Go and Pascal, but knowing that the translation of that is different... |
**Ivan Kwiatkowski:** Oh yeah, I can tell you, even though I'm not an expert in any of the languages, even though you might have some similarities on the code level, in maybe the constructs and the way that you declare things and so on, when it comes to assembly, the languages could not be more different from one anoth... |
**Natalie Pistunovich:** I thought if they're conceptually similar, they might have a similar structure, but I guess not. |
**Ivan Kwiatkowski:** No. I suppose they took inspiration when it comes to how to write the code... But then when it comes to what the compiler does, then yeah, the Go compiler really does its own thing. |
**Natalie Pistunovich:** And when you say that each language has their own different thing in the assembly representation, or even when you reverse-engineer that into like a visual representation, how many different ways can you have -- can it really be like every time completely different? |
**Ivan Kwiatkowski:** It's not always completely, completely different, but there are some meaningful differences. I would say that the C language - maybe it's a misconception I have, because the C language is traditionally what you learn reverse engineering on. So the C language to me is going to be the language that ... |
Taking the example of Pascal - and again, I don't write that much Pascal code, but it's very obvious to me that when I look at the assembly code and I see reference counters being incremented and decremented automatically, and all that kind of stuff, then this is something that was automatically added by the compiler. ... |
\[28:06\] Go is probably one of the far extremes of this, right there with C++, because the Go compiler is really doing a lot of stuff under the hood. It really -- how can I put this...? |
**Natalie Pistunovich:** Optimizations? |
**Ivan Kwiatkowski:** Yeah, optimizations. It in-lines anything that is not worth a function call... The calling convention is its own thing... Oh, you also have a garbage collection mechanism. When you write a simple Hello World program in the Go language, it ends up being an executable that's something like one megab... |
Another thing that I don't like about Go - I mean, it's a good thing, right? I don't like it as a reverse engineer; it's the goroutines. |
**Natalie Pistunovich:** Yes. This would have been my next question. Yes, please do elaborate. |
**Ivan Kwiatkowski:** Great. So it seems like a very, very easy way to create threaded programs, as far as I understand, which is great as far as developers go... But it makes it a bit too easy for malware developers to create threaded programs as well. And when it comes to understanding what a program does, we really ... |
**Natalie Pistunovich:** How do threads represent themselves visually when you do reverse-engineering? |
**Ivan Kwiatkowski:** Well, they don't really represent themselves, because threads as a concept, they are a fundamentally runtime object, right? A thread is going to be a unit of execution that is going to run some code. And when you have a single thread, which is the case for a lot of programs, then you can just foll... |
One good example of this is a Go program that I mentioned in the previous podcast, it's called Stowaway. This is an open source project that is used to do various proxying operations as a pen testing tool. You can create tunnels, SOCKs proxies etc. and probably pipe them with each other. I'm not exactly sure... But wha... |
\[32:05\] So you have all these things taking place at the same time, and trying to figure out exactly what does what is extremely difficult. And if I hadn't been able to figure out that this was actually an open source project for which I was able to go find the code, then probably I might not have been able to figure... |
**Natalie Pistunovich:** Until we started upgrading... |
**Ivan Kwiatkowski:** Yeah, I wish... |
**Natalie Pistunovich:** All the interesting terms that you're mentioning, like APT, and also a Stowaway, which you reminded now - it will be in the show notes, for those who want to look back at that and see how can they handle threads in reverse engineering. It will be interesting to see some example of how that actu... |
**Ivan Kwiatkowski:** Actually, I think the best way to visualize it is not to try to think about the program as it is running, but imagine that instead of reading assembly code, you are reading the source code of a Go program. I think you are not going to dispute the fact that if you receive some Go project from a fri... |
**Natalie Pistunovich:** You don't always have to imagine that... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.