Windows 8.1 Security Improvements – RestrictedAdmin RDP

Windows 8.1 and also Windows 2012 R2,  come with many security improvements. My favorite feature is related to RDP as i usually use RDP to administer all servers beside PowerShell.

 This measure is meant to enhance Windows credential protection against attacks such as Pass-the-hash attacks.

The new feature is called (Restricted Admin Mode for RDP).  Usually when you connect to a remote computer using RDP, your credentials are stored on the remote computer that you RDP into. Usually you are using powerful account to connect to remote servers, and having your credentials stored on all these computers is a security threat indeed.

Imagine you are conecting to a Remote Desktop Server with your admin credentials using RDP, With so many other users using that server, the possibility for a malware infecting that box is high.

With the new feature introduced in Windows 8.1 and Windows Server 2012 R2, when you connect to a remote computer using the command,  MSTSC.EXE /RESTRICTEDADMIN, you will be authenticated to the remote computer but your credentials will not be stored on that computer as they would have been in the past. This means that if a malware or even a malicious user is active on that server, your credentials will not be available on that remote desktop server.

When connecting to a remote computer using RDP and specifying the /RestrictedAdmin switch, the experience looks like this:

restrictedadmin RDP 1

Things to watch out when using this feature

When you connect to a remote computer using this feature, your identity is preserved on that remote server. Say for example that you are connecting from your machine to a server called (SRV1), any activity that you are doing during that remote desktop session on SR1 is performed using your identity. If you tried to access any network resource from that remote server (SRV1), then the identity that is being used is the computer account $SRV1, and not your identity. This is because your identity is not stored on SRV1 server and it cannot be used to jump or connect to a second network resource from there.

Microsoft documentation mentions this “Restricted mode may limit access to resources located on other servers or networks beyond the target computer because credentials are not delegated.”

So if i connect to SRV1 from my machine and then i tried to access the admin share on SRV2 from that remote desktop session, then the connection will happen using SRV1 computer account and not mine.

restrictedadmin RDP 2

GPO Settings

There is a tricky GPO to control and enforce this new feature. The tricky part that this GPO setting should be applied to the machines initiating the remote desktop session using /RestrcitedAdmin feature, and not on the target RDP server.Example if I had 8.1 clients all over my network it would be a good idea to force this setting on my helpdesk personnel systems so that when they RDP to client systems they would be forced to use Restricted Admin mode.

GPO setting is located under the Administrative Templates under Computer Configuration > System > Credential Delegation > Restrict delegation of credentials to remote servers.

restrictedadmin RDP 3


The Restricted Admin mode only applies to administrators and the remote server should support this feature.

Furthermore, the remote server cannot delegate your credentials to a second network resource. This can become a problem with some implementations like remote apps.

Security Trade-Off

There is a big argument on the internet about how vulnerable this feature can be in a way or another, to pass-the-hash attack. Check my blog post to know more.


Sandbox for malware detection

The problem

Crackers are getting smarter everyday.They are using new and sophisticated ways to encrypt their malware or to make them change their shape and signature with time. This makes it so difficult for signature based antivirus solutions to detect and protect against those types of malware. Furthermore, zero day attacks are becoming more and more popular than ever and IT Security people should respond.


Since we cannot depend on comparing a malware file against a list of signatures in a database, we should think of a way to study the life cycle of the malware when it is in motion (action). Just imagine that you are given a malware file, and you are asked to study its behavior. Usually you will let it run in a controlled environment, and start monitoring what the malware is doing to the registry, O.S, processes, memory, and what network connections it is opening. Sandbox is exactly the same idea.

Sandbox originally is a concept that is used to describe running a program in an isolated and controlled environment for evaluation and testing purposes. Usually Sandboxes are used to test running applications from third party un-trusted vendors. Security people use Sandboxes now for malware investigation and detection.

How does it work

When a user first downloads an executable file, the file gets downloaded to his machine and also a copy of the file is sent to the Sandbox for evaluation. The Sandbox contains couple of virtual machines that simulate the end user’s operating system to the patch level. Since the Sandbox is optimized for this work, it will execute the file faster and start studying its behavior. If it suspects a malware connectivity (Call Back) to the cracker control and command center, then it will block it if it is configured to do so, or just log that incident.


Sandbox malware detection uses behavior-based malware classification patterns, not code-based signature solutions. Patterns cover everything from generic malicious behavior (i.e. creating files, modifying registry keys) to family-specific behavior patterns (i.e. banking Trojans, keyloggers). Malware infects virtual systems inside the Sandbox, create and delete files, replicate, connect to carefully controlled IRC servers and URLs, send emails, set up listening ports, or perform most other functions as they would on real systems. Working at the kernel level, the sandbox emulator exercises the malware, intercepting behavior and converting it into step-by-step forensic intelligence, providing a map of the damage the threat would cause if allowed to run on a real machine, without ever putting actual systems at risk.

Sandbox ISO Images

Usually the Sandbox contains many virtual machines inside it (ISO Images) for different operating systems (typically Windows XP SP3 and others). Each machine simulates one of the possible operating systems inside the corporate network to the service pack level. Some Sandboxes allow you to copy your “Gold image” that you use internally on your machine, which will create extremely similar virtual environment inside the Sandbox and this allows better judgments.

Usually Sandboxes do not contain ISO images for Apple, Android, Linux or other non-Windows legacy devices and it is likely that the Sandbox will not be able to do anything about a malware written to target those operating systems. This is an obvious detection limit for Sandboxes when it comes to malware detection !.


Malware is VM aware

An intelligent malware can detect if it is running inside a virtual machine and not on an actual user workstation by looking at different things (like the VM process or network card MAC addresses), so it will sleep and do nothing as it knows it is being evaluated inside an virtual environment by a security team. Sandbox vendors compete to create an internal environment with undetected visualization platforms so that the malware will be active when get analyzed. Think about it, if the Sandbox has vmware virtual machines inside it, then when it evaluate a malware, the malware is smart enough to know it is in a known virtual environment, and will not do anything, and the sandbox will not detect any thing suspicious allowing the malware to spread inside the network undetected. Most Sandbox security vendors claim that they have their own visualization platforms to simulate the end user O.S environment, but they do not share these details in public, so malware writers cannot get around their product.

Final Thoughts

I believe Sandbox approach to detect malware besides signature based detection is a big step towards better security. Sandboxes can detect malware that signature based cannot detect usually.

Nevertheless, most Sandboxes do not have ISO images for Linux, Apple and other legacy operating systems, so if you are using those a lot, then Sandbox will not be useful here.

The interesting part is that botnets malware type, will usually stay in sleep mode until the bot master activates them. This means that they will definitely bypass Sandbox security.

Further more, crackers are getting smarter now and will wait for the user to do couple of clicks on his machine before activating the malware to bypass Sandbox systems. Interesting right !!

Again, Sandbox is definitely a big step in the right direction that can raise your security level, but it is not completely bullet proof and they are so expensive financially and operationally. Doing simple Risk Assessment in your company would be your way to go when deciding to purchase one of those products as it depends on your business  you are in.


Metamorphic and Polymorphic malware : changes its shape like a real virus !

Can you imagine that a piece of malware code can change its shape and signature each time it appears, to make it extremely hard for signature based antivirus to detect them ?! This is called Polymorphic or Metamorphic malware.

In its annual threat report, security firm Sophos said that the majority of samples it observes are unique attacks associated with polymorphic malware!

Although the idea of mutating malware sounds quite scary, it’s actually been used by malicious hackers since the early 1990s but they are getting very advanced. Usually antivirus solutions use signatures to identify malware by comparing each file with their database of malware signatures. If the file under investigation has the a signature that looks like on of the signatures in their database, then it will detect the infection.

Crackers are getting smarter. When you visit a suspicious web site, you will get infected with a malware with a certain shape and signature. When another person visits the same site, he will get infected with the same malware but with different shape and signature. Each time someone downloads that malware, a new shape is generated for the same malware automatically. Actually refreshing that page will generate new shapes for the new malware !. This makes it so difficult for signature based antivirus solutions to handle.

Moving to a New Blog Platform

This post is now moved to my new blog platform at To continue reading this blog post, please click here

Security Academy – Course 105 : Botnets Part 2

Check other parts here:

In part two of this course, we will be talking about the types of attack that can be done from an infected computer with a bot.

Types of attacks

Distributed Denial of Service DDoS is the most common one, where the whole Zombie army will try to bring a published service down by sending millions of requests using Ping of Death, or using ICMP through a reflector (Smurf Attack).

Another technique would be something called (Teardrop) where bots send pieces of an illegitimate packet; the victim system tries to recombine the pieces into a packet and crashes as a result

Mailbomb on the other side is when bots send a massive amount of e-mail, crashing e-mail servers.

Botmasters nowadays will rent their Zombie army to another people for certain amount of money to send spam emails and advertisements or even to do DDoS attacks.

Even worse, botmasters may use botnet to perform some phishing attacks or install key logging programs to steal your credit card information and passwords.

One of the most interesting usage of botnet is to play with internet poll results or performing Click Fraud. Click Fraud refers to the practice of setting up a botnet to repeatedly click on a particular link. Sometimes, crackers will commit Click Fraud by targeting advertisers on their own Web sites. Since Web advertisers usually pay sites a certain amount of money for the number of clicks an ad gets, the botmaster could stand to earn quite a few dollars from fraudulent site visits.

It becomes way dangerous when it comes to Identity theft or unknowingly participate in an attack on an important Web site

How to prevent your computer from becoming one

Prevention is the name of the game here, below you can find some tips to prevent your computers from being a bot:

  • Implement a good Antivirus.
  • Keep your systems patched all the time.
  • Implement a strong firewall.
  • Deploy very complex passwords that are hard to guess.
  • Do not open emails or attachments from people you do not trust.

Sadly, if your computer is already a bot, your options are minimum. Your best shot is to erase everything and format the box.

Check out this YouTube link

Security Academy – Course 105 : Botnets Part 1

Check other parts here:

Imagine that the internet is a city, it would be the most crowded city in the world, but it would be incredibly seedy and dangerous. You can find all types of criminals out there waiting to infect you with malwares.

Inside this city, you would also discover that not everyone is who they seem to be – even yourself. You might find out that you’ve been misbehaving, although you don’t remember it. You discover you’ve been doing someone else’s bidding, and you have no idea how to stop it.

An attacker can infect a computer to become (Zombie Computer) and use it to do illegal activities. The user generally remains unaware that his computer has been taken over – he can still use it, though it might slow down considerably. As his computer begins to either send out massive amounts of spam or attack Web pages, he becomes the focal point for any investigations involving his computer’s suspicious activities.

Moving to a New Blog Platform

This post is now moved to my new blog platform at To continue reading this blog post, please click here

Security Academy – Course 104 : Malware Part 3

Check other parts here:

It is part three of the Malware course. In part one, we have identified malware as the umbrella term. This is a big catchall phrase that covers all sorts of software with nasty intent. In part two, we talked about how malware will reach you [Delivery Methods]. In this part, we will talk about some of the [Actions] that malware will do once you get infected. This is the interesting part !

Spyware: Steals Your Information

It is malicious computer program that does exactly what its name implies -i.e., spies on you. After downloading itself onto your computer either through an email you opened, website you visited or a program you downloaded, spyware scans your hard drive for personal information and your internet browsing habits.

spyware 121

Some spyware programs contain keyloggers that will record personal data you enter in to websites, such as your log on usernames and passwords, email addresses, browsing history, online buying habits, your computer’s hardware and software configurations, your name, age and sex, as well as sensitive banking and credit information.

Some spyware can interfere with your computer’s system settings, which can result in a slower internet connection.

Since spyware is primarily meant to make money at your expense, it doesn’t usually kill your PC—in fact, many people have spyware running without even realizing it, but generally those that have one spyware application installed also have a dozen more. Once you’ve got that many pieces of software spying on you, your PC is going to become slow.

Scareware: Holds Your PC for Ransom !!

Sometime it is called Ransomware.

Lately a very popular way for Internet criminals to make money. This malware alters your system in such a way that you’re unable to get into it normally. It will then display some kind of screen that demands some form of payment to have the computer unlocked. Access to your computer is literally ransomed by the cyber-criminal.

Sometime the user is tricked into downloading what appears to be an antivirus application, which then proceeds to tell you that your PC is infected with hundreds of viruses, and can only be cleaned if you pay for a full license. Of course, these scareware applications are nothing more than malware that hold your PC hostage until you pay the ransom—in most cases, you can’t or even use the PC.

Ransomware can be Lock Screen type (locks your computer until you pay), or Encryption type, which will encrypt your files with a password until you pay.

The most famous malware of this type is the “FBI MoneyPak”. It will lock your screen saying that you break some copyright laws or visited unauthorized pages, and you need to pay the FBI money to unlock your PC. Really smart !!


Adware: We will get you some Advertisements

Adware is any software that, once installed on your computer, tracks your internet browsing habits and sends you popups containing advertisements related to the sites and topics you’ve visited. While this type of software may sound innocent, and even helpful, it consumes and slows down your computer’s processor and internet connection speed. Additionally, some adware has keyloggers and spyware built into the program, leading to greater damage to your computer and possible invasion of your private data.


Security Academy – Course 104 : Malware Part 2

Check other parts here:

In part one, we have identified malware as the umbrella term. This is a big catchall phrase that covers all sorts of software with nasty intent. In this post, we will talk about how malware will reach you [Delivery Methods]

Virus : Breaks Stuff

[Key thing to remember] They need the first click from the user!!!]


It is a type of Malware and it is nothing but a piece of code that is designed to render your PC completely inoperable, while others simply delete or corrupt your files—the general point is that a virus is designed to cause havoc and break stuff.

Often viruses are disguised as games, images, email attachments, website URLs, shared files or links or files in instant messages.


Viruses can spread sometimes to other machines, but usually it spread slowly and most of the time, rely on the user to transfer the infected file. You can have viruses in your computer but they are setting there doing nothing until you click on the executable they attach themselves to. So it needs a human action and they don’t propagate by themselves. Infected USB drives are famous way of moving the virus around.

An interesting  type of viruses are Macro Viruses. A macro is a piece of code that can be embedded in a data file. In most respects, macro viruses are like all other viruses. The main difference is that they are attached to data files (i.e., documents) rather than executable programs.


It infects files and programs and usually destroy files and can also interfere with computer operations by multiplying itself to fill up disk space or randomly access memory space, secretly infecting your computer.

Worm: Copy Themselves <massive effect>

[Key thing to remember] They don’t need the first user click or any action. They can propagate by their own using your network.


Some consider them sub class of viruses but the key difference is that they don’t need the first user click or any action. They can propagate by their own.

It is called warm because they can move around by their own. You can think of them as viruses that are self-contained and go around searching out other machines to infect.


Due to the copying nature of a worm and its capability to travel across networks the end result in most cases is that the worm consumes too much system memory (or network bandwidth), causing Web servers, network servers and individual computers to stop responding.


Some of the most famous worms include the ILOVEYOU worm, transmitted as an email attachment, which cost businesses upwards of 5.5 billion dollars in damage. The Code Red worm defaced 359,000 web sites, SQL Slammer slowed down the entire internet for a brief period of time (75000 infections in the first 10 minutes !), and the Blaster worm would force your PC to reboot repeatedly.


 worms are standalone software and do not require a host program or human help to propagate. It also uses a vulnerability or social engineering to trick the user into spreading them.

Worm rely on network to spread. One example would be for a worm to send a copy of itself to everyone listed in your e-mail address book. Then, the worm replicates and sends itself out to everyone listed in each of the receiver’s address book, and the manifest continues on down the line.

Trojans Horses: Install a Backdoor

In simple words, it is a software that you thought was going to be one thing, but turns out to be something bad.

Do you remember that story you had to read in high school about the big wooden horse that turned out to be full of guys with spears? This is the computer equivalent.

trojan horse

It is a program that either pretends to have, or is described as having, a set of useful or desirable features but actually contains damaging code.

Generally, you receive Trojan horses though emails, infected webpages, instant message, or downloading services like games, movies, and apps. True Trojan horses are not technically viruses, since they do not replicate; however, many viruses and worms use Trojan horse tactics to initially infiltrate a system.  So although Trojans are not technically viruses, they can be just as destructive.

Security Academy – Course 104 : Malware Part 1

Check other parts here:

The point of today’s lesson is to help you teach your friends and family more about the different types of malware, and debunk a few of the common myths about viruses. Who knows, maybe you’ll learn a thing or two as well.

The meaning of those words have changed over time and people may use some meaning the other. In this academy, I will project my own perspective by dividing and separating this topic to  [How you get infected] and [Type of actions] once infected. This will make it easy for you to digest.

Why should I care in the first place to know those stuff??

Why it is good practice to know these terms and distinguish between them, someone may ask? Well, if you know that you get infected by a worm, then you should panic more than if you get hit by a virus because of the speed of spread. It is also nice to read in the news about one of those terms and say “OH, I know what this means!”

Another important thing is that when you purchased an Antivirus software, that you check with the supplier what kind of malware it can detect. Sometimes, those Antivirus software will protect you against some but not all of those bad guys. So pay attention!!

You will hear a lot about vulnerability and Exploit

Funny thing about software: it’s written by humans. Humans are fallible and sometimes they do mistakes. Sometimes those mistakes create strange behavior in programs. And sometimes that strange behavior can be used to create a hole that malware or hackers could use to get into your machine more easily. That hole is otherwise known as a vulnerability.

The strange behavior that can be used to create a hole for hackers or malware to get through generally requires someone to use a particular sequence of actions or text to cause the right (or is that wrong?) conditions. To be usable by malware (or on a larger scale by hackers), it needs to be put into code form, which is also called exploit code.

It is all Malware

The word malware is a combination of two words malicious” and “software”. Malware is the big umbrella term. It covers viruses, worms and Trojans, and even exploit code. But not vulnerabilities or buggy code, or products whose business practices you don’t necessarily agree with.

The difference between malware and vulnerabilities is like the difference between something and the absence of something. Yeah, okay, that’s a bit confusing. What I mean is malware is a something. You can see it, interact with it, and analyze it. A vulnerability is a weakness in innocent software that a something (like malware or a hacker) can go through.

umbrella term

If you recall from previous Security Academy courses, we talked about types of attack.Well, some kinds of malware can be considered Denial of Service DoS attacks, because usually they do nasty stuff to your files or consume your bandwidth, memory or disks pace, and  preventing you from using corporate resources.

Sometimes you’ll hear the term “rootkit” or “bootkit” used to describe a certain type of malware. Generally, this refers to methods that the malware uses to hide itself deep inside the inner workings of Windows so as to avoid detection.