Java Autorun ??? Java.Cogyeka?? 1 ??

Java.Cogyeka
最近、Java の脆弱性が大きく注目を集めています。脆弱性がマルウェア作成の引き金になる経緯も話題になっていますが、マルウェアが存在するには必ずしも脆弱性が必要なわけではないことに注意してください。Java.Cogyeka がまさにそのケースです。Java.Cogyeka は、Java の脆弱性こそ悪用していませんが、それ自体は Java で書かれており、多くの悪質な活動を実行します。このブログシリーズでは、その悪質な活動について詳しく説明します。

Java.Cogyeka は 2012 年 6 月に発見され、今もなお活動中です。このマルウェアには以下のように 5 つの機能があり、それぞれについて解説します。

  1. autorun.inf を通じた拡散
  2. ステルス技術
  3. ダウンローダ機能
  4. 不明瞭化
  5. Infostealer 機能

これまでに見られた他の Java マルウェアでも、悪質な機能がここまで複合していた例はありません。悪質なプログラムで Java を見かける場合、その唯一の目的は他のマルウェアをダウンロードすることであり、それ以降の悪質な処理は他のマルウェアによって実行されるのが一般的です。ところが、Java.Cogyeka はそれ自体が悪質なプログラムであり、独自の目的も持っています。追加の悪質なモジュールを必要とせず、Java コード自体が悪質な活動の実行に使われます。これまでに見てきた Java マルウェアの中で、Java.Cogyeka が最も総合的なマルウェアと言えるのはこのためです。

今回は、3 回シリーズの第 1 回目として、この Java.Cogyeka の以下の特徴について説明します。

  • autorun.inf ファイルを通じた拡散
  • ステルス技術
  • ダウンローダ機能

残りの機能、不明瞭化と Infostealer 機能については、次回以降のブログで説明します。

autorun.inf ファイルを通じた拡散
上述のように、このワームは autorun.inf を使って拡散し、以下の形式のファイル名でリムーバブルドライブに自身をコピーしようとします。

  • %DriveLetter%:\RECYCLER\[SID]\[ランダムなファイル名].[ランダムな 3 文字の拡張子]

次に、リムーバブルドライブのルートフォルダに autorun.inf ファイルをコピーしようとします。これは、リムーバブルドライブが他のコンピュータに接続されたとき常にワームを実行するためです。

技術的には、リムーバブルドライブ上に autorun.inf ファイルを作成するときには問題が発生します。設計上、Java はサンドボックス内で動作し、オペレーティングシステムのリソースと直接やり取りすることができないためです。そのため、Java アプリケーションが直接リムーバブルドライブのドライブ名を決定することはできず、JNI(Java Native Interface)を利用してこの問題を解決します。Java.Cogyeka ワームが autorun.inf ファイルを保存して実際に利用するには、リムーバブルドライブのドライブ名を知る必要があります。この問題を解決するために、Java.Cogyeka はネイティブ WIN32 API の GetDriveType メソッドを呼び出そうとします。このとき使われるのは、マルウェア作成者がこのために特別に作成した Windows バイナリ DLL ファイルです。次に、JNI を利用する Java コードが、この DLL に間接的にアクセスします。シマンテックは、この悪質な DLL ファイルも Java.Cogyeka として検出します。

Determining_the_name_of_removable_drives_243px.png

図 1. リムーバブルドライブの名前の決定

ステルス技術
Java.Cogyeka は、コンピュータに侵入するとき一種のステルス技術を使います。と言っても、それらの技術が侵入先のコンピュータのユーザーを本当に欺くものかどうかは疑わしく、またセキュリティ製品を欺けるかどうかも疑問です。この脅威で用いられているステルス技術は 3 つあります。

リムーバブルドライブのアイコンの偽装
このマルウェアに侵入されたリムーバブルドライブは、ドライブのアイコンがフォルダアイコンに変更されます。ドライブのアイコンを変えるのは簡単で、このマルウェアも autorun.inf ファイルに “icon=[アイコン画像のパス]” という文字列を追加しているだけです。このマルウェアは、shell32.dll ファイルのフォルダアイコンを利用しています。

Java_Cogyeka_1_of_3_1_edit.png

図 2. アイコンが変更されたリムーバブルドライブ

偽装の手口としては、実行可能ファイルのアイコンを変更する方法が有名です。実行可能ファイルが Microsoft Office Word や Adobe PDF のような文書ファイルのアイコンになっていると、ユーザーはそれを文書ファイルと信じてしまいます。しかし、リムーバブルドライブのアイコンを変更するというのは話が別です。このマルウェアがリムーバブルドライブのアイコンを変更する理由はわかりませんが、これも無意味なステルス技術のひとつにすぎません。侵入先のコンピュータでこのようなアイコンが見つかった場合に、マルウェアに感染した証拠になるくらいでしょう。

コピーではなく再圧縮
このマルウェアは自身をコピーすると述べましたが、それは正確ではありません。実際には、自身を以下の場所に再圧縮します。

  • %Temp%\jar_cache[ランダムな数字].tmp

Java.Cogyeka は、JAR ファイルとして自身を拡散します。具体的には、ランダムなバイトを追加して JAR ファイルのハッシュ値を変更しようとする場合があります。JAR のファイル形式は Zip 形式に類似しており、Java のクラスを 1 つのファイルに圧縮するときに使われます。Java.Cogyeka は Zip ヘッダーの追加フィールドにランダムなバイトを追加しようとしますが、最近ではセキュリティソフトウェアのウイルススキャン機能によって Zip ファイルが解凍され、アーカイブ内のファイルもスキャンされます。そのため、JAR ファイル内の悪質な .class ファイルもスキャンされるので、たとえ JAR ファイルのハッシュ値が変更されていても検出されることになります。

したがって、JAR ファイルのハッシュ値を変更するという手口も意味がありません。

システムプロセスではなく java.exe
Java.Cogyeka は、java.exe を以下の場所にコピーします。

  •  %Temp%\hsperfdata_[ユーザー名]\[システム実行可能ファイル名].exe

システム実行可能ファイル名として、以下のいずれかが使われます。

  • csrss
  • explorer
  • lsass
  • services
  • smss
  • svchost
  • winlogon

explorer.exe 以外のプロセスは、たとえ管理者権限があったとしても、ユーザーが終了することはできません。マルウェアは、ワームが実行されているプロセスをユーザーには終了できないようにすることを狙っているのです。ところが、シマンテックの脅威情報に記載されているとおり、Java.Cogyeka は StubPath レジストリのサブキーで “javaw” を使っており、上記のいずれかのプロセスを表す “システムファイル名” を指定した “[システムファイル名].exe” を使っていません。このマルウェアがシステムプロセスとして実行されていることを発見した場合に、Windows のタスクマネージャを使ってマルウェアのプロセスを手動で停止することはできませんが、サードパーティ製のソフトウェアを使えばプロセスを終了できます。また、Symantec Endpoint Protectionノートン インターネットセキュリティノートン 360 は、起動後すぐにこのプロセスを自動的に終了することにも注目してください。

マルウェアの作成者はユーザーが手動でこのプロセスを終了することを妨げているつもりですが、その手口もとうてい成功しているとは言えません。

ダウンローダ機能
コンピュータに侵入した Java.Cogyeka は、サーバーに接続して追加のモジュールをダウンロードしようと試みます。このモジュールは明らかに JAR ファイルです。JAR ファイルをダウンロードしてクラスファイルをメモリ空間に解凍し、ClassLoader Java クラスを使ってロードします。任意のクラスをロードすれば、マルウェアの作成者は侵入先のコンピュータを制御できるようになります。Java.Cogyeka は、自身と他のモジュールの新機能を持つ更新もダウンロードできます。

次回は…
今回は、Java.Cogyeka の概要と、コンピュータに侵入するときの仕組みについて説明しました。次回は、このワームが使っている不明瞭化の手口と、そのメインモジュールについて説明します。

 

* 日本語版セキュリティレスポンスブログの RSS フィードを購読するには、http://www.symantec.com/connect/ja/item-feeds/blog/2261/feed/all/ja にアクセスしてください。

Tinder: Spammers Flirt with Popular Mobile Dating App

Over the last few years, we’ve reported on a number of spam campaigns spreading through various social networking sites and applications. As with any social service, as it becomes popular, spammers look for ways to take advantage of this populari…

Phishers Target College Candidates in China

After the annual National College Entrance Examination (NCEE), Chinese high school graduates are now busy choosing a college and filling out college applications. The college picks are no trivial matter; it determines matriculation.

Phishers also do not want to miss out on this event and the opportunity to profit. If a candidates’ personal information is stolen by phishers, the victim and their parents can expect to receive a large number of spam messages or annoying phone calls—including civil college and overseas educational agencies advertising, or even attempts at financial fraud. Phishing websites may even make a candidate mistakenly think they have completed an application to a college—but, actually, they did not—which directly affects the candidate’s future at this important juncture in their life. In addition, the candidate’s information will be sold for profit to overseas educational agencies, fake credentials makers, or re-application services.

Phishers may use the following tricks:

Clone an educational website
The fake Web page is almost identical with the real one, except it includes embedded malicious script or the university contact information is fake. The links on this fake page will mimic the real one. When a candidate searches for a university through a search engine, the link of a fake Web page may appear in the search results. If the candidate clicks any links, they may be lead to a malicious phishing page.

pic1.png.jpg
Figure 1. Phishing site, “Beijing Economic Management Institute”

 

pic2.png
Figure 2. Legitimate site

Scam “smart” cards
This trick entices candidates to buy a “college entrance application smart card”. This fake offer usually claims the smart card is used for completing the college entrance applications forms. The smart card is promoted to also provide access to learning skills like how to choose a college, or offer participation in a skills assessment along with helpful practice forms for college application. However, real college applications can only be achieved through legitimate educational websites of provinces, not any other way. These so-called “college entrance application smart cards” are just traps to fool people and obtain money them.

pic3.png.jpg
Figure 3. “College entrance application smart card” scam

Fake enrollment guidance service
This kind of website phishing entices candidates to pay for a service. However, when the user actually pays they will not get any guidance at all, just a loss of their money.

pic4.png
Figure 4. Fake enrollment guidance service

Alternative application process
Some websites may claim they can supply a “short cut” to admission for candidates who do not score highly in the college entrance exams. These websites display a notification asking users to submit their personal information for the application. If users fill out the form with their personal information, phishers will have stolen it for profit.

pic5.png
Figure 5. Fake “short cut” application for college admission

Most of the phishing websites use search engines, forums, or education advisory websites to promote these scams. We suggest candidates and their parents not click any suspicious URLs and be especially cautious during applications to college.

EncryptFree and Other Tools to Help Consumers Dodge Web Snooping

Just like in the offline world, you leave a virtual paper trail behind you on the web. Information about the websites you’ve visited and information you’ve entered on those sites is captured and used by many parties – from web advertisers to social media platforms (for instance, when Facebook recommends people you may know) to Read more…

The Java Autorun Worm, Java.Cogyeka (1 of 3)

Java.Cogyeka
Recently there has been a lot of attention drawn to the vulnerabilities in Java and how they can lead to malware being created. However, it is worth noting that a vulnerability is not always required for malware to exist, as is the case with Java.Cogyeka. While this threat does not exploit any vulnerability in Java itself, it is written in the Java language and performs numerous malicious activities, which I intend to explore throughout this series of blogs.

Java.Cogyeka was discovered in July 2012 and is still active now. This malware has five features, which I have broken down into the following categories:

  1. Propagation through autorun.inf
  2. Stealth techniques
  3. Downloader functionality
  4. Obfuscation
  5. Infostealer functionality

Other Java malware we have seen does not have this combination of malicious features. Typically, when we encounter Java in a malicious program, its only purpose is to download other malware, which then performs further malicious actions. However, Java.Cogyeka is a malicious program in its own right and with its own purpose—the Java code itself is being used to perform malicious activities without requiring an additional malicious module. This makes it the most comprehensive Java-only malware that I have ever come across.

This is the first in a series of three blogs on Java.Cogyeka and in this blog I will discuss the following features:

  • Propagation through an autorun.inf file
  • Stealth techniques
  • Downloader functionality

The remaining functions, Obfuscation and Infostealer functionality, will be discussed in future blogs.

Propagation through an autorun.inf file
As previously mentioned, this worm uses autorun.inf to spread and attempts to copy itself to a removable drive using a file name in the following format:

  • %DriveLetter%:\RECYCLER\[SID]\[RANDOM FILE NAME].[THREE RANDOM LETTERS FILE EXTENSION]

It then attempts to copy an autorun.inf file to the root folder of the removal drive in order to execute the worm whenever the removable drive is inserted into another computer.

Technically, a problem exists when creating the autorun.inf file on the removable drive. By design, Java operates within a sandbox and cannot interact directly with the resources of the operating system. Because of this, a Java application cannot directly determine the drive letter of a removable drive, but the Java Native Interface (JNI) offers a possible solution to this problem. The worm needs to know the drive letter of a removable drive in order to store and use the autorun.inf file effectively. To solve this problem, it attempts to call a native WIN32 API method GetDriveType through a Windows binary DLL file that the malware author made specifically for this purpose. This DLL is then accessed indirectly by the Java code using JNI. Symantec also detects the malicious DLL file as Java.Cogyeka.

Determining_the_name_of_removable_drives_243px.png

Figure 1. Determining the name of the removable drive

Stealth techniques
Java.Cogyeka uses certain stealth techniques when compromising a computer. It is doubtful that these techniques successfully trick users of the compromised computer or fool security products for that matter. The threat uses three stealth techniques.

Compromised removable drive icon
The removable drive that is compromised by this malware has its drive icon changed to a folder icon. It is easy to change a drive icon, the malware simply adds “icon=[PATH OF ICON IMAGE]” to the autorun.inf file. This malware uses the folder icon from the shell32.dll file.

Java_Cogyeka_1_of_3_1_edit.png

Figure 2. Removable drive with changed icon

Changing the icon of an executable file is a well-known camouflage technique. If an executable file has a document file icon, like Microsoft Word or Adobe PDF, users may misidentify the executable file as a document file. However, changing the icon of a removable drive is a slightly different case. I do not know why the malware changes the icon of the removable drive, but this is one of the malware’s meaningless stealth techniques. If found on the compromised computer, it can be seen as a sign that the malware may be present.

Repacked, not copied
Previously, I stated that the malware copies itself, but this is not entirely accurate. The malware actually repacks itself to the following location:

  • %Temp%\jar_cache[RANDOM DIGITS].tmp

The malware spreads itself as a JAR file. It may try to change the hash value of the JAR file by adding random bytes. The JAR format is like a Zip format that is used to pack Java classes into one file. The malware attempts to add random bytes to an extra field in the Zip headers. However, most security vendor virus scanners can extract Zip files to scan files contained in the archive. They do this so that they can scan the malicious .class file within the JAR file and detect it even though the hash value of the JAR file has changed.

As a result, the malware’s modification of the hash value of the JAR file is meaningless.

java.exe instead of a system process
The malware copies java.exe to the following location:

  •  %Temp%\hsperfdata_[USER NAME]\[SYSTEM EXECUTABLE FILE NAME].exe

It uses one of the following system executable file names:

  • csrss
  • explorer
  • lsass
  • services
  • smss
  • svchost
  • winlogon

Users, even if they have administrator privileges, cannot end these processes, except for the explorer.exe process. The malware aims to deter users from ending the process that the worm is running on. However, it uses “javaw” in the StubPath registry subkey, as described in our detection write-up, instead of “[SYSTEM FILE NAME].exe” with “SYSTEM FILE NAME” representing one of the processes listed above. Users who find this malware running as a system process cannot manually end the malware process by using Windows Task Manager. Third-party software, however, can be used to end the process.  It is also worth noting that Symantec Endpoint Protection and Norton Internet Security/Norton 360 products will end this process automatically as soon as it starts.

While the malware author makes it inconvenient for users to end this process manually, the technique used is far from successful.

Downloader functionality
After the malware compromises a computer, it attempts to connect to a server in order to download an additional module. Apparently, this module is a JAR file. It downloads and extracts class files into its memory space and then loads them with the ClassLoader Java class. Through any class loading, a malware author can gain control of the compromised computer. The malware can also download updates with new features for itself or other modules.

To be continued…
This blog is an overview of Java.Cogyeka and how it works to compromise computers. The next blog in the series will discuss obfuscation techniques used by the worm as well as its main module.

Go AVAST go!

      No Comments on Go AVAST go!

Football is fun! It’s exciting, it brings us together… to share, to enjoy, to be proud (or ashamed?) of our favorite teams. Simply put, it creates a spirit of community. And we at AVAST Software realize how important community is. We also know that AVAST has a community of 22,000,000 users in Brazil. Given the […]

Opera ???????: ????????????????

      No Comments on Opera ???????: ????????????????

2013 年 6 月 26 日、Opera ブラウザの開発元である Opera 社は、同社が不正侵入を受けたと発表しました。原因は同社のインフラストラクチャに対する標的型攻撃でしたが、これは普通の標的型攻撃とは異なっていました。今回使われた攻撃は知的財産を盗み出そうとするものではなく、Opera の自動更新機能を利用して、一般的には金融機関を狙うトロイの木馬に関連付けられるマルウェアを拡散しようとするものだったからです。

Opera 社のネットワークへの不正侵入があったのは 2013 年 6 月 19 日頃のことで、まず同社の失効したコードサイニング証明書が盗まれてマルウェアの署名に使われました。署名されたマルウェアは Opera の自動更新機能を介して拡散できるため、ユーザーはブラウザ更新の一部としてマルウェアを受信することになります。問題のマルウェアは Downloader.Ponik というダウンローダ型のトロイの木馬であり、金融機関を狙うトロイの木馬や Infostealer といったサイバー犯罪に関係するマルウェアの拡散に利用されるのが一般的です。

Opera 社は今回の発表の中で、01:00 から 01:36 の間に数千人のユーザーがマルウェアを自動受信した恐れがあると推測しています。同社はすでに不正侵入を特定しており、それ以上のマルウェアの拡散は食い止めることに成功しました。攻撃の時間が短かったため、成功した件数は限られていました。Opera 社のネットワークにもっと長時間アクセスできていたら、はたして成功率は上がっていたでしょうか。

Opera 社のサーバーに、攻撃者がもっと長時間アクセスしていたら、マルウェアの拡散はもっと多くのユーザーに広がっていたはずですが、そのような攻撃は非常に目立ち、セキュリティ企業の関心もひくため、すぐに保護対策がとられ、コマンド & コントロール(C&C)サーバーを停止するために協力態勢がとられることでしょう。こうしたことすべてが、マルウェアを確実に無効化します。これで思い出されるのは Conficker です。数百万のコンピュータに拡散した脅威で、2009 年 4 月 1 日にはペイロードを実行することになっていましたが、そのときまでには、セキュリティ各社とホスティングプロバイダが協力して、C&C サーバーを管理下に置くことができたというケースです。この脅威は厳密に監視されたため、攻撃者は起動する隙がありませんでした。

積極的な拡散の手段に出ようとすると、攻撃者は拡散の成功に足をすくわれることになります。今のところ今回の攻撃は無効化されていますが、ブラウザを更新し、今後の攻撃に対しても事前対応的に備えることを Opera 社は推奨しています。シマンテックは、今回の Downloader.Ponik に対する保護対策を提供していますが、影響を受けた恐れのあるユーザーはパスワードをリセットすることもお勧めします。

 

* 日本語版セキュリティレスポンスブログの RSS フィードを購読するには、http://www.symantec.com/connect/ja/item-feeds/blog/2261/feed/all/ja にアクセスしてください。

Targeted Campaign Steals Credentials in Gulf States and Caribbean

Last week, McAfee’s Foundstone Incident Response team got hold of a piece of malware that was sent out during a phishing campaign. The campaign targeted several companies and institutes in the United Arab Emirates, Oman, Bahrain, and a couple of Caribbean islands. The executable that was sent with the email was called emiratesstatement.exe and the Read more…

???????????????????????????????

      No Comments on ???????????????????????????????

寄稿: Avdhoot Patil

以前からお伝えしているように、フィッシング攻撃のプラットフォームとしてソーシャルネットワークサイトを集中的に利用する例は後を絶ちません。フィッシングサイトで偽のソーシャルネットワークアプリケーションが使われるのも、今では当たり前になってきました。フィッシング詐欺師は、重要な情報を収集する目的で新しい偽アプリケーションを次々と作り出しています。

過去 6 カ月間で見ると、ソーシャルメディアサイトでのフィッシング攻撃は、フィッシング活動全体のうちで 6.9% を占めました。ソーシャルメディアを標的としたフィッシングサイトのうち 0.9% は、アダルトビデオやビデオチャット、アダルト用チャット、携帯電話の無料通話といった機能を謳う偽アプリケーションでした。

2013 年 5 月、Facebook ファンページを保護し、ひいてはユーザープロフィールの「ソーシャル上のセキュリティ」を強化すると称する偽のセキュリティアプリケーションがフィッシングサイトに登場しました。Facebook ファンページは公開プロフィールとして重要な意味を持ち、有名人や企業が利用するほか、Facebook をよく使うユーザーがファンページやコミュニティページを作成するときにも使われます。有名人や企業は、Facebook ファンページを使って訪問者を増やし、世界中の人とつながることができます。このフィッシングサイトは、米国カリフォルニア州のサンフランシスコにあるサーバーをホストとして利用していました。

Figure1.jpg

図 1. ログイン情報の入力を求めるフィッシングサイト

図 1 のように、フィッシングページには「Ensuring Social Security(ソーシャル上のセキュリティを強化)」というタイトルが付けられています。ページに書かれたメッセージによれば、これはファンページの検証プロセスの一環であり、ソーシャル上のセキュリティを強化する新しい機能です。また、このプロセスは必須であり、「2013 年 5 月 30 日まで利用可能」としたうえで、この期日までに検証されないファンページはすべて完全に閉鎖されると警告します。フィッシングページの中央には、「New Facebook Guidelines(Facebook の新しいガイドライン)」と称したログインフォームが表示されます。ログオンフォームには、以下のフィールドがあります。

  • Fan Page Name(ファンページ名)
  • Email Address(電子メールアドレス)
  • Password(パスワード)
  • Security Code(セキュリティコード)
  • Confirm Security Code(セキュリティコードの確認)

ログインフォームにはセキュリティコードについての説明もあり、10 桁の数字を入力し、かつ紙にも書きとめておくようにという指示があります。セキュリティコードは非常に重要であり、管理権限を委譲する場合や、新しい管理者または運営者を追加する場合に必要になるというのがその理由とされています。ログイン情報を入力して[Submit]ボタンをクリックすると、「Thank You. Your Fan Page is being verified and we will notify you within 48 hours when the process is completed.(ありがとうございます。ファンページは検証中です。処理が終わったら、48 時間以内にご連絡いたします)」という確認メッセージが表示されます。

Figure2_0.jpg

図 2. フィッシングサイトの確認メッセージ

言うまでもなく、ユーザーを欺くことがこのサイトの目的であり、ソーシャルネットワークサイトのログイン情報を入力すればアカウントが保護されると思い込ませることが狙いです。実際には、保護されるどころではありません。ログイン情報を入力すると確認メッセージが表示されますが、その裏ではユーザーのアカウント情報がフィッシングサイトに送信されてしまうからです。

このフィッシングサイトは SSL で保護されていました。

インターネットを利用する場合は、フィッシング攻撃を防ぐためにできる限りの対策を講じることを推奨します。

  • 電子メールメッセージの中の疑わしいリンクはクリックしない。
  • 電子メールに返信するときに個人情報を記述しない。
  • ポップアップページやポップアップ画面に個人情報を入力しない。
  • 個人情報や口座情報を入力する際には、鍵マーク、「https」の文字、緑色のアドレスバーなどが使われていることを確かめ、その Web サイトが SSL で暗号化されていることを確認する。
  • ノートン インターネットセキュリティノートン 360 など、フィッシング詐欺およびソーシャルネットワーク詐欺から保護する統合セキュリティソフトウェアを使う。
  • 電子メールで送られてきたリンクや、ソーシャルネットワークに掲載されているリンクがどんなに魅力的でも不用意にクリックしない。
  • 偽の Web サイトや電子メールを見かけたら通知する(Facebook の場合、フィッシング報告の送信先は phish@fb.com)。

 

* 日本語版セキュリティレスポンスブログの RSS フィードを購読するには、http://www.symantec.com/connect/ja/item-feeds/blog/2261/feed/all/ja にアクセスしてください。

How to Manage the 1024-bit SSL Certificate Migration

Migrating certificates during a major key size migration can be difficult at best. I’m going to give you some background, share a great video we have produced, as well as share seven steps to aid in this migration.
Background – Key Sizes Change w…