My name is Felipe Pires and today we're going to talk about malware hunting, discovering techniques in malware, no malware in malicious speed yet, right? So this is my contact at Twitter at Felipe Pires, my contact and social media. So we can find here some in my web page, we can find there some talks that I made in some events in English, Spanish and Portuguese language, my GitHub here, Felipe86 in my LinkedIn. So if you'd like to exchange something with me or send some questions, I'm totally available, right? So let me introduce myself. So I'm security research at Sapporo. Sapporo is a company from Switzerland and I'm responsible for creating attack modules for this company, actually for the product of this company. And I created a this, I create the design of the attack and send to the developer team and this team putting this in our product, right? I'm a founder of the Black and White Technology. It's my own company. I'm an advisor and CEO of this company. It's a consulting company responsible for providing services, consulting services actually, and for a pen privilege access management, talk security operations center, for analysis and testing and so on. And so one, I'm an developer advocate in different projects. First is hacking is not a crime, very known in US and not only US, but in Europe. And I'm the advocate of these projects. The idea behind this project is to talk more about this concept in calling hacking and how important it is to spread the message for many people. Because the idea is the hacking is how you can use your creative money to help organization, to help companies protect their solutions, their organization, the product, and not only that, but using your creative mind. To be a hacker is to using a lifestyle, right? So how you can using your creative mind in your life. Okay. Not how the TVs or the newspaper using this word or a bad to a bad guy, right? So that's the idea behind of this project. And I'm advocate of the Senia Segura. Senia Segura is a company that has a lot of technology. It's a global company from Brazil, by the way, um, responsible for providing different solutions, uh, for a pan of privilege access management and difference. Authentication process actually, and I'm ambassador of the sneak open source project, right? So this is a solution to protect company actually producing assessed solution and statistic analysis, coding from the developer process, actually, and not only that, but SCA analysis company. I scan analysis composition, actually looking from the libraries inside of the code and I'm ambassador of this project, right? And I'm a structure writer. Any have viewer those at three magazine in Europe and desk magazine in hockey 90 and never is it. And by the way, I, I am a structure of the specifically course course about the malware attack with the Q chain in the desk magazine. So if you'd like to know more about that, so you can send them a message, right? So this is some information about me. Okay. Okay. And before to talk more about technical stuff. So it's important to put all those peoples in the same page. And first of all, I would like to just to simple explanation. What is a threat is a, according this ISO is, uh, is defined as a potential cause of an incident that may cause arm into the system in the organization. But what does that mean? Philippe basically maybe is a after attack or a specific exploitation about attack in software is a kind of. Uh, tech intellectual property. So if you are, if, if you produce some code or some product, or if you have some intellectual property or some attacker or a threat actor, try to, to tap this intellectual property. So it's, it is a threat. Another is identity death. So for example, if you have an organization and some user has an specifically, uh, authentication pro pro process or identity to authenticate. It's something, so it's something about the death of this specific identity. It's a kind of threat sabotage. It's a not another part of this, um, the threat, because if someone talk about your organization on Twitter or other social media, for example, try, uh, you know, all some damage in the image of your company, it's a kind of sabotage is it is a threat. Okay. And information distortion are example of information security. Security thread. It's just a simple definition. Why it's important to understand that because we are talking today about the malware and how you need to looking from these and how you can look in more deeply about that. So malware is basically it's acronym of the malicious software. So it's a potential threat. So because of that, it's important to clarify what is a threat. Not definition from flip is definition from these eyes. Okay. So let's talk about this. Simple, uh, flow about the malware analysis. Okay. So first of all, we have a possible, a threat or artifact or a symbol. So this is the first step. The identification is step, right? So as you can see here, we have a malware. It's acronym of the malware malicious software or, or no dog malicious document, right? So remember you receive to analyze and specifically artifact or symbol. So you need to understand if he is a malware or it's a mall dog. It depends. It depends off the binary or the station, not only that, but many of the factors, not factors, but points that you need to analyze. And after that, you need to choose what the best methodology you use. When you analyze something like you can use any statistical analysis and dynamic analysis, two different approaches. Okay. So my recommendations to you, whether you perform something like these, it's important you write this like, um, you know, um, about all those steps that you are analyzing when you make something. Okay. For example, you have received this artifact. You need to register all those steps because when you do that, you can understand about the steps that possible attack using this attack. And not only that, but you can produce something like a report and this report, you can present, for example, your manager, your coordinator, your tech lead, or you can produce some article, for example, about your studies. For example, it's another interesting point. And not only that, but you can create any specifically improvement, not create, but you can help your. Organization, your company to improve defenses mechanism, because when you understand what kind of technique. Use it by the attacker, you can understand what kind of technique these threat actor or this attacker using to bypass the security sensor in your organization, like a firewall, like IPS, like ideas, like a possible sandbox or other tools that you have in your environment, antivirus EGR. So you can understand the technique using by the attacker to bypass those solutions. And not only that. But you can suggest this improvement for your defenses mechanism. And you can creating this good word called CTI or cyber threat intelligence. You can build it in your organization. I know that it's not too easy to create this if you are a small company, but nowadays we have many tools to help you to give this information. Like, for example, MISP. It's a malware sharing platform that you can use in an open source project, by the way, you. Using, for example, Elasticsearch to correlate in the logs or other things like these. So you can create this intelligence in your organizations. And you need to strengthen in cyber resilience. You need to have this resilience because the threats are changing all the time. So we need to calculate. Of course, it's difficult. Probably you can use some tools to help you to calculate the resistance against the threat in your environment. But remember, this is a defensive approach. This is an approach to understand how you can use in the offensive mindset. OK, so this is the simple flow using malware analysis in malware studies. So remember, this is the first step, the statistical analysis and dynamic analysis. Probably you already heard about that. But if you are new here, it's important you understand those differences. So simple like this. What is a statistical analysis? When you talk about the malware analysis, it usually is the first step using in the malware studies. Why? Because of this statistical analysis. Describe. Describe the process of analyzing the program code. It means that you will look more deeply about the structure of this specific code. When you receive the binary, we need to look more deeply about that. Or you can find a specific function important by the DLL using this attack. Or what kind of DLL, this specific binary, will be using your system operation to execute this attack in this specific environment. So the program. Itself. Doesn't run in this time. So because of that, it's more safe when you analyze. Because you're looking from the behavior, not behavior, but you're looking the code, the program code. So maybe you are thinking about the reversing engineers in where is the reversing engineering here, Felipe. Basically, reversing engineering, if you are new here again, is a technique that you can use inside of the statistical analysis. Not only that, but you can use it in dynamic analysis. And I will explain what the difference between statistical and dynamic. But it's important to understand. Before to looking deeply about the reversing engineering, you need to understand those bases, right? So what is statistical analysis? What is dynamic analysis? How the tools can help you? How the structure of the binary works? And after that, you can look more about the reversing engineering through looking for the buggers, looking for assembly code, and so on and so on. Okay. So let's talk about the dynamic analysis. This is the second methodology that you can use in Mauer studies, right? So dynamic analysis is based on behavior. In this case, basically, it's the interactions that the Mauer or MODOC has when it's executed in this environment. Basically, it's the runtime analysis. Remember, so you have two approaches. No runtime and runtime analysis. One is the statistical analysis that you can look in front of. The structure of the code, the functions, the DLLs, libraries, and another, it's a runtime. So you will pick up the Mauer, you put in a specific environment, control of the environment, remember that, and it will execute itself inside of this control of the environment. You will see the behavior, and after that, you will check if it's malicious or not. And by the way, it can be easily automated. And basically, we have a specific concept called sandbox. I call it sandbox. Maybe you already heard about what is exactly sandbox. Sandbox is a specific environment. Basically, it's a virtual machine. When you talk about the Mauer analysis or, you know, to analyze or investigate it, ready hunting, so on and so on. Basically, you have the Mauer here. It will execute inside of this specific environment, and you will see the behavior. But it's not only a virtual machine. To see if this is, if this binary is malicious or not, you need to, we need to have inside of this sandbox engines to see the behavior. Basically, it means, probably you already heard about what is virus total, is antivirus scanning. You have the binary, you put this inside of this antivirus scanning, and based on many engines inside of this antivirus scanning, you can see if this Mauer is malicious or this is the sample actually is malicious or not. So based on this engine inside of that, right? So sandbox, you need to have the same concept, the same concept. You need to have this engine inside of that. For example, you have many different open source projects like Kuko and like others. So now I will show you during this presentation, right? So remember, sandbox is not only virtual machine. You need to have this engine inside of that, right? So, OK, before to talk about the structure of the PDF files, we need to see more about the structure of the binary. It's important to clarify those differences. OK? So let's talk about that now in my virtual machine in live code here to you. OK, so. Sorry for that. So I have here many different samples. And some samples of this probably is malicious and other not malicious. So we need to check this and to see the difference between in one file or another. So let's check first of all. Remember the flow? Identification step. You receive this binary. You need to analyze that. So I have here the Amazon file. So I will using file command to see what kind of type of this file is. Right? The second file that we're using, I will check is Amazon doc. Boxes of X. Sorry, is a Microsoft Word is almost the same. Let me check my friend Bill here. I have an a file. Bill is a PDF file. Let me check here. Mauer doc Python. Maybe is a Python script. Yes, is a Python script. Let me check the sample. PDF is a sample and text. It's not a is a text, but it's a Python script. But with a difference and another is a tar PDF is a PDF file. OK, so think of this. We have a different binaries here, different files. So remember you receive this in your. Uh. Uh. Position. Let's suppose that you want to analyze some researcher, more analyst or whatever. So we need to look in more deeply about that. So. Sorry, this is my point here. So what is important to see here in this conversation? Right? So first we need to understand if this file is really a Mauer or not. Let me check here. The file Mauer doc Python here, for example. OK, let me read first. Not. I will not. Is it good in itself? But it's not a malware. Actually, let's check here. So let me try to execute here like a Python nine in malware. Let's see here. OK, so it's a simple code in Python. Take a look. This it's a Python script. And if you see here, basically this is some information that we have in the beginning. In here we have another file. And by the way, if I change in here, let me manipulate something here in this file. OK, let me cut here and I will save once again. And I will try to execute again the same. Python, third, nine, nine, Python, three, nine. Actually, Mauer Python. And take a look. This is the same. You see, if you're using once again file, take a look at the difference. So here we have a malware. We have this Python script. And we have here ASCII. And we have here ASCII. And we have here ASCII. But here I changed something in the beginning. I cut this part, as you can see here. And we're changing this information. So file identify the type of the file in a different way. If you see here. So let me change the other thing here in this file. If I try to let me manipulate once again. OK, let me put here. Put here PDF or actually not PDF. Yeah, percent PDF. I think is better. One point seven, maybe I can use dash here. I think it's more. And then you save. Yes. And let's check what happened here. Wow. Take a look at this. So now we have a PDF document. And if I try to execute once again in Python. We have a problem here because I have this syntax problem. OK. PDF is different is PDF. So take a look at this. I have here. PDF ID is a tool from DDA Stevens. And I have a view here. And I will perform this. Sorry. Perform these tools executing here to analyze and specifically to search for some simple or some information inside of this PDF. OK, PDF ID. So if you see here, I have a difference object. I will explain the difference. Between this during this conversation. But just to show you something. Let me using this the same PDF ID for a malware doc Python. But Philip is not a Python is a next station. And I executing some something. But take a look at this. Now this PDF ID. Identify it. This. Simple has a PDF. Even this. Binary. Having another extension. You see. And take a look this. And let me check other. Let me change something. Move malware doc to malware doc PDF. I will change the next station. PDF ID. And I will try to see is the same. But if you see. I executing Python once again. Now once again. I will show you the content of this is continue to be the same is the same content. Right. But when I try to using PDF ID. These tools identify has up a really a PDF file. You see. And file. The same case is a PDF document. I manipulate something inside of the binary. So my question to you is. What exactly information I am manipulating. Inside of this binary. So think about that. Okay. So let me change other things here. So nano malware PDF again. And I will cut here. And I will save once again. And now I have the same content. I just cut in the first. The beginning of the information. Let me try to executing Python once again. Probably we will have some problem. But I will try. Power doc PDF. Let me try to execute. Probably I will receive some error. No we don't ever. We ever here why. Because the station is different. So what happened here. So if I try once again. Oh Jesus. Now we have an ASCII text. And let me manipulate other thing here. In the beginning of this file. Let me return here once again. Sorry. And this is specifically being Python. i will copy here let's check here i will copy this as you can see okay and i will manipulate once again this file enter i will pass here as you can see i will save once again file mower take a look this wow it's a python script binary let me try using python once again so probably works now continue works because so i need to write the correct way so works here so i change in here something and i will try again works again so let me using pdf id because it's a mower it's a pdf once again and take a look this wow it's not a pdf document take a look this so something happened here what's the point here of this object of this object of this conversation today so i am using different tools to investigate and to see the remember i received this remember in your situation so you work in your company you receive this file and you need to analyze that you you need to use any i'm suggesting that you need to use you you should use these two in your analysis but you need to understand how each tools works so here let me explain about the file command what kind of information remember my about my question what information file you use uses to collect this information inside of the binary here is the information collected by the file okay so this file have a magic number probably if you are uh you know if not a beginner if you are a senior a plan a medium guy a medium analyst if you are a senior a specialist or you know um i don't know principal you obviously you know about that about what is exactly magic number and each binary has a specifically magic number is some binary is difficult to manipulate i made some manipulations actually in python code and pdf it's easier in this case but file uh c in the each binary the magic number basically this is important information they need to know the magic number and they need to know the magic number so looking for this and basically the magic the file tools actually this binary this is a codeable inside of the system operation the the file using specifically databases to find those information and those databases is here inside of this specifically um path inside of the system operation but of course it's compiling because of that you can you cannot see this information inside of that but i download this information this explanation i using by the another researcher my friend fernando mercedes he has a specifically video explain many details about the file but in portuguese language importantly but probably you can use in subscribe subscription to see but i collect those the idea behind of this from this video basically fernando mercedes okay and i download the file database to share with you about how this works okay so if you see here i have many different database used by unix platform right so if i cut here pdf for example you can see here how many sorry how many uh informations rules and strings the file comment using uh for a magic number okay that's important thing here okay as you can see here in the beginning if you see here percent pdf dash this is the string that you can see in the beginning so if you read for a python for example take a look this we can see here the beginning of the information you see some information you can see in the beginning of the code strings and other things like this for example like user being python and others and others of course not only one but more than one that you can find in the specifically database that you can see here so that's very interesting so let me see for example a javascript one of very interesting thing so if you see here in the beginning dash bing node let me copy here and manipulate the last time here our document here so let me return here in the malware folder the nanomower pdf and i you cut here and i will past and let's see what happened if i can do this the last one file mower take a look this and pow we have uh executable in this case they use in a different way but if you see now we have a a javascript in different way because a script is a coolable it's very very interesting so if you see here all the is a root mower file magic and what is another mag mag mag deer oops like deer and javascript yeah javascript and you can see here node.js for example let me copy manipulate once again paste here and now you cut so just to put js in the end actually file mower you see is a node.js so it's very important thing other thing interesting here is about this uh information about the structure of the binder of course i will talk more about the pdf but i will explain more about that about the structure if you see here in the manual take a look this information is interesting here about the elf we don't have a time to talk about the elf structure or pe portable executable but here we have a specific information about the format of the elf the structure actually so how the how is the difference or how you can find the array inside of these how the information you can find this for example let me copy here just to show you here in this presentation so let me locate here um and i will pass here let me find here is the headers is where it's located here is okay it's here user it's here so i will copy here and i will show you simple this one better best and take a look this this file defining standard elf types is structured in my and take a look this this file defining standard elf types is structured in my and take a look this this file defining standard elf types is structured in my macros macros you see very very interesting interesting and you see very very interesting interesting and you see very very interesting interesting and useful information useful information useful information sorry and here you can see how many bytes sorry and here you can see how many bytes sorry and here you can see how many bytes you have it you have it you have it you know divided in specifically uh a you know divided in specifically uh a structure of the elf this is the first structure of the elf this is the first structure of the elf this is the first one the first array called for example e one the first array called for example e one the first array called for example e identity is a first array that you have identity is a first array that you have the magic number and others information again we don't have a time to explain many things here but it's a topic for another uh talk okay just to show it so oops let me oh here no okay so let's talk about the pdf structure because it's an important part of our presentation so we have a physical and logical structure of the pdf so we usually have a four parts when you talk about the pdf okay so we have our rather it's very commonly in many different binary we have a body and cross reference table and trailer let's look more deeply about the four parts inside of the pdf okay so we have a specifically version header here we have a inside of the body we have a page image and fonts like a shiny thing inside of the pdf in cross reference table we have a specific locations locations of the object even the file for a random access okay it means that we have a specifically structure of this uh PDF just let me share with you here um oh this is my GitHub basically so let me let's go to the DDA here is Stevens okay this is the guy the researcher um DDA Steven sorry here's the blog his blog we can find many formations about uh PDF and other structure I'd like to share this specifically a picture if you know okay you can find here but I I think it's more easier so here you can see PDF tools it's it's a small letter but uh it's very nice tools that I'm using here in the in our conversation here is the fundamental elements I think we can find here the information that I do like to share with you fundamental elements let's see if is here and I think yes yes it's here so it's old but the structure is the same you see so take a look this the header so remember the magic number is the header percent PDF dash so here is the old version that you can read here is this different objects that you you have inside of this specifically PDF and cross reference table okay four parts and here is the most important to see how the structure works of the PDF take a look this specifically picture because it's important so here is how the object PDF works so we have it here the root object is the main object and you have a two trial object right object two and object three so if you've seen this picture for example those uh these two objects it's totally linked or referring this specific object one you see like a tree okay and this is specific object object four no it's not related of this object this reference object two but only reference three like uh over the object three like again like yeah and it's uh a big tree if you think about that okay so you see how this uh referencing each object in another so this is very important you understand why because for example let me uh explain about the PDF ID uh in this case Bill is a is a one of this because take a look this we have here 44 object so let's check PDF at Thor it's another how many objects yeah ID how many objects we have here so in this case we have a six not 16 we have a 18 objects so remember this picture so each object is connected in the root object and other child object remember that it's very important you understand that because in depends of the specifically PDF we have more than one object to analyze okay so that's the point here of this specifically is structured is a location of the object we have eaten the file not only that but you have a specifically streaming it's important part as you can see here so we have here 16 or streaming to analyze so if you see for example PDF ID in view I think we don't have any uh in this case we have a eight streaming usually streaming in part of important that attacker using to putting something malicious inside of that so that's a that's important thing interesting okay so and the trailer basically is the locations of certain object eaten the body okay so we have a part of this object Ethan the body that's a shiny things like a faulty image but usually you have some links like URLs okay so to when you receive some PDF you click in this URL you redirected these access in a specific web page for example it's go to the specifically investigation that I made when I receive any specifically PDF let's go through this step by step so I receive a specific object and I will receive the CD ID it's a it's um it's a you know resume actually so it's very common for a recruiter recruiters okay so remember this is a part of important to identify if this objectism is a PDF or not of course just to show you that's the important buyer in part remember in the beginning of this conversation explaining about how important you understand these bases again probably you you are a senior if you are a senior or a specialist you know about that but if you're a beginner or starting to uh studies of the malware analysis you need to understand those base this is very important okay so first of all I check the PDF ID to see how many objects I have inside of this PDF how many streams I have and some possible suspicious behavior okay so I have here 15 objects two strings not only that but take a look this very interesting the five reference of JavaScript two and JS three in JavaScript in one open actions but we don't know what is exactly open action right but you need to check this okay cool so the second tool that I'm using here is a PDF dash parcel it's another true from the DA Stevens so we can use in here the dash S to see a possible uh specifically information that you can find here so I said that Ash dash S JavaScript to check remember we have three reference so first of all in object one the second reference object seven and third object is object well remember three JavaScript and JS remember two reference so if you see here object 12 in object 12 object one others two so I'm using two different tools to check the same information you see so my idea here is to show you those two different the same informations in two different tools to check how important it is to understand how the tools works and how what kind of information you can find this the second flag or command that I'm using here using PDF parses is dash um I think it's W for yeah W is to find for a round output data because my idea here is to looking more deeply about the datas not only but about the possible streaming right or to see more information about that to read our route data okay first of all we have an object one and take a look this interesting information remember that so object one the root and you have a reference in object two three four five six and seven seven remember this not this but this picture object one referring seven until object sorry until object seven exactly that's correct so remember this picture object one two three four five six seven seven objects totally refer reference it or not reference but link it on a specific object one as you can see here in this demo okay so because of that it's important to understand this flow sorry this flow about that sorry for my for this cough but because I have a covid in a few weeks ago and I still have some problem a few weeks ago now in the last week actually and okay let's continue so if you see here all those objects so we need to analyze each object to see and take a look this we have a specifically open action link at it with this specific JavaScript and here is not a JavaScript because we don't have any space we don't we don't use now the correct tools to looking from this specifically information and if you see here below take a look this we still have the information about open action but Philip what that means open action so let's check if I have this information here I think I don't have these informations here yeah we don't have her here but I don't know if we have these informations here I would like to share with you these informations in more details let me check here if I have here this information or oh yeah I have here take a look this what that means okay nice oh a a or open action indicate an automatic automatic reactions to be performed when the page or document is view it take a look this important information so indicate an automatic automatic action to be performed when the page or document is view it so now take a look this the user or the recruiter or the talent acquisition person receive this resume or the CV or if you of the people of the financial receiving specifically invoice when they receive it by email so they need to check this email they need to open this PDF so this is the action open the page view document right so this is the action the normal action view document but after that the the when you find this open action it means that an automatic action will be performing when this page it's open okay so it means that something will be happen view and the combination of the automatic key action and javascript makes a pdf document very suspicious so what we have here an open action is a javascript link it means it's a suspicious it's malicious probably right so if you are analysts here so we can check this information we can agree with me that is totally malicious but let's continue in our investigation okay so now we know what that means the open action and we need to find where or is where this javascript so take a look this other object take a look this font and research and image on here other research auto reference object eight and nine remember the picture okay reference linked other objects so let me up here the video remember this image here okay it's not this image remember this image so object four linked with another object you see an object seven is referring object 10 you see the image so many childs for the specifically object you see how important to understand this nice so in this reference we have an object inside of this object 10 we have a possible javascript so let's go more deeply on other information of the body information about the body so let's see object 11 so remember we have a 15 object so inside of the object 10 we have all the reference object 12 here and here is the first streaming containing streaming not only that but we have here the flat the code so it means that we need to decode the content inside of this stream and here as you can see the left is 36. in this case it's not too big it's it's small so maybe we don't have any important information here but we have a two streaming here so we need to find other streaming or what kind of information we can find here so here we have another object take a look this in object 11 referring an object 13 okay inside of this object 13 we have a what we have an streaming so inside is streaming we have a what we have a javascript so and as you can see here the left when you compare to another is too high so it means that the javascript probably malicious we can find here in this specifically object so this is this should be the our main object to investigate okay so we need to look more about that so let's go to this specifically object okay so then another tool that i'm using here it's pdf tk what is a pdf tk is a handle tool for a manipulating pdf okay or it means you can using to uh you know creating a pdf a merge of different pdfs collating pdf and compress streaming pages and then compress or recompress i mean uncompress actually or recompress remember i have a content here inside of this streaming so i need to uncompress this information so that's my action here so i have a pdf cve uh the file set the output for i will copy this information i passed here in the dev doc text and i will set the uncompress activity because my idea is to looking for the di minimum information the content inside of this is specifically streaming remember that in object 13. and here is the thing,間 information is important we find object 13 the left we have a content this is the first technique used by the attacker the JavaScript obfuscated so here is the JavaScript but this JavaScript is obfuscated so you need this obfuscate is called basically it's the second action so remember we have PDF this PDF has an a JavaScript inside this is JavaScript we haven't specifically open actions remember the when the user view this information the attacker will use in a JavaScript and here is the first technique using by the attacker obfuscation technique using this specific if you see here inside of this parentheses you can see specifically standard number like a you see numbers and more uh more um more uh below or not below but if you see here inside of the parentheses as you can see here letters numbers other information as you can see here so kind of standard information so after that I need to desobfuscate this code remember so if they use an obfuscation I need to desobfuscate here so I find I found here some specifically evil parameter and my idea here if I have a JavaScript I will try to rewrite this information using HTML basically this is the idea here so I I using this specifically copy and paste here to facilitate our demo okay so I will copy here and I pass it here the document right so you see I will desobfuscate this JavaScript as you can see here so this is the second action so remember the attacker using the obfuscation technique I will desobfuscate this code and let's see now what kind of information we can find here inside of this is specifically code so I basically I will rewrite in a in HTML file I save and after that I give the permission to execute itself in the in the web browser because my idea is to open here in the web browser check what kind of information we can find here okay so I'm using Firefox to call uh call this simple and let's see what happened now take a look this and wow we have a payload you know what that means so probably if you again probably if you don't know problem but the payload is a part of code is a package responsible to download or to just you know download in the victim machine actually and this package is responsible to execute the callback to the CNC command and controller to make a response to the attacker okay so remember inside of this streaming remember we have a JavaScript obfuscated JavaScript JavaScript we have a payload this payload basically is the package that it will explore the vehicle machine and after that what I'm using here I will see the standard you know ladders and percent I will copy and paste here and I put in here in specifically file and my idea here is to try or to find in specifically informations are using sad to cut this information because here we have now a pure a pure uh code using by the attacker the attacker using a specific Unicode technique to encode informations here so and not only that but I using here in Unix platform but I using here in in Windows too because I'd like to show to show you difference approach not only in Unix but using Linux so here's the same Mauer the same artifact as you can see here take a look at this JavaScript obfuscated and I'm using here another platform in use in Windows uh platform to show you those difference okay so here is the the real payload remember I will cop and I use sad and in when I use in the Linux platform but here you're using mouse dealer okay so while you cop here and I will pass and I will share with you here what kind of technique using by the attacker specifically encode technique using by the attacker because remember we have a payload and the attacker using specifically Unicode encoding technique to encode this content inside of this payload and this encoding this technique using by the attacker is using by ucs2 okay it's not too it's not new it's old now the evolution actually we have a new utf-16 which have 32 and but before that we had ucs2 it's old okay so I using here ucs2 to generate here so I will basically to to uh decode this information to generate a hexadecimal information as you can see here and now I have an extra decimal fire file okay so after that I generate this extra decimal file in a binary why I do that because remember this not remember but the most of our more than 90 percent is for the Windows platform so I generate this specifically binary to execute itself inside of the Windows machine and after that I call I use ensure to search for a possible http protocol inside of this binary to see if this binary will call something and take a look what I found here I found the commanding controller the attacker so now we have an CNC the attacker remember about the payload yes the payload is a will be a callback or this is specifically CNC you see how interesting is so if you pass here the IP address you see this IP address is from Estonia Europe okay so here as you can see this is the information we found in this specific file so let me just to finalize this information so if you see here so many URLs related to this specifically attack and if you see here so they have many victims machine Explorer by this specifically attack using PDF malicious okay so just to summarize this uh demo actually remember the user received this pdf this pdf has a specifically javascript side of that this pdf is or was in this case uh obfuscated or javascript obfuscated inside of this javascript remember this javascript is even the streaming this content is inside of this streaming and we desobfuscated this this information inside of that the attacker using specifically encoding techniques actually inside of the javascript we have a payload remember the payload is a package responsible for this callback that this information actually this information you know so the victory machine to the attacker remember that side of this payload we have another technique using by the attack this encoding technique using easy easy and inside of that we have a cnc responsible for this explanation okay so here I can suggest you some books would you like to read and study more about tomorrow analysis so here four books that I can recommend you write about tomorrow analysis power analysis techniques strategy hunt with the elastic stack and practical threat intelligence and data driven in 3d hunting so four very nice books that I can recommend you if you would you like to read and study more about that and that said that's it so I finished my presentation here I hope that I can help you during this journey in our conversation so if you have any question so please let me know and see you in the next