Mongoose is an easy to use web server. It can be embedded into existing application to provide a web interface to it.
Mongoose web server executable is self-sufficient, it does not depend on anything to start serving requests. If it is copied to any directory and executed, it starts to serve that directory on port 8080 (so to access files, go to http://localhost:8080). If some additional config is required - for example, different listening port or IP-based access control, then a mongoose.conf file with respective options (see example) can be created in the same directory where executable lives. This makes Mongoose perfect for all sorts of demos, quick tests, file sharing, and Web programming.
Features
Crossplatform - works on Windows, MacOS and most flavors of UNIX
이슈가 된지 오래되었는데 이전에 나왔던 koobface와 약간 다른 양상을 보인다고 하는군요..
유튜브(YouTube) 동영상 관련 코덱으로 위장해서 전파가 되고 있었고
동영상을 클릭하면 Flash Player 10.37을 설치하라고 하면서 Setup.exe 파일을 다운로드해서 실행한다고 합니다.
일단 감염이 되면 system32 폴더에 ld15.exe 파일을 생성합니다.
이번건이 변종이라고 해서 예전에 나왔던 샘플을 구해봤습니다.
꽤 많더군요..(20개 -_-;;)
일단 앞뒤 안보고 전부 실행해봤습니다.
파일들이 많이 생기더군요..
이번건와 다른점은 system32 폴더가 아닌 C:\WINDOWS 폴더에 파일들을 생성하고 있었습니다.
Posted byJohn Kuhn and Ryan McNulty with a little help from Holly Stewarton October 19, 2009 at 4:12 PM EDT.
Gumblaris back, and it has an upgraded arsenal of exploits to compromise your browser, Office, and Adobe® products.
Here in Managed Security Services, we’ve noticed a considerable elevation in our global hits on malicious PDF files. More specifically, the signature used to detect the latestAdobe Reader Remote Code Execution has picked up most of the activity. Here's a graph of the attacks we’re seeing:
The event count on Oct 19 ended at over a thousand events, five times the normal event count for this kind of malicious PDF and nearly doubling the kind of attack activity we've seen in the past.
Upon reviewing the data, it became very apparent that the sites hosting the malicious files were legitimate websites (privately owned and operated). All of these websites have been compromised and are now indiscriminately serving the malicious payload to countless victims.
In the past, Gumblar has been known to use stolen FTP password credentials to compromise their victim’s websites. We can only guess that these compromises were no different. As website visitors get infected, they (unknowingly) are farmed for any FTP credentials, seemingly providing the Gumblar controllers with an endless supply of future websites they can compromise.
So what’s different this time around? In previous versions of Gumblar, the malicious scripts and payload were hosted on a remote server. Iframe code was injected into the compromised website, and it redirected visitors to their rogue server (gumblar.cn). This time around, they are placing the malicious scripts and payload directly on the compromised host, which gives them a decentralized and redundant attack vector, spread across thousands of legitimate websites around the world.
The uploaded scripts are placed carefully to match existing file structures currently on the websites. Heavy obfuscation is used in an attempt to evade some existing security measures.
Here's a snippet of the obfuscated malicious script:
Some of the attack vectors have also changed. Today, we see the following exploits in play:
All of these attacks are very recent and effective at compromising the client side victim in an effort to propagate their malicious payload worldwide. Coverage for the updated Trojan is still very low according toan analysis done through VirusTotal.
Your best means of protection is to use protections provided by your IPS/IDS device and to apply the latest patches for all of the affected applications, if you haven’t already done so.
Gumblar is a force to be reckoned with, and this latest push of theirs is a true testament to that fact. As always, we’ll do our best to keep you informed of its changes and activities here.
Change History
Tue, Oct 20, 2009: Updated the chart to reflect the event count total at the end of Monday.
Reloaded 라는 단어를 보니 매트릭스가 생각나는군요...^^;; 오늘 저녁엔 매트릭스나 볼까....
어제 직원이 가져온 "해킹과 보안" 책을 봤습니다.
SecurityProof에서 만든 잡지인데 POC2008 Reverse Engineering Contest 우승팀 분석 보고서가 있더군요..
문제에 사용되었던 파일은 http://www.powerofcommunity.net/recon.zip 에서 다운로드 가능합니다.
첫번째 나오는 내용이 pcap 파일을 분석하는 내용인데 pcap 파일 포맷과 타입에 대해서 알고 있어야 풀이가 가능한 문제더군요..
그래서 간단히 공부한 내용 정리해서 올려봅니다.
Wireshark
아마 현재 가장 많이 사용하는 패킷 캡쳐툴은 Wireshark가 아닌가 생각됩니다.
물론 아직도 Ethereal을 고집하시는 분들도 계시지만 Wireshark랑 기능이나 GUI나 다 똑같으니...
공부하던 중 Wireshark 설치시 같이 설치되는 CLI 명령 중 잘 사용하면 좋을 것 같은 명령이 있었습니다.
(저만 모르고 있었던건 아니겠죠...-_-;;)
capinfos.exe
pcap 파일의 정보를 보여줍니다.
PS C:\Program Files\Wireshark> .\capinfos.exe E:\wargame\POC_RE_Contest\Network\analysis_1.cap File name: E:\wargame\POC_RE_Contest\Network\analysis_1.cap File type: Wireshark/tcpdump/... - libpcap File encapsulation: SLIP Number of packets: 914 File size: 269172 bytes Data size: 255896 bytes Capture duration: 133057646.198371 seconds Start time: Fri Apr 16 17:03:30 2004 End time: Fri Jul 04 17:30:56 2008 Data rate: 0.00 bytes/s Data rate: 0.02 bits/s Average packet size: 279.97 bytes
파일 타입은 libpcap이고 파일은 SLIP형태로 캡슐화되어 있다는 것을 알 수 있습니다.
Capinfos 1.0.4 Prints information about capture files. See http://www.wireshark.org for more information.
Usage: capinfos [options] <infile> ...
General: -t display the capture file type -E display the capture file encapsulation
Size: -c display the number of packets -s display the size of the file (in bytes) -d display the total length of all packets (in bytes)
Time: -u display the capture duration (in seconds) -a display the capture start time -e display the capture end time Statistic: -y display average data rate (in bytes/s) -i display average data rate (in bits/s) -z display average packet size (in bytes)
A single packet or a range of packets can be selected.
Packet selection: -r keep the selected packets, default is to delete them -A <start time> don't output packets whose timestamp is before the given time (format as YYYY-MM-DD hh:mm:ss) -B <stop time> don't output packets whose timestamp is after the given time (format as YYYY-MM-DD hh:mm:ss) -d remove duplicate packets
Packet manipulation: -s <snaplen> truncate each packet to max. <snaplen> bytes of data -C <choplen> chop each packet at the end by <choplen> bytes -t <time adjustment> adjust the timestamp of each packet, <time adjustment> is in relative seconds (e.g. -0.5) -E <error probability> set the probability (between 0.0 and 1.0 incl.) that a particular packet byte will be randomly changed
Output File(s): -c <packets per file> split the packet output to different files, with a maximum of <packets per file> each -F <capture type> set the output file type, default is libpcap an empty "-F" option will list the file types -T <encap type> set the output file encapsulation type, default is the same as the input file an empty "-T" option will list the encapsulation types Miscellaneous: -h display this help and exit -v verbose output
-T 옵션을 쓰고 캡슐화 타입을 쓰지 않으시면 전체 캡슐화 타입을 확인하실 수 있고 -F 옵션을 쓰고 캡쳐 타입을 쓰지 않으시면 전체 캡쳐 타입을 확인하실 수 있습니다.
ethernet 캡슐화 타입은 우리가 일반적으로 알고 있는 ethernet상에서의 패킷을 의미하고 SLIP는 Serial Line Internet Protocol로 일반 가정PC에 모뎀을 달아서 통신하게 되는데 이 때 전화국 서버와 PC의 시리얼 라인상으로 TCP나 IP 트래픽을 전송하는데 있어서 필요한 프로토콜입니다.
어차피 pcap은 네트워크 통신에 사용된 패킷을 캡쳐한 것인데 어느 구간에서 캡쳐하느냐에 따라서 캡슐화 타입이 다를 것입니다.
문제에서 제시했던 pcap 파일을 까보면 다음과 같이 프로토콜이 UNKNOWN이라고 나오는걸 확인하실 수 있습니다.
이것은 파일 자체에 캡슐화 타입과 실제 캡쳐된 파일의 캡슐화 타입이 다르기 때문인데요 캡슐화 타입을 ethernet으로 바꾸면 정상적인 패킷을 볼 수 있습니다.
capinfos.exe 파일로 pcap 파일의 형태를 파악하고 editcap.exe로 타입을 변경하니 정상적인 패킷을 볼 수 있었습니다.
앞으로 이상한 pcap 파일을 보면 두개의 명령을 통해서 먼저 확인하는 습관을 들여야 겠군요...^^
PCAP file format
위 내용을 보다보니 pcap 파일의 포맷이 궁금해서 찾아봤습니다. 생각보다 단순했었습니다.
Global Header
Packet Header
Packet Data
Packet Header
Packet Data
Packet Header
Packet Data
...
파란색이 Global Header이고 붉은색으로 된 부분이 Packet Header와 Packet Data입니다.
Wireshark에서 볼 때 한줄 한줄의 내용이 붉은색으로 된 Packet Header와 Data가 되는거죠.
좀 자세한 내용은 아래 링크를 참조하시면 되겠습니다.
아래 링크에 나오는 구조체는 wireshark 소스코드에서 wiretap/libpcap.h 파일에서 확인하실 수 있습니다.
소스코드에서 약간 다른부분이라면 magic number를 따로 선언해서 사용하고 있다는 점입니다.(그냥 참고만 하시면 되겠습니다)