SlideShare a Scribd company logo
1 of 21
Download to read offline
Tutorial 1
Let's take a look at the following picture
이 사진을 보면서 따라와.
This is the contents from a link that I've received in a eCard spam mail.
이 contents는 eCard spam mail link에서 받은 것이다.
To get the direct link to malware, we have to deal just with the unescape JavaScript function.
Malware directlink를 얻을 수 있다. 우리는 unescape JavaScript를 해결해야 한다.
That's not a big deal, but not all the data supplied to the unescape function need to be unescaped,
이것은 큰 것이 아니다. 모든 공급되는 data는 unescape function을 해제하는 것이 필요하다.
So, if we are doing it manually, we would need to take care which part need to be unescaped and which part should
remain as it is.
이것을 수동적으로 할 수 있다. 우리는 이 부분은 해제되는 것이 필요로 한다. 그리고 이 부분은 남을 것이다.
Click on Send to Decoder, and Run script on Decoder tab after that brings the following results:
따라오는 결과를 얻기 위해서 Send to Decoder를 click 하고, Decoder의 Run script tab을 눌러.
Malzilla Tutorial1
2012년 4월 14일 토요일
오후 12:07
scan.bit 오타 페이지 1
In the lower box on Decoder tab one can see the results - a VBScript used to download and run the malicious file.
Decode의 lower box tab에서 결과를 볼 수 있다. - VBScript가 download 됐고 악성 file을 실행한다.
In the next example we are dealing with a script that writes directly to a binary file, no downloading.
다음 예제에서 우리는 script를 이용해 Downloading 하지 않고 직접적으로 binary file로 작성한다.
scan.bit 오타 페이지 2
다음 예제에서 우리는 script를 이용해 Downloading 하지 않고 직접적으로 binary file로 작성한다.
As the script is written in VBScript, which can't be interpreted by SpiderMonkey engine, we will use some other
Malzilla's functions.
VBScript로 작성됐을 때, SpiderMonkey engine에 의해 해석될 수 없다. 우리는 다른 Malzilla's function을 사용할 수 있다.
First, we will copy the data from the script to the ox on Misc Decoder tab:
먼저, 우리는 script에서 다양한 Decoder tab으로 data를 copy 할 수 있다.
scan.bit 오타 페이지 3
If you take a look at the first picture from this example, you can see that the MZ signature is written to the file in one
step, and the rest of the data in second step.
네가 이 예제의 첫번째 사진을 볼 때, MZ signature로 작성된 것을 한 번에 file로 저장하는 것을 볼 수 있다. 그리고 2번째
step에서 나머지 data를.
We will do it it one single step.
우리는 한 step으로 할 수 있다.
On previous picture I have added u4D5A at the beginning of the code sequence, which is the ASCII representation
of the letters MZ.
이전 사진에서, 우리는 u4D5A를 code의 처음 부분에 추가했다. ASCII로 단어를 표현하면 MZ다.
Don't get fooled by u marks in the sequence, this data sequence has nothing to do with Unicode, as the data is not
a text, but just a data that will be written to a EXE file.
이 순서에서 u를 잊지마. 이 data 순서는 아무것도 할 수 없는 Unicode다. Data는 text가 아니다. 그러나 data는 EXE file
로 작성될 수 있다.
Now, we need to enter u in Override default delimiter box, as the next used function would expect the delimiter to
be %u, and not u.
이제, 우리는 Override 기본 구분자 box에서 u를 만들기 위해 필요하다. 다음 function에서 %u 구분자로 예상할 수 있다.
u가 아니다.
After clicking on UCS2 To Hex button, we will have the following situation:
UCS2 To Hex button을 누르고, 우리는 다음과 같은 상황을 볼 수 있다.
번역 주) Override default delimiter에 u를 넣어주고 Postdelimiter에 check 해준 후에 UCS2 To Hex를 눌러주면 바뀐다.
u4d5au0090u0003 -> 그럼 정규표현식에서 쓰는 s/u//g 와 같은 결과가 나타난다.
scan.bit 오타 페이지 4
scan.bit 오타 페이지 5
scan.bit 오타 페이지 6
Now, we will click on Hex To File and save the result as a binary file on the HDD.
Checking the resulting file on Virustotal.com reveals the following:
이제, 우리는 Hex To File을 click 할 수 있다. Binary file일 때 HDD에 결과를 저장한다.
Checking the 도출된 file을 Virustotal.com에 다음과 같이 나타난다.
scan.bit 오타 페이지 7
The next example uses more complicated transformations and math. Functions for decoding the data.
Function eval() is used to run the result of the decoded data as the result of decoding is also a script:
다음 예제는 transformation과 math가 꽤 복잡하게 사용됐다. Functions은 data를 decoding 한다.
Decoding 결과는 script일 때, Eval() function은 decode된 결과 data를 실행하기 위해 사용됐다.
scan.bit 오타 페이지 8
scan.bit 오타 페이지 9
We will change the eval() function to document.write() (deprecated in Malzilla 0.9.2, eval() is intercepted
automatically), as we actually want to see the script, not to run it.
우리가 script를 실제로 보기를 원하고 실행하는 것은 아닐 때, 우리는 eval() function을 document.write로 바꿀 수 있다.
The result of running the script is a VBScript:
실행된 script의 결과는 VBScript다.
번역 주)eval function을 document.write로 하면 화면에 보여준다. Eval function을 역이용하면 원본 message를 확인할 수
있는 것이다. 더욱 자세한 내용은 javascript 난독화(김지훈)을 참조하시기 바랍니다.
As you can see, we have a sequence of Unicode codes that needs to be escaped.
볼 수 있을 때, 우리는 Unicode 순서를 해석하게 code 한다.
We will copy/paste the sequence to the box on Misc Decoders tab, and use Decode UCS2 to see what is hiding there:
우리는 Misc Decoders tab에서 sequence를 box에 copy/paste 할 수 있다. 그리고 Decode UCS2를 숨긴 것을 보기 위해
사용한다.
scan.bit 오타 페이지 10
사용한다.
The result of unescaping is a shellcode, and the download address of the malware file is visible.
scan.bit 오타 페이지 11
The result of unescaping is a shellcode, and the download address of the malware file is visible.
해석한 결과는 shellcode다. 그리고 malware file download 주소가 보인다.
The shellcode looks broken because I didn't bother to remove quotation and addition marks before clicking on
Decode UCS2.
Shellcode는 깨졌다. 왜냐하면 quotation과 addition mark를 삭제하기 위해 성가시지 않다. 그러고 나서 Decode UCS2에
서 click 해.
As all I want is the link, I do not care about the shellcode.
내가 모든 link를 원할 때, shellcode에 대한 것을 돌볼 수 없다.
Next example is a bit more complicated than previous examples.
다음 예제는 이전 예제보다 꽤 복잡하다.
It is using a script known as dF (after the name of the variable often used in this script, which is changed to zX in our
sample):
dF일 때, 알고 있는 script를 사용한다.(script에서 다양한 name을 자주 사용된다., 이 예제에서는 zX로 바꿨다.
After clicking on Send Script To Decoder and running the script, we will have the following situation:
Send Script To Decoder를 click하고 script를 실행한다. 우리는 다음과 같은 상황을 볼 수 있다.
scan.bit 오타 페이지 12
As you can see, just the first part of the script is decoded (selected text on the picture, just for the purpose of
explaining what is decoded and what isn't).
네가 볼 때, script의 첫번째 부분은 decoded 됐다. (사진에서 선택된 text, 무엇으로 decoded 됐는지 설명하기 위한 목적으
로)
Now, we will select the decoded script (just the script, without <script> tags):
이제, 우리는 해석된 script를 선택할 수 있다.(<script> tag는 빼고):
scan.bit 오타 페이지 13
And copy it over the original part (which is now decoded):
그리고 이것을 original part에 copy 한다.(이것은 해석됐다):
scan.bit 오타 페이지 14
Now, we will run the whole script again, As can be seen on the next picture, the result is also a script:
이제, 우리는 모든 script를 다시 실행할 수 있다. 네가 다음 picture에서 봤을 때, 결과는 script다.
scan.bit 오타 페이지 15
이제, 우리는 모든 script를 다시 실행할 수 있다. 네가 다음 picture에서 봤을 때, 결과는 script다.
Clear the upper box, in lower box select the script between the <script> tags and copy it to the upper box:
Upper box를 clear 해, lower box에서 <script> tag 사이의 script를 선택 해. 그리고 upper box에 copy 해.
scan.bit 오타 페이지 16
After running the script again, we have the following results:
다시 script를 실행해, 우리는 이런 결과를 얻을 수 있다.
scan.bit 오타 페이지 17
다시 script를 실행해, 우리는 이런 결과를 얻을 수 있다.
Scrolling down a bit reveals a sequence of Unicode codes that need to be unescaped:
Scrolling down을 하면 Unicode의 순서가 드러난다. 그것은 unescape가 필요하다.
scan.bit 오타 페이지 18
Doing like in the previous example (copy the data to Misc Decoders tab and using Decode UCS2 button), we will get
the following:
이전 예제와 같다. (data를 Misc Decoders tab으로 copy 한다. 그리고 Decode UCS2 button을 사용한다), 우리는 다음과
같은 결과를 얻을 수 있다:
As it can be seen, it is another shellcode with a plaintext link to the malicious file.
이것을 봤을 때. 이것은 평문으로 malicious file로 연결된 다른 shellcode다.
And one more example of usage:
하나 이상의 예제 사용법:
scan.bit 오타 페이지 19
하나 이상의 예제 사용법:
The transformations used for decoding would take a lot of time if someone would try to decode the data manually.
누군가 data를 수동적으로 decode할 때, Decoding을 위한 사용된 변화는 많은 시간을 절약할 수 있다.
In Malzilla you can just click on Send Script To Decoder, and Run script on Decoder tab after that, and you have the
following:
Malzilla에서 너는 Send Script To Decoder를 click할 수 있고 Decoder tab에서 Run script 할 수 있다. 너는 이것을 해야한
다.
scan.bit 오타 페이지 20
다.
The link you can see on the picture is a direct link for downloading the malicious file.
이 picture에서 너는 볼 수 있다. 이 link는 malicious file을 downloading 하기 위한 직접적인 link다.
So, that was all for this time. More examples of Malzilla's usage will follow as soon as I get some time to write them.
많은 예제의 Malzilla's 사용법을 따라할 수 있다. 이것을 작성하기 위해 약간의 시간을 얻는다.
scan.bit 오타 페이지 21

More Related Content

What's hot

Multithread design pattern
Multithread design patternMultithread design pattern
Multithread design pattern종빈 오
 
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기sung ki choi
 
CUBRID(큐브리드) 트랜잭션 처리 원리
CUBRID(큐브리드) 트랜잭션 처리 원리CUBRID(큐브리드) 트랜잭션 처리 원리
CUBRID(큐브리드) 트랜잭션 처리 원리경오 이
 
Blockchain 2nd ethereum_core
Blockchain 2nd ethereum_coreBlockchain 2nd ethereum_core
Blockchain 2nd ethereum_coreihpark92
 
Blockchain 4th dapp programming
Blockchain 4th dapp programmingBlockchain 4th dapp programming
Blockchain 4th dapp programmingihpark92
 
코어 이더리움
코어 이더리움 코어 이더리움
코어 이더리움 Jay JH Park
 
이더리움의 현황, 한계점 및 개선노력
이더리움의 현황, 한계점 및 개선노력 이더리움의 현황, 한계점 및 개선노력
이더리움의 현황, 한계점 및 개선노력 Younghoon Moon
 

What's hot (7)

Multithread design pattern
Multithread design patternMultithread design pattern
Multithread design pattern
 
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
[아꿈사/111105] html5 9장 클라이언트측 데이터로 작업하기
 
CUBRID(큐브리드) 트랜잭션 처리 원리
CUBRID(큐브리드) 트랜잭션 처리 원리CUBRID(큐브리드) 트랜잭션 처리 원리
CUBRID(큐브리드) 트랜잭션 처리 원리
 
Blockchain 2nd ethereum_core
Blockchain 2nd ethereum_coreBlockchain 2nd ethereum_core
Blockchain 2nd ethereum_core
 
Blockchain 4th dapp programming
Blockchain 4th dapp programmingBlockchain 4th dapp programming
Blockchain 4th dapp programming
 
코어 이더리움
코어 이더리움 코어 이더리움
코어 이더리움
 
이더리움의 현황, 한계점 및 개선노력
이더리움의 현황, 한계점 및 개선노력 이더리움의 현황, 한계점 및 개선노력
이더리움의 현황, 한계점 및 개선노력
 

Viewers also liked

CTIEC New Energy Dept. Presentation
CTIEC New Energy Dept. PresentationCTIEC New Energy Dept. Presentation
CTIEC New Energy Dept. Presentation?? ?
 
04.basic+aesthetic patching hangul
04.basic+aesthetic patching hangul04.basic+aesthetic patching hangul
04.basic+aesthetic patching hangulre4lfl0w
 
My Experiance as an Art Specialist
My Experiance as an Art SpecialistMy Experiance as an Art Specialist
My Experiance as an Art SpecialistJessica Lia
 
Hackerschool FTZ 문제 풀이
Hackerschool FTZ 문제 풀이Hackerschool FTZ 문제 풀이
Hackerschool FTZ 문제 풀이re4lfl0w
 
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...re4lfl0w
 
03.basic nag removal header problems hangul
03.basic nag removal   header problems hangul03.basic nag removal   header problems hangul
03.basic nag removal header problems hangulre4lfl0w
 
12.guiding a program by multiple patching hangul
12.guiding a program by multiple patching hangul12.guiding a program by multiple patching hangul
12.guiding a program by multiple patching hangulre4lfl0w
 
07.intermediate level patching, kanal in PEiD hangul
07.intermediate level patching, kanal in PEiD hangul07.intermediate level patching, kanal in PEiD hangul
07.intermediate level patching, kanal in PEiD hangulre4lfl0w
 
02.keyfiling the reverseme assembler hangul
02.keyfiling the reverseme  assembler hangul02.keyfiling the reverseme  assembler hangul
02.keyfiling the reverseme assembler hangulre4lfl0w
 
06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangulre4lfl0w
 
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentationre4lfl0w
 

Viewers also liked (12)

CTIEC New Energy Dept. Presentation
CTIEC New Energy Dept. PresentationCTIEC New Energy Dept. Presentation
CTIEC New Energy Dept. Presentation
 
04.basic+aesthetic patching hangul
04.basic+aesthetic patching hangul04.basic+aesthetic patching hangul
04.basic+aesthetic patching hangul
 
My Experiance as an Art Specialist
My Experiance as an Art SpecialistMy Experiance as an Art Specialist
My Experiance as an Art Specialist
 
Hackerschool FTZ 문제 풀이
Hackerschool FTZ 문제 풀이Hackerschool FTZ 문제 풀이
Hackerschool FTZ 문제 풀이
 
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...
08.debugging with w32 dasm, rva, va and offset, using lordpe as a hexeditor h...
 
03.basic nag removal header problems hangul
03.basic nag removal   header problems hangul03.basic nag removal   header problems hangul
03.basic nag removal header problems hangul
 
12.guiding a program by multiple patching hangul
12.guiding a program by multiple patching hangul12.guiding a program by multiple patching hangul
12.guiding a program by multiple patching hangul
 
07.intermediate level patching, kanal in PEiD hangul
07.intermediate level patching, kanal in PEiD hangul07.intermediate level patching, kanal in PEiD hangul
07.intermediate level patching, kanal in PEiD hangul
 
02.keyfiling the reverseme assembler hangul
02.keyfiling the reverseme  assembler hangul02.keyfiling the reverseme  assembler hangul
02.keyfiling the reverseme assembler hangul
 
Personality ppt
Personality pptPersonality ppt
Personality ppt
 
06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul06.the plain stupid patching method, searching for textstrings hangul
06.the plain stupid patching method, searching for textstrings hangul
 
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation
20151219_(python_korea)_How_to_automate_webhacking.kr_with_Python_presentation
 

Similar to Malzilla tutorial1

Malzilla tutorial2
Malzilla tutorial2Malzilla tutorial2
Malzilla tutorial2re4lfl0w
 
센차 터치2 시작하기 | Devon 2012
센차 터치2 시작하기 | Devon 2012센차 터치2 시작하기 | Devon 2012
센차 터치2 시작하기 | Devon 2012Daum DNA
 
빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)YEONG-CHEON YOU
 
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013devCAT Studio, NEXON
 
programming with GDB
programming with GDBprogramming with GDB
programming with GDBNakCheon Jung
 
(망고210& Gingerbread) u-boot 컴파일 및 다운로드
(망고210& Gingerbread) u-boot 컴파일 및 다운로드(망고210& Gingerbread) u-boot 컴파일 및 다운로드
(망고210& Gingerbread) u-boot 컴파일 및 다운로드종인 전
 
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&C
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&CJavaScript Profiling With The Chrome Developer Tools_SYS4U I&C
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&Csys4u
 
Truly understanding container
Truly understanding containerTruly understanding container
Truly understanding container어형 이
 
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]David Lee
 
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰Eunhyang Kim
 
Make a shooting game using unity
Make a shooting game using unityMake a shooting game using unity
Make a shooting game using unityHyunwoo Kim
 
안드로이드 빌드: 설탕없는 세계
안드로이드 빌드: 설탕없는 세계안드로이드 빌드: 설탕없는 세계
안드로이드 빌드: 설탕없는 세계Leonardo YongUk Kim
 
리버싱 실습 보고서
리버싱 실습 보고서리버싱 실습 보고서
리버싱 실습 보고서Dong-Jin Park
 
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2Jubok Kim
 
2016 hack festival igrus
2016 hack festival igrus2016 hack festival igrus
2016 hack festival igrusJinookawk
 
막하는 스터디 네 번째 만남 AngularJs (20151108)
막하는 스터디 네 번째 만남 AngularJs (20151108)막하는 스터디 네 번째 만남 AngularJs (20151108)
막하는 스터디 네 번째 만남 AngularJs (20151108)연웅 조
 
10.continued reversing techniques in vb, use of decompilers and a basic anti ...
10.continued reversing techniques in vb, use of decompilers and a basic anti ...10.continued reversing techniques in vb, use of decompilers and a basic anti ...
10.continued reversing techniques in vb, use of decompilers and a basic anti ...re4lfl0w
 
Effective modern cpp item37
Effective modern cpp item37Effective modern cpp item37
Effective modern cpp item37진화 손
 
[NEXT] Android Profiler
[NEXT] Android Profiler[NEXT] Android Profiler
[NEXT] Android ProfilerYoungSu Son
 

Similar to Malzilla tutorial1 (20)

Malzilla tutorial2
Malzilla tutorial2Malzilla tutorial2
Malzilla tutorial2
 
센차 터치2 시작하기 | Devon 2012
센차 터치2 시작하기 | Devon 2012센차 터치2 시작하기 | Devon 2012
센차 터치2 시작하기 | Devon 2012
 
빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)빌드관리 및 디버깅 (2010년 자료)
빌드관리 및 디버깅 (2010년 자료)
 
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
 
programming with GDB
programming with GDBprogramming with GDB
programming with GDB
 
(망고210& Gingerbread) u-boot 컴파일 및 다운로드
(망고210& Gingerbread) u-boot 컴파일 및 다운로드(망고210& Gingerbread) u-boot 컴파일 및 다운로드
(망고210& Gingerbread) u-boot 컴파일 및 다운로드
 
Node.js in Flitto
Node.js in FlittoNode.js in Flitto
Node.js in Flitto
 
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&C
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&CJavaScript Profiling With The Chrome Developer Tools_SYS4U I&C
JavaScript Profiling With The Chrome Developer Tools_SYS4U I&C
 
Truly understanding container
Truly understanding containerTruly understanding container
Truly understanding container
 
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]
Docker 기본 및 Docker Swarm을 활용한 분산 서버 관리 A부터 Z까지 [전체모드에서 봐주세요]
 
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰
WTM 2018 2개월차 신입 백엔드 개발자의 따끈따끈 개발 썰
 
Make a shooting game using unity
Make a shooting game using unityMake a shooting game using unity
Make a shooting game using unity
 
안드로이드 빌드: 설탕없는 세계
안드로이드 빌드: 설탕없는 세계안드로이드 빌드: 설탕없는 세계
안드로이드 빌드: 설탕없는 세계
 
리버싱 실습 보고서
리버싱 실습 보고서리버싱 실습 보고서
리버싱 실습 보고서
 
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2
NDC2012 - 완벽한 MMO 클라이언트 설계에의 도전, Part2
 
2016 hack festival igrus
2016 hack festival igrus2016 hack festival igrus
2016 hack festival igrus
 
막하는 스터디 네 번째 만남 AngularJs (20151108)
막하는 스터디 네 번째 만남 AngularJs (20151108)막하는 스터디 네 번째 만남 AngularJs (20151108)
막하는 스터디 네 번째 만남 AngularJs (20151108)
 
10.continued reversing techniques in vb, use of decompilers and a basic anti ...
10.continued reversing techniques in vb, use of decompilers and a basic anti ...10.continued reversing techniques in vb, use of decompilers and a basic anti ...
10.continued reversing techniques in vb, use of decompilers and a basic anti ...
 
Effective modern cpp item37
Effective modern cpp item37Effective modern cpp item37
Effective modern cpp item37
 
[NEXT] Android Profiler
[NEXT] Android Profiler[NEXT] Android Profiler
[NEXT] Android Profiler
 

Malzilla tutorial1

  • 1. Tutorial 1 Let's take a look at the following picture 이 사진을 보면서 따라와. This is the contents from a link that I've received in a eCard spam mail. 이 contents는 eCard spam mail link에서 받은 것이다. To get the direct link to malware, we have to deal just with the unescape JavaScript function. Malware directlink를 얻을 수 있다. 우리는 unescape JavaScript를 해결해야 한다. That's not a big deal, but not all the data supplied to the unescape function need to be unescaped, 이것은 큰 것이 아니다. 모든 공급되는 data는 unescape function을 해제하는 것이 필요하다. So, if we are doing it manually, we would need to take care which part need to be unescaped and which part should remain as it is. 이것을 수동적으로 할 수 있다. 우리는 이 부분은 해제되는 것이 필요로 한다. 그리고 이 부분은 남을 것이다. Click on Send to Decoder, and Run script on Decoder tab after that brings the following results: 따라오는 결과를 얻기 위해서 Send to Decoder를 click 하고, Decoder의 Run script tab을 눌러. Malzilla Tutorial1 2012년 4월 14일 토요일 오후 12:07 scan.bit 오타 페이지 1
  • 2. In the lower box on Decoder tab one can see the results - a VBScript used to download and run the malicious file. Decode의 lower box tab에서 결과를 볼 수 있다. - VBScript가 download 됐고 악성 file을 실행한다. In the next example we are dealing with a script that writes directly to a binary file, no downloading. 다음 예제에서 우리는 script를 이용해 Downloading 하지 않고 직접적으로 binary file로 작성한다. scan.bit 오타 페이지 2
  • 3. 다음 예제에서 우리는 script를 이용해 Downloading 하지 않고 직접적으로 binary file로 작성한다. As the script is written in VBScript, which can't be interpreted by SpiderMonkey engine, we will use some other Malzilla's functions. VBScript로 작성됐을 때, SpiderMonkey engine에 의해 해석될 수 없다. 우리는 다른 Malzilla's function을 사용할 수 있다. First, we will copy the data from the script to the ox on Misc Decoder tab: 먼저, 우리는 script에서 다양한 Decoder tab으로 data를 copy 할 수 있다. scan.bit 오타 페이지 3
  • 4. If you take a look at the first picture from this example, you can see that the MZ signature is written to the file in one step, and the rest of the data in second step. 네가 이 예제의 첫번째 사진을 볼 때, MZ signature로 작성된 것을 한 번에 file로 저장하는 것을 볼 수 있다. 그리고 2번째 step에서 나머지 data를. We will do it it one single step. 우리는 한 step으로 할 수 있다. On previous picture I have added u4D5A at the beginning of the code sequence, which is the ASCII representation of the letters MZ. 이전 사진에서, 우리는 u4D5A를 code의 처음 부분에 추가했다. ASCII로 단어를 표현하면 MZ다. Don't get fooled by u marks in the sequence, this data sequence has nothing to do with Unicode, as the data is not a text, but just a data that will be written to a EXE file. 이 순서에서 u를 잊지마. 이 data 순서는 아무것도 할 수 없는 Unicode다. Data는 text가 아니다. 그러나 data는 EXE file 로 작성될 수 있다. Now, we need to enter u in Override default delimiter box, as the next used function would expect the delimiter to be %u, and not u. 이제, 우리는 Override 기본 구분자 box에서 u를 만들기 위해 필요하다. 다음 function에서 %u 구분자로 예상할 수 있다. u가 아니다. After clicking on UCS2 To Hex button, we will have the following situation: UCS2 To Hex button을 누르고, 우리는 다음과 같은 상황을 볼 수 있다. 번역 주) Override default delimiter에 u를 넣어주고 Postdelimiter에 check 해준 후에 UCS2 To Hex를 눌러주면 바뀐다. u4d5au0090u0003 -> 그럼 정규표현식에서 쓰는 s/u//g 와 같은 결과가 나타난다. scan.bit 오타 페이지 4
  • 7. Now, we will click on Hex To File and save the result as a binary file on the HDD. Checking the resulting file on Virustotal.com reveals the following: 이제, 우리는 Hex To File을 click 할 수 있다. Binary file일 때 HDD에 결과를 저장한다. Checking the 도출된 file을 Virustotal.com에 다음과 같이 나타난다. scan.bit 오타 페이지 7
  • 8. The next example uses more complicated transformations and math. Functions for decoding the data. Function eval() is used to run the result of the decoded data as the result of decoding is also a script: 다음 예제는 transformation과 math가 꽤 복잡하게 사용됐다. Functions은 data를 decoding 한다. Decoding 결과는 script일 때, Eval() function은 decode된 결과 data를 실행하기 위해 사용됐다. scan.bit 오타 페이지 8
  • 10. We will change the eval() function to document.write() (deprecated in Malzilla 0.9.2, eval() is intercepted automatically), as we actually want to see the script, not to run it. 우리가 script를 실제로 보기를 원하고 실행하는 것은 아닐 때, 우리는 eval() function을 document.write로 바꿀 수 있다. The result of running the script is a VBScript: 실행된 script의 결과는 VBScript다. 번역 주)eval function을 document.write로 하면 화면에 보여준다. Eval function을 역이용하면 원본 message를 확인할 수 있는 것이다. 더욱 자세한 내용은 javascript 난독화(김지훈)을 참조하시기 바랍니다. As you can see, we have a sequence of Unicode codes that needs to be escaped. 볼 수 있을 때, 우리는 Unicode 순서를 해석하게 code 한다. We will copy/paste the sequence to the box on Misc Decoders tab, and use Decode UCS2 to see what is hiding there: 우리는 Misc Decoders tab에서 sequence를 box에 copy/paste 할 수 있다. 그리고 Decode UCS2를 숨긴 것을 보기 위해 사용한다. scan.bit 오타 페이지 10
  • 11. 사용한다. The result of unescaping is a shellcode, and the download address of the malware file is visible. scan.bit 오타 페이지 11
  • 12. The result of unescaping is a shellcode, and the download address of the malware file is visible. 해석한 결과는 shellcode다. 그리고 malware file download 주소가 보인다. The shellcode looks broken because I didn't bother to remove quotation and addition marks before clicking on Decode UCS2. Shellcode는 깨졌다. 왜냐하면 quotation과 addition mark를 삭제하기 위해 성가시지 않다. 그러고 나서 Decode UCS2에 서 click 해. As all I want is the link, I do not care about the shellcode. 내가 모든 link를 원할 때, shellcode에 대한 것을 돌볼 수 없다. Next example is a bit more complicated than previous examples. 다음 예제는 이전 예제보다 꽤 복잡하다. It is using a script known as dF (after the name of the variable often used in this script, which is changed to zX in our sample): dF일 때, 알고 있는 script를 사용한다.(script에서 다양한 name을 자주 사용된다., 이 예제에서는 zX로 바꿨다. After clicking on Send Script To Decoder and running the script, we will have the following situation: Send Script To Decoder를 click하고 script를 실행한다. 우리는 다음과 같은 상황을 볼 수 있다. scan.bit 오타 페이지 12
  • 13. As you can see, just the first part of the script is decoded (selected text on the picture, just for the purpose of explaining what is decoded and what isn't). 네가 볼 때, script의 첫번째 부분은 decoded 됐다. (사진에서 선택된 text, 무엇으로 decoded 됐는지 설명하기 위한 목적으 로) Now, we will select the decoded script (just the script, without <script> tags): 이제, 우리는 해석된 script를 선택할 수 있다.(<script> tag는 빼고): scan.bit 오타 페이지 13
  • 14. And copy it over the original part (which is now decoded): 그리고 이것을 original part에 copy 한다.(이것은 해석됐다): scan.bit 오타 페이지 14
  • 15. Now, we will run the whole script again, As can be seen on the next picture, the result is also a script: 이제, 우리는 모든 script를 다시 실행할 수 있다. 네가 다음 picture에서 봤을 때, 결과는 script다. scan.bit 오타 페이지 15
  • 16. 이제, 우리는 모든 script를 다시 실행할 수 있다. 네가 다음 picture에서 봤을 때, 결과는 script다. Clear the upper box, in lower box select the script between the <script> tags and copy it to the upper box: Upper box를 clear 해, lower box에서 <script> tag 사이의 script를 선택 해. 그리고 upper box에 copy 해. scan.bit 오타 페이지 16
  • 17. After running the script again, we have the following results: 다시 script를 실행해, 우리는 이런 결과를 얻을 수 있다. scan.bit 오타 페이지 17
  • 18. 다시 script를 실행해, 우리는 이런 결과를 얻을 수 있다. Scrolling down a bit reveals a sequence of Unicode codes that need to be unescaped: Scrolling down을 하면 Unicode의 순서가 드러난다. 그것은 unescape가 필요하다. scan.bit 오타 페이지 18
  • 19. Doing like in the previous example (copy the data to Misc Decoders tab and using Decode UCS2 button), we will get the following: 이전 예제와 같다. (data를 Misc Decoders tab으로 copy 한다. 그리고 Decode UCS2 button을 사용한다), 우리는 다음과 같은 결과를 얻을 수 있다: As it can be seen, it is another shellcode with a plaintext link to the malicious file. 이것을 봤을 때. 이것은 평문으로 malicious file로 연결된 다른 shellcode다. And one more example of usage: 하나 이상의 예제 사용법: scan.bit 오타 페이지 19
  • 20. 하나 이상의 예제 사용법: The transformations used for decoding would take a lot of time if someone would try to decode the data manually. 누군가 data를 수동적으로 decode할 때, Decoding을 위한 사용된 변화는 많은 시간을 절약할 수 있다. In Malzilla you can just click on Send Script To Decoder, and Run script on Decoder tab after that, and you have the following: Malzilla에서 너는 Send Script To Decoder를 click할 수 있고 Decoder tab에서 Run script 할 수 있다. 너는 이것을 해야한 다. scan.bit 오타 페이지 20
  • 21. 다. The link you can see on the picture is a direct link for downloading the malicious file. 이 picture에서 너는 볼 수 있다. 이 link는 malicious file을 downloading 하기 위한 직접적인 link다. So, that was all for this time. More examples of Malzilla's usage will follow as soon as I get some time to write them. 많은 예제의 Malzilla's 사용법을 따라할 수 있다. 이것을 작성하기 위해 약간의 시간을 얻는다. scan.bit 오타 페이지 21