'Tools'에 해당되는 글 3건

  1. 2011.09.08 Conducting an Insider Attack by CEOinIRVINE
  2. 2009.01.20 Common Hacking Tools by CEOinIRVINE
  3. 2008.11.29 HP: Pretty Pictures Help Businesses by CEOinIRVINE

Conducting an Insider Attack

Conducting an attack from the inside can be accomplished by using familiar tools and techniques, all of which are found in this book. The primary difference is that you will be working inside the target company at a pre-specified privilege level of an employee, complete with your own network account. In most cases, you can arrange for a private place to work from, at least initially, but in some cases you may have to work out in the open in the presence of other employees. Both scenarios have their advantages; for example, whereas working in private allows you to work undisturbed, working with other employees allows you to get up to speed on security procedures more quickly.

No matter where you wind up working, it’s a given that you must be able to explain your presence, as any newcomer is likely be questioned by curious coworkers. These encounters are far less stressful than encounters during social engineering or physical intrusions because you are legitimately working for someone at the target company and have an easy cover story. In most cases, a simple “consulting” explanation will suffice. In all cases, the fewer people at the target company that are aware of your activities, the more realistic the test will be. If the help desk staff or system administrators are aware that you are a gray hat posing as an employee with the intent of subverting security controls, they will be tempted to keep a close eye on what you’re doing or, in some cases, even give you specially prepared equipment to work from.

For this chapter, we’ll examine a hypothetical company call ComHugeCo Ltd. We’ve been given a Windows domain user account called MBryce with minimal privileges. We’ll attempt to gain domain administrator rights in order to search and access sensitive information.

Tools and Preparation

Each test will be slightly different depending on the environment you are working within. It’s best to work from equipment supplied by the target organization and begin with very little knowledge of the security controls in place. You should arrive prepared with everything you need to conduct your attack since you may not have an opportunity to download anything from the outside once you’re in. At the time of this writing, most companies use content filters. A good network security monitoring (NSM) system or intrusion detection system (IDS) operator will also notice binary downloads coming from hacking sites or even unfamiliar IP addresses. Have all the tools you are likely to need with you on removable media such as a USB drive or CD.

Since you may find the equipment provided fully or partially locked down, hardened, or centrally controlled, you should also have bootable media available to help you access both the individual system and the network at a higher privilege level than afforded your provided account. In the most difficult cases, such as a fully locked CMOS and full disk encryption, you may even want to bring a hard drive with a prepared operating system on it so that you can attempt to gain access to the subject network from the provided equipment. Having your tools with you will help you stay under the radar. We’ll discuss a few practical examples in the following sections.

Orientation

The most common configuration you’ll encounter is the Windows workstation, a stand-alone PC or laptop computer running a version of Microsoft Windows. It will most likely be connected to a wired LAN and utilize the Windows domain login. You’ll be given a domain account. Log in and have a look around. Take some time to “browse” the network using the Windows file explorer. You may see several Windows domains as well as drives mapped to file servers, some of which you may already be connected to. The whole point of the insider attack is to find sensitive information, so keep your eyes open for servers with descriptive names such as “HR” or “Engineering.” Once you feel comfortable that you know the bounds of your account and have a general view of the network, it’s time to start elevating your privilege level.

Gaining Local Administrator Privileges

The local operating system will have several built-in accounts, at least one of which will be highly privileged. By default, the most privileged account will be the Administrator account, but it’s not uncommon for the account to be renamed in an attempt to obscure it from attackers. Regardless of what the privileged account names are, they will almost always be in the Administrators group. An easy way to see what users are members of the local Administrators group of an individual machine is to use the built-in net command from the command prompt:

net localgroup Administrators

In addition to the Administrator account, there will often be other privileged accounts owned by the help desk and system administration groups within the company. For the purposes of our example, our machine uses the Windows default Administrator account.

The easiest way to gain access to the Administrator account is to reset its password. In order to do this while the operating system is running, you’d need to know the existing password, which you probably won’t. Windows protects the file that contains the password hashes, the SAM file, from being accessed while the OS is running. While there are exploits that allow access to the file’s contents while Windows is running, doing so may set off an alert if a centrally managed enterprise antivirus system is in place. Dumping the SAM file only gives you the password hashes, which you then will have to crack. While recovering the local Administrator password is on our agenda, we’ll remove the password from the Administrator account altogether. We’ll collect the SAM file and hashes along the way for cracking later. To do this, we’ll boot the system from a CD or USB drive and use the Offline NT Password and Registry Editor tool (referred to hereafter as “Offline NT Password” for short).

Most computers boot from removable media such as a CD-ROM or floppy disk when they detect the presence of either. If nothing is detected, the machine then boots from the first hard drive. Some machines are configured to bypass removable media devices but still provide a boot menu option during power-up. This menu allows the user to select which device to boot from. Our example uses the Phoenix BIOS, which allows the user to select a boot device by hitting the ESC key early in the boot process. In the worst case, or the best configurations, the boot menu will be password protected. If that’s the case, you’ll have to try dumping the SAM file with an exploit such as pwdump7 while the machine is running. Alternatively, you can install a hard drive of your own as primary to boot from and then access the target Windows drive as a secondary to recover the SAM file.

Offline NT Password is a stripped-down version of Linux with a menu-driven interface. By default, it steps you through the process of removing the Administrator account password. While we have the Windows file system accessible, we’ll also grab the SAM file before we remove the Administrator password. If you choose to boot Offline NT Password from a CD, make sure that you first insert a USB thumb drive to copy the SAM file to. This will make mounting it much easier.

Using Offline NT Password and Registry Editor

Offline NT Password runs in command-line mode. Once booted, it displays a menu-driven interface. In most cases, the default options will step you through mounting the primary drive and removing the Administrator account password, as described next.

Step One The tool presents a list of drives and makes a guess as to which one contains the Windows operating system. As you can see from Figure 6-1, it also detects inserted USB drives. This makes mounting them much easier, because if you insert one later, the tool often will not create the block device (/dev/sdb1) necessary to mount it.

Figure 6-1. Selecting the boot device


In this case, the boot device containing Windows is correctly identified by default, so simply press ENTER to proceed.

Step Two Next, the tool tries to guess the location of the SAM file. In Figure 6-2, we can see that it is correctly identified as located in WINDOWS/system32/config.

Figure 6-2. Finding the SAM file


Again, the correct action is preselected from the menu by default. Before continuing, however, we want to copy the SAM file to the USB drive. Since Offline NT Password is built on a simple Linux system, we can invoke another pseudo-terminal by pressing ALT-F2. This opens another shell with a command prompt. Mount the USB drive using the device name identified in step one and shown in Figure 6-1:

mount /dev/sdb1 /mnt

Next, copy the SAM and SECURITY files to the USB drive. Offline NT Password mounts the boot disk in the directory /disk.

cp /drive/WINDOWS/system32/config/SAM /mnt
cp /drive/WINDOW/system32/config/SECURITY /mnt

Make sure you perform a directory listing of your USB drive to confirm you’ve copied the files correctly, as shown here:

Now return to the menu on pseudo-terminal one by pressing ALT-F1, and then press ENTER to accept the default location of the SAM file.

Step Three The tool will now look into the SAM file and list the accounts. It will then give you the option to remove or replace the selected account password. By default, the Administrator account will be selected, as shown here:

Once selected, the default option is to simply remove the password, as shown next. Although there is an option to reset the password to one of your own choosing, this is not recommended because you risk corrupting the SAM file. Press ENTER to accept the default.

Step Four Once the password is successfully removed from the SAM file, it must be written back to the file system. As shown here, the default option will do this and report success or failure, so press ENTER:

With the SAM file successfully written back to the file system, simply press ENTER for the default option to not try again, and the menu will exit. Remove the CD and reboot the system. You will now be able to log in as the local Administrator with no password.

Recovering the Administrator Password

Despite widely publicized best practices, in more cases than not the LAN Manager (LM) hash for the Administrator account will still be present on the local machine. This hash can easily be cracked to reveal the local Administrator account password. This password will almost never be unique to just one machine and will work on a group of computers on the target network. This will allow virtually full control of any peer computer on the network that shares the password.

Since you’re on the client’s site and using their equipment, your choices may be more limited than your lab, but options include:

  • Bringing rainbow tables and software with you on a large USB hard drive

  • Using a dictionary attack with Cain or L0phtCrack

  • Taking the SAM file back to your office to crack overnight

  • Sending the SAM file to a member of your team on the outside

If you are working as a team and have someone available offsite, you may want to send the hashes to your team across the Internet via e-mail or web-based file sharing. This does present a risk, however, as it may be noticed by vigilant security personnel or reported by advanced detective controls. If you do decide to send the hashes, you should strongly encrypt the files, not only to obscure the contents but also to protect the hashes from interception or inadvertent disclosure. In our example, we’ll use Cain and rainbow tables from a USB hard drive running on the provided equipment now that we can log in as the local Administrator with no password.

Disabling Antivirus

Cain, like many gray hat tools, is likely to be noticed by almost any antivirus (AV) product installed on the system you’re using. If Cain is detected, it may be reported to the manager of the AV product at the company. Disabling AV software can be accomplished in any number of ways depending on the product and how it’s configured. The most common options include:

  • Uninstall it (may require booting into Safe Mode)

  • Rename the files or directories from an alternative OS (Linux)

  • Suspend the process or processes with Sysinternals Process Explorer

An AV product is typically included in the standard disk image used during the workstation provisioning process. Finding the AV product on the computer is usually a simple process, as it likely has a user-level component such as a tray icon or an entry in the Programs menu off the Start button. In their simplest forms, AV products may simply be removed via the Add or Remove Programs feature located in the Control Panel. Bear in mind that after you remove the AV product, you are responsible for the computer’s safety and behavior on the network, as AV is a first-line protective control. The risk is minimal because typically you’re not going to use the computer to access websites, read e-mail, instant message, or perform other high-risk activities.

If you are having difficulty uninstalling the AV product, try booting into Safe Mode. This will limit which applications are loaded to a minimum, which in many cases will negate the active protective controls built into AV products allowing you to uninstall them.

If the product still will not uninstall even while in Safe Mode, you may have to boot the computer with an alternative OS that can mount an NTFS file system in read/write mode, such as Ubuntu or Knoppix. Once the NTFS is mounted under Linux, you can then rename the files or directory structure to prevent AV from loading during the boot process.

As an alternative, you may suspend the AV processes while you work. This may be necessary if the AV product is difficult to uninstall from the local machine without permission from the centralized application controller located somewhere else on the network. In some cases where an enterprise-level product is in use, the AV client will be pushed back onto the workstation and reinstalled if it’s not detected during periodic sweeps. You can use Sysinternals Process Explorer, procexp, to identify and suspend the processes related to the AV product. You may need to play with permissions to achieve this. To suspend a process using procexp, simply right-click the desired process from the displayed list and select Suspend from the drop-down menu, as shown in Figure 6-3. To resume the process, right-click it and select Restart from the drop-down menu.

Figure 6-3. Process Explore


While the processes are suspended, you will be able to load previously prohibited tools, such as Cain, and perform your work. Keep in mind that you must remove your tools when you are finished, before you restart the AV processes, or their presence may be reported as an incident.

Raising Cain

Now that AV is disabled, you may load Cain. Execute the ca_setup.exe binary from your USB thumb drive or CD and install Cain. The install process will ask if you would like to install WinPcap. This is optional, as we will not be performing password sniffing or man-in-the-middle attacks for our simulated attack. Cain is primarily a password-auditing tool. It has a rich feature set, which could be the subject of an entire chapter, but for our purposes we’re going to use Cain to

  • Recover the Administrator password from the SAM file

  • Identify key users and computers on the network

  • Locate and control computers that use the same local Administrator password

  • Add our account to the Domain Administrators group

Recovering the local Administrator Password

With Cain running and the USB drive containing the recovered SAM file from the previous section inserted, click the Cracker tab, and then right-click in the empty workspace and select Add to List. Click the Import Hashes from a SAM Database radio button and select the recovered SAM file from the removable drive, as shown here:

Next you’ll need the boot key. This is used to unlock the SAM file in the event it is encrypted, as is the case in some configurations. Click the selection icon (…) to the right of the Boot Key (HEX) text box, and then click the Local System Boot Key button, as shown here:

Select and copy the displayed key, click Exit, and then paste the key into the Boot Key (HEX) text box. Click the Next button and the account names and hashes will appear in the Cracking window.

In our example, we’re going to recover the password using a cryptanalysis attack on the LM hashes. Using presorted rainbow tables, on a 1TB USB hard drive in this case, and Cain’s interface to the Rainbow Crack application, most passwords can be recovered in under 30 minutes. Right-click in the workspace of the Cracker section of Cain and select Cryptanalysis Attack | LM Hashes | via RainbowTables (RainbowCrack), as shown here:

Next you’ll be prompted to select the rainbow table files to process, in this case from the USB device. After the processing is complete, found passwords will be displayed in the Cracker section next to the account name. The lock icon to the left will change to an icon depicting a ring of keys, as shown here:

Now that we know what the original local Administrator password was, we can change it back on our machine. This will allow us to easily identify other machines on the network that use the same local Administrator password as we continue to investigate the network with Cain.

Identifying Who’s Who

Cain makes it easy to identify available domains, domain controllers, database servers, and even non-Windows resources such as Novell NetWare file servers. Cain also makes it easy to view both workstation and server machine names. Most companies use some sort of consistent naming convention. The naming convention can help you identify resources that likely store or process sensitive information; for example, a server named paychex might be worth looking at closely.

Using Cain’s enumeration feature, it is possible to view user account names and any descriptions that were provided at the time the accounts were created. Enumeration should be performed against domain controllers because these servers are responsible for authentication and contain lists of all users in each domain. Each network may contain multiple domain controllers, and they should each be enumerated. In some cases, the primary domain controller (PDC) may be configured or hardened in such a way that username enumeration may not be possible. In such cases, it is not unusual for a secondary or ternary domain controller to be vulnerable to enumeration.

To enumerate users from a domain controller with Cain, click the Network tab. In the left panel, drill down from Microsoft Windows Network to the domain name you’re interested in, and then to Domain Controllers. Continue to drill down by selecting the name of a domain controller and then Users. When the dialog box appears asking Start Users Enumeration, click Yes and a list of users will appear in the right panel, as shown in Figure 6-4.

Figure 6-4. PDC User Enumeration with Cain


From this hypothetical list, the BDover account stands out as potentially being highly privileged on the COMHUGECO domain because of its PC Support designation. The DAlduk and HJass accounts stand out as users likely to handle sensitive information. To see what domain groups BDover is a member of, open a command prompt and type

net user BDover /domain

To see which accounts are in the Domain Admins group, type

net group "domain admins" /domain

In our hypothetical network example, BDover is a member of the Domain Admins group. We now want to locate his computer. A simple way to do this is by using the PsLoggedOn tool from the Sysinternals Suite. Execute the command

psloggedon.exe –lx BDover

This will search through every computer in the domain in an attempt to find BDover locally logged on. Depending on the number of computers in the domain, this may take quite a while or simply be impractical. There are commercial help desk solutions available that quickly identify where a user is logged on. In lieu of that, we can check the computer names and comments for hints using Cain.

By clicking the All Computers selection under the COMHUGECO domain in the left panel, a list of computers currently connected to the domain is displayed. In addition to the computer name, the comments are displayed in the rightmost column. As we can see here, a computer described as “Bob’s Laptop” could be BDover’s:

Using PsLoggedOn, we can check to see if BDover is logged into the computer described as “Bob’s Laptop” by issuing the following command:

psloggedon \\comhugec–x31zfp

Next, by clicking the COMHUGEEC-X31ZFP computer in the left pane of Cain, it will attempt to log in using the same account and password as the machine it’s running from. In our case, that’s the local Administrator account and recovered password. The account name that Cain uses to log into the remote computer is displayed to the right of the name. If Cain can’t log in using the local machine’s credentials, it will attempt to log in using anonymous. In our example, the local Administrator password is the same, as shown here:

Leveraging local Administrator Access

So far, we have recovered the shared local Administrator password, identified a privileged user, and found the user’s computer. At this point, we have multiple options. The right option will vary with each environment and configuration. In our situation, it would be advantageous to either add our account to the Domain Admins group or recover the BDover domain password. Either will allow us access to virtually any computer and any file stored on the network and protected by Active Directory.

Joining the Domain Admins Group

Adding a user to the Domain Admins group requires membership in that group. We know that user BDover is a member of that group, so we’ll try to get him to add our MBryce account to the Domain Admins group without his knowledge. By creating a small VBS script, go.vbs in this case, and placing it in the Startup directory on his computer, the next time he logs in, the script will run at his domain permission level, which is sufficient to add our account to the Domain Admins group. The go.vbs script is as follows:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "net group ""Domain Admins"" MBryce /ADD /DOMAIN",1

To place the script in the Startup directory, simply map the C$ share using the recovered local Administrator password. This can be done from the Cain interface, from Windows Explorer, or from the command prompt with the net use command. In our example, the file should be placed in C:\Documents and Settings\BDover\Start Menu\Programs\Startup. You will have to wait until the next time BDover logs in, which may be the following day. If you are impatient, you can reboot the computer remotely using the Sysinternals PsShutdown tool, but you do so at the risk of arousing the suspicion of the user. Confirm your membership in the Domain Admins group using the net group command and don’t forget to remove the VBS script from the remote computer.

Recovering the User’s Domain Password

The simplest way to recover the user’s password, BDover in this case, is to use commercial activity-logging spyware. SpectorSoft eBlaster is perfect for the job and is not detected by commercial AV products. It can be installed in one of two ways: by using a standard installation procedure or by using a preconfigured silent installation package. The silent installation option costs more, $99 vs. $198, but will be easier to use during an insider attack exercise. Bring the binary with you because downloading it over the client’s LAN may get you noticed. To install the silent binary, place it in the Startup directory as described in the previous section or use PsExec from Sysinternals. If you must use the normal installation procedure, you’ll have to wait until the user is away from their computer and use Microsoft Remote Desktop Protocol (RDP) or DameWare. DameWare is a commercial remote desktop tool that can install itself remotely on the user’s computer and remove itself completely at the end of the session. If the user’s computer is not configured for terminal services, you can attempt to enable the service by running the following command line remotely with Sysinternals PsExec:

psexec \\machinename reg add "hklm\system\currentcontrolset\control\terminal server" /f /v fDenyTSConnections /t REG_DWORD /d


					  

SpectorSoft eBlaster reports are delivered via e-mail at regular intervals, typically 30 minutes to one hour, and record all login, website, e-mail, and chat activity. Once installed, eBlaster can be remotely managed or even silently uninstalled through your account on the SpectorSoft website.

It is also possible to collect keystrokes using a physical inline device such as the KeyGhost. The device comes in three styles: inline with the keyboard cable (as shown in Figure 6-5), as a USB device, and as a stand-alone keyboard. Each version collects and stores all keystrokes typed. Keystrokes are retrieved by typing an unlock code with the device plugged into any computer; it will dump all stored data to a log file. Obviously, this is not a good solution for a portable computer, but on a workstation or a server, it’s unlikely to be detected.

Figure 6-5. KeyGhost device placement


Finding Sensitive Information

Along the way, you may find some users or servers you suspect contain sensitive information. Workstation and server names and descriptions can help point you in the right direction. Now that we have the keys to the kingdom, it’s very easy to access it. A tool that can help you locate further information is Google Desktop. Since we’re now a domain administrator, we can map entire file server drives or browse any specific user directory or workstation we think may contain valuable information. Once mapped, we can put Google Desktop to work to index the files for us. We can then search the indexed data by keywords such SSN, Social Security, Account, Account Number, and so forth. We can also search by file types, such spreadsheets or CAD drawings, or by any industry-specific terminology. Google Desktop can also help pinpoint obscure file storage directories that may not have been noticed any other way during the testing process.

References

Cain www.oxid.it/

DameWare www.dameware.com/

Google Desktop desktop.google.com/

KeyGhost www.keyghost.com/

Knoppix www.knoppix.org/

Offline NT Password and Registry Editor pogostick.net/~pnh/ntpasswd/

SpectorSoft eBlaster www.spectorsoft.com/

Sysinternals Suite technet.microsoft.com/en-us/sysinternals/bb842062.aspx

L0phtCrack www.l0phtcrack.com

'Hacking' 카테고리의 다른 글

To Catch An APT  (0) 2011.09.10
Metasploit  (1) 2011.09.09
"Apache Killer" a DDoS using the Range HTTP Header  (0) 2011.09.07
SYN Flooding 공격이란?  (1) 2011.08.31
DDOS 대비 방법  (1) 2011.08.31
Posted by CEOinIRVINE
l

Common Hacking Tools

Hacking 2009. 1. 20. 04:12
for those who are unable to find a non-updating launcher, the file to decompile the system.mrs, the BruteCRC32, and the Hash Tab set-up.

'Hacking' 카테고리의 다른 글

ASProtect 1.23 RC4 - 1.3.08.24  (1) 2009.01.24
Gunz Original Files  (0) 2009.01.20
IDA PRO beginner tutorial  (0) 2009.01.11
1.2.3.bmp  (0) 2009.01.10
Hex Calculator  (0) 2009.01.10
Posted by CEOinIRVINE
l

Kenneth G. Brill's "Don't Be Fooled by Pretty Pictures" cautions about using computational fluid dynamics modeling tools, suggesting that they aren't accurate and are a very expensive way to analyze power and cooling air flow in data centers.

While pictures alone don't always tell the true story, CFD analysis is actually a cost-effective and accurate way for technology managers to visualize environmental conditions within a data center. And the color, 3-D graphical pictures that result from a CFD analysis are not only pretty--they can be worth a thousand words when coupled with the analysis, experience and insight of a data center services professional.

An experienced consultant provides strategic planning options for customers to follow, based on a set of parallel efforts to reduce risk and errors as well as assure overall operational improvements. However, a CFD analysis is only one in a complete set of tools at the consultant's disposal.

As Brill stated, a data center consultant needs to play a role akin to an expert physician. But just as a physician wouldn't perform surgery without looking at an X-ray or other image first, a data center manager shouldn't make cooling or heating decisions without a modeling map.

Rather than a pricey, flashy, quick-fix look at how to save on power costs, quality modeling provides great value as a means to evaluate a data center's risks and strengths. CFD models can help services professionals pinpoint exactly where air flow improvements are needed or where to help technology managers adjust capacity planning and budgeting for increased energy efficiency. Usually, the fee for a CFD analysis is very affordable--in the range of $30,000 to $70,000--far less than the $200,000 Brill cited.

A quick survey of technology services providers would show that modeling tools such as a CFD analysis are generally not sold stand alone. In fact, a data center should always be evaluated without modeling first to identify existing inefficiency gaps from non-compliance of best practices before undertaking the more in-depth modeling and analysis. CFD modeling is at its best within data centers where major adherence to best practices are already largely in place.

Once best practices are implemented, CFD will point out data center zones that are out of balance regarding provisioning, information technology loads and return air flows. It will also determine the actual operational condition/capacity of data center Computer Room Air Conditioning or Computer Room Air Handler units. Assumptions about their operational capacity are not in order. For example, the industry's best services consultants would not subcontract the assessment, and they would use a variety of their own power and cooling test and measurement equipment to determine the actual state and capacity of air handlers.


'Business' 카테고리의 다른 글

Reasons Entrepreneurs Have To Be Thankful  (0) 2008.11.29
All Infosys and India  (0) 2008.11.29
businessmen of the year  (0) 2008.11.29
Product of the Year: Asustek's Eee PC  (0) 2008.11.29
Bond Buyer's Dilemma  (0) 2008.11.29
Posted by CEOinIRVINE
l