Why Penetration Testing and Windows Command Line Ninjitsu for Pen Testers. By Ed Skoudis. Copyright 2008, SANS Version 1Q08
|
|
|
- Dinah Day
- 10 years ago
- Views:
Transcription
1 Why Penetration Testing and Windows Command Line Ninjitsu for Pen Testers By Ed Skoudis Copyright 2008, SANS Version 1Q08 Network Pen Testing & Ethical Hacking , Ed Skoudis 1 Hello and welcome to this webcast! Our purpose today is to discuss the motivations for performing penetration testing to help illuminate the security stance of an enterprise, and to cover some in-depth Windows command-line tips that can help professional penetration testers use Windows machines more effectively in their craft. We ll have an interactive Q&A session at the end of the webcast. If you have a question, send to the moderator, whose address will be provided at the outset of the session via the webcast audio. Discussions about relevant topics are incredibly important in a session like this, as we have numerous attendees with various levels of skill. Please share your insights and ask questions via . 1
2 This Webcast and the SANS 560 Course Designed for penetration testers and ethical hackers Based on material from the new SANS course: SANS Security 560: Network Penetration Testing and Ethical Hacking The focus of this new course is in-depth, real-world penetration testing techniques Providing a deep understanding of the technical skills needed by professional penetration testers and ethical hackers Not just playing with tools, but seeing how we can use them for maximum effectiveness, presenting our results in business terms Lots of hands on exercises to foster a practical understanding Analyzing different approaches and time-saving tips Covering the workflow of the professional pen tester Based on countless hours of brainstorming with some of the best penetration testers in the business Covers the skills we look for when we hire pen testers Network Pen Testing & Ethical Hacking , Ed Skoudis 2 This webcast is built from material from the brand-new SANS class called SANS Security 560: Network Penetration Testing and Ethical Hacking. This class covers network penetration testing in-depth, addressing the overall process and workflow of professional penetration testers, providing a great deal of hands-on exercises to ensure attendees understand how to apply tools properly in conducting penetration tests. The 560 course is based on countless hours of in-depth brainstorming between its author, Ed Skoudis, and several other professional penetration testers, including Jay Beale, Matthew Carpenter, Tom Liston, and Atlas. The class covers very useful tips and techniques for making tests successful, including tricks that help save time. Without these techniques, a given task may take hours or days, but, by applying the in-the-trenches knowledge in the course, you may be able to complete the given task in minutes. In particular, the new course focuses on the skills that we look for when interviewing penetration testers. 2
3 Outline Why Penetration Testing? Windows Command Line Tips for Pen Testers Conclusions Q&A Network Pen Testing & Ethical Hacking , Ed Skoudis 3 Here is our outline for the session. We ll start by discussing the motivations for doing penetration tests, highlighting how they can help organizations better understand their security stance. We ll then jump into a detailed technical conversation about how penetration testers can use the Windows command line to really help them do their jobs more effectively on their own Windows computers, as well as compromised target machines. We ll finish with conclusions and then open it up for Questions and Answers submitted via . Please note that we have a large variety of people from very different backgrounds attending this webcast. We ve selected the content to appeal to a broad group, including people who are more focused on the technical skills needed for penetration testing, as well as those who are more concerned with policy and process in penetration testing. The truth is that all penetration testers need to be skilled across each of these arenas if we want to maximize our potential for success. Thus, if you are technically oriented, don t blow off the motivation section of the webcast. It s important for you to be able to justify why you do what you do, to help present the business reasons for conducting penetration tests to target personnel. Likewise, if you are more of a policy and procedure person, you need to understand what it technically feasible and the great things that can be accomplished using built-in Windows command line tools. Thus, there is something for nearly every penetration tester in this session, but don t ignore the areas that push the bounds of your own experience. It s at those edges that we can all improve our skills. 3
4 The Mindset of a Penetration Testers and Ethical Hackers We break computers, making them do stuff that their designers, implementers, deployers, and system administrators didn t plan on them doing. Noted penetration tester Successful penetration testers and ethical hackers must maintain a mindset that involves two oftencontradictory concepts: Think outside of the box, be pragmatic, do things differently But, at the same time, be thorough, methodical, and careful, take good notes, make your work repeatable Balance between these two is crucial for success Network Pen Testing & Ethical Hacking , Ed Skoudis 4 Let s briefly explore the mindset of penetration testers and ethical hackers. A noted penetration tester, someone whose name you would likely recognize but who has requested anonymity, said: We break computers, making them do stuff that their designers, implementers, and system administrators didn t plan on them doing. That s what our job is: finding flaws that could allow attackers to do evil on target machines, so that vulnerabilities can be fixed before mayhem ensues. However, to successfully achieve that goal, penetration testers and ethical hackers must maintain a mindset that involves two often-contradictory concepts. First, a penetration tester or ethical hacker must be flexible and pragmatic, thinking outside of the box. To be successful, you ll need to think differently than most traditional system administrators or network architects, trying to solve problems in often-untraditional ways. But, at the same time as you wield your pragmatic style, you have to be thorough, methodical, and careful. Your work, to be valuable, must be understandable and reproducible so that the target organization can understand its vulnerabilities and risks and take action to mitigate the flaws. You need to take good notes and produce a high-quality report that presents your findings in a digestible form for people who don t perform penetration testing or ethical hacking professionally -- people who may not share your pragmatic, think differently mindset. Some people struggle with this mindset, erring by allowing one side to dominate over the other. However, many people are able to resolve this conflict between these two mindsets, balancing them. To be a successful penetration tester, we need to strive for this balance. 4
5 Why Ethical Hacking and Penetration Testing? To find vulnerabilities before the bad guys do To make a point to decision makers about need for action or resources To help prioritize activities in improving defenses Network Pen Testing & Ethical Hacking , Ed Skoudis 5 Many organizations use ethical hacking and penetration testing to find security flaws before the bad guys do. After applying their security policies, procedures, and technology, organizations can use thorough penetration tests to see how effective their security really is in light of an actual attack, albeit by friendly attackers. An added benefit of ethical hacking and penetration testing is that, because they show real vulnerabilities and indicate what a malicious attacker might be capable of achieving, they can get management s attention. Decision makers, when presented with the carefully formulated results of a test in business terms, are more likely to provide resources and attention to improve the security stance of an organization. Furthermore, a properly conducted penetration test can help an organization prioritize its resources so that defenses can be improved where the most significant vulnerabilities are most likely to be exploited. 5
6 Limitations of Penetration Testing and Ethical Hacking Penetration testing cannot find all vulnerabilities in a target environment There are limitations based on the resources and constraints of a test Limitations of scope Limitations of time Limitations on access of pen testers Limitations on methods of pen testers No denial of service is a common constraint, which could limit diversionary attacks and other activities Network Pen Testing & Ethical Hacking , Ed Skoudis 6 Although penetration testing and ethical hacking are useful practices, they do have some noteworthy limitations worthy of analysis. Many of these limitations are associated with the nature of testing projects themselves, with finite resources and a focused scope. First off, testing projects by their very nature have a limited scope. Most organizations don t (and can t) test everything, due to resource constraints. We test those elements of our infrastructure that are deemed most vital. But, a real-world attacker may find flaws in other areas that simply weren t part of our testing project s scope. A related limitation is time. Professional penetration testers and ethical hackers are allocated a certain amount of project time for a test. Attackers often have far more time to work on their attack, stretching it out over months or years, when most testing processes last days, weeks, or, at most, a few months. Furthermore, penetration testers and ethical hackers often have constrained access to the target environment that models where some, but not all, of the bad guys sit. For example, an organization may have a penetration test performed against its DMZ systems from across the Internet, modeling what attackers sitting anywhere in the world would see if they attacked through the normal Internet gateway. However, such a test won t detect vulnerabilities associated with local wireless access points, or attack vectors that could be used by malicious insiders already on the internal network. Also, because of the risk of crashing a target system during a test, some particular attack vectors will likely be off the table for a professional penetration tester or ethical hacker. For example, creating a denial of service flood to distract a system administrator from another attack vector would be an ideal tactic for a real bad guy, but will likely fall outside of the rules of engagement for most professional testers. 6
7 Additional Limitations Additional limitations are associated with the testing team and their tools arsenal: Limitations of skills of pen testers Limitations of imaginations of pen testers The magical Eureka! moment doesn t always strike Limitation of known exploits Majority of testers don t write their own exploits Even for those that do, there often isn t enough time to write exploits for a specific flaw found in a specific environment Exceptions: Big budget, focused scope, or leverage for multiple projects We want to minimize these issues by making sure our testers are as skilled and experienced as possible That s one of the goals of this webcast and the SANS 560 course Network Pen Testing & Ethical Hacking , Ed Skoudis 7 Beyond the limitations of project-oriented tests, we have limitations associated with the testing team itself. Professional penetration testers and ethical hackers are limited in that they have a finite skill set. Even very skilled testers have their limits, focusing on certain technologies and having less expertise in others. A malicious attacker with a different skill set might hit just the right areas of expertise to find flaws too subtle for testers with a significant but different skill set to find. Additionally, testing regimens are limited by the imagination of the testers themselves. Some attackers are incredibly creative, using vulnerabilities in manners that many penetration testers might not even consider. A major theme of this course is thinking outside of the box in a pragmatic way to bypass defenses in the target organization. But, even the most gifted of professional testers may not have the Eureka! moment that a malicious attacker could. Finally, most professional penetration testing is limited by the current known exploits available publicly. Most professional penetration testers and ethical hackers do not write their own exploits, but instead rely on exploits written by others. Even for those testers who do write exploits, there often isn t enough time to create a custom exploit for a newly discovered flaw in a given target environment. The resources of a test project are finite, and creating custom exploit code could easily consume a great deal of the overall project s budget. Thus, unless the project has a particularly large budget, the client has specified a very narrow focus, or a given exploit for a flaw can be applied to several target organizations in numerous tests, custom exploit development during a penetration test is very unusual. Of course, we strive to overcome these limitations by having a highly skilled and experienced set of penetration testers and ethical hackers. One of the major goals of the SANS 560 course is supporting professionals in their goal of improving their penetration testing and ethical hacking skills. 7
8 Other Approaches to Finding Security Vulnerabilities Configuration review Manual and automated MBSA and CIS benchmarking tools particularly helpful Architecture review Can help determine whether defense-in-depth is applied, which is harder for penetration testing to discern Interviews with target environment personnel Help find flaws in processes and security awareness Detailed audits Detailed checklists make for a more systematic analysis of focused security issues Network Pen Testing & Ethical Hacking , Ed Skoudis 8 Besides penetration testing, there are other approaches for finding security vulnerabilities in a target environment, including: Configuration reviews: By analyzing the configuration settings of network equipment, operating systems, and applications, numerous major security flaws can be discovered. Security personnel can use admin privileges to inspect configurations manually, or to run local configurationchecking tools like Microsoft s Baseline Security Analyzer (MBSA) or the Center for Internet Security (CIS) benchmark tools for Linux, Windows, and other systems. Such tools provide a wealth of information, often finding flaws that cannot be discovered by a penetration test conducted remotely. Architecture reviews: By looking at the overall design of systems and how they relate to each other on the network, significant security flaws can be discovered. For example, careful review of a network diagram might indicate that the organization has failed in its goal of deploying defense in-depth, with multiple layers of filtering between each host and the Internet. A penetration test that doesn t include an overall network topology map review might not be able to find this kind of issue. Interviews with target environment personnel: By discussing security practices with the operations, security, and user-base personnel of a target environment, major security weaknesses often come to light, weaknesses that couldn t be found by a penetration tester because such issues are more associated with process and awareness than with technical specifications and configurations. Detailed audits: With a carefully refined checklist, auditors also can find security flaws in an environment that would elude a penetration tester or ethical hacker, because the testers usually don t have the access to the target environment that auditors do. 8
9 So, Why Pen Testing and Ethical Hacking? Penetration testing and ethical hacking evaluate things as they actually are Where the rubber meets the road What would an actual attacker see? Helps us determine risk level better than architecture and config review Pen testing and ethical hacking help to find mistakes that other approaches miss Unknown problem with configuration or architecture that might be overlooked in a review Deeper than most audits Pen testing and ethical hacking have a different impact on the time resources of target environment personnel Fewer in-depth interviews, but more debriefings and scope checks Network Pen Testing & Ethical Hacking , Ed Skoudis 9 Given the limitations of penetration testing, as well as the the other approaches to finding security vulnerabilities we have available, why should an organization perform penetration tests and ethical hacking exercises? Quite simply, because they provide an excellent view of the actual security state of an environment. They highlight what a real-world bad guy might see if he or she targeted the given organization. We get to see security in an actual operational context, not merely on paper (like an architecture review) or in discussions (like a set of interviews). We can focus on the most likely exploitable problems and see if an actual attacker could take advantage of them, getting a better feel for the actual risks we face (much more so than is possible with a configuration review). With a better feel for actual risks, management personnel can make better decisions about where to allocate security resources to fix problems. Furthermore, because the goal of many penetration tests and ethical hacking exercises is actual compromise of target machines, they often go deeper than most audits. Penetration tests and ethical hacking engagements also sometimes find subtle flaws that other methods cannot easily discern. Also, penetration tests and ethical hacking projects have a different impact on the time resources of the target organization. Although initial scoping and periodic debriefs are required for penetration testing, such activities are usually less time consuming for target environment operations personnel than configuration reviews, architecture reviews, detailed interviews, and audits. 9
10 Addressing Discovered Vulnerabilities Not all discovered vulnerabilities will be fixed We strongly recommend addressing all high-risk vulnerabilities However, information security is ultimately about managing risk Organizations may decide, for business purposes, to accept a risk rather than mitigate it That s why we need to present our findings in business terms in a report Explain risk to the business why is this really an issue? Network Pen Testing & Ethical Hacking , Ed Skoudis 10 A major goal of penetration testing and ethical hacking is discovering flaws so that they can be remediated (by applying patches, reconfiguring systems, altering the architecture, changing processes, etc.). However, it is important to note that in most tests, not all of the discovered vulnerabilities are actually addressed. We recommend that all high-risk vulnerabilities be addressed in a timely fashion, but the truth is that some vulnerabilities linger long after a test is complete, even high-risk issues. Remember, information security is all about managing risk, not eliminating it. Decision makers in an organization may conclude that, for business purposes, they will accept a given risk identified during a test, rather than mitigate the associated vulnerability. In the end, it s a business decision, informed by our input. For this reason, we have to present our findings in both business and technical terms. That s an important principle to remember throughout your career in penetration testing. 10
11 Outline Why Penetration Testing? Windows Command Line Tips for Pen Testers Conclusions Q&A Network Pen Testing & Ethical Hacking , Ed Skoudis 11 Now, let s jump into the technical section of the webcast, analyzing how penetration testers and ethical hackers can use the Windows command line and built-in Windows tools to improve their testing regimens. 11
12 Windows Command-Line Tips For Penetration Testers Command-line skills are very helpful for penetration testers Hit one target, get shell access, then use it to access another Often we can t install tools on a given conquered machine Thus, we ll focus on maximizing use of built-in command-line tools Given the dominance of Windows targets, we will spend some time further developing our Windows command-line skills Analyze Attacker cmd.exe access Conquered Target scan analyze exploit Next Target You may be familiar with the SANS full-day course on the Windows command line or the section of SANS 504 For this webcast, we will have a different focus: Windows command line tips for penetration testers and ethical hackers Network Pen Testing & Ethical Hacking , Ed Skoudis 12 Often, during a penetration test or ethical hacking exercise, a tester gains commandshell access to a given target machine. With access to this target, the tester can conduct detailed analysis of this conquered machine, as well as locate and attack other systems (provided that the Rules of Engagement allow for such follow-on exploration). But, with just command shell access, the attacker requires solid command line skills to be able to maximize the usefulness of this conquered target. Given the dominance of Windows from a marketshare and exploitable target perspective, we will now spend time analyzing various Windows command-line tools and techniques to see how they can be used by penetration testers and ethical hackers in their work. Many people dismiss the Windows command line (cmd.exe), thinking that it isn t a powerful-enough shell. However, it has some very useful capabilities, ones that can serve penetration testers and ethical hackers very well in their projects. Let s explore these capabilities in more detail and see how we can use them in our work. You may be familiar with other Windows command line classes offered by the SANS Institute, including SANS Security 531, Windows Command-Line Kung Fu for InfoSec Pros, as well as the Windows command-line section of SANS Security 504, Hacker Techniques, Exploits, and Incident Handling. This current section of this webcast is actually quite different from those other courses. They focus on Windows command-line skills for general security personnel and incident handlers. Our focus in this section will be specifically on Windows command line tips for penetration testers. 12
13 Analyzing a System: Finding Other Machines With a useful option of ipconfig, we can find other systems that the conquered target has recently resolved using DNS: C:\> ipconfig /displaydns Using the arp command, we can find other systems on the same subnet with which a given machine has recently communicated: C:\> arp a Because they are on the same subnet, there is a higher chance that they are within the project scope, but we always need to check Network Pen Testing & Ethical Hacking , Ed Skoudis 13 Hard-coded entries in the hosts file (%systemroot%\system32\drivers\etc\hosts) can be helpful in finding other machines, if the administrators of the system we ve compromised have entered anything in the hosts file. But, there are other (and arguably better) ways to learn about target machines from a given conquered machines using command-line tools. We could dump the DNS cache of a modern Windows machine using the ipconfig command as follows: C:\> ipconfig /displaydns The results will show us other machine names and IP address with which the given machine has likely communicated recently, possibly indicating other targets for us to pursue (if they are within the scope of the project). In the output of this command, we can see the remaining time-to-live (in seconds) of each domain name to IP address mapping that the system has cached. If we know the original TTL (which we can get by resolving the name off of an authoritative name server for that domain), we can get a feel for how fresh the record is in the cache of the target. Furthermore, we can dump the ARP cache of a Windows machine using this command: C:\> arp a This output will show us the IP address to MAC address mappings of machines on the same subnet as the given conquered machine, giving us a sense of nearby systems with which the target has recently communicated. Given their nearness on the same subnet, these machines may be related to the given target and are more likely to be included in the project s scope than the machines identified through the ipconfig /displaydns output. 13
14 Setting Up SMB Sessions Set up a session with a target: C:\> net use \\[targetip] [password] /u:[user] If you don t provide a password, it will prompt you for it Mount a share on a target: C:\> net use * \\[targetip]\[share] [password] /u:[user] Attaches to the next available file share, such as z: Some versions of Windows require specifying the machine name before the user: /u:[machinename]\[user] Network Pen Testing & Ethical Hacking , Ed Skoudis 14 A Server Message Block (SMB) session with a target machine allows us to access remote file and print sharing, remote registry keys, remote scheduling of jobs, and a variety of other useful functions Microsoft carries over those incredibly useful NetBIOS over TCP ports and the SMB port TCP 445. We can set up sessions with a remote system using the net use command, as follows: C:\> net use \\[targetip] [password] /u:[user] We will see Command completed successfully if such remote sessions are allowed. If you don t provide a password in your command, the system will prompt you for it on the next line. This command will make our machine access the first available share on the remote system, such as the IPC$ default administrative share. But, such shares typically don t include data for us to access in the target s file system. To get access to those, we could mount the target machine s file system. To access a given share on the target, we could use: C:\> net use * \\[targetip]\[share] [password] /u:[user] The * indicates that we want the remote share attached to an available file system drive letter on our own machine, such as z: or f:. We could specify a letter here, but if it is already in use, the command will fail. To mount the C:\ share on a target machine, we could run: C:\> net use * \\[targetip]\c$ [password] /u:[user] Some versions of Windows require us to specify a machine name before that user name. Thus, we d augment the command by replacing /u:[user] with /u:[machinename]\[user]. 14
15 Dropping SMB Sessions Windows machines allow a user to have one SMB session with a given target machine as one username at a time only If you try multiple sessions with different usernames simultaneously, you get an error message To avoid this, drop your session as one user first C:\> net use \\[targetip] /del To drop all SMB sessions: C:\> net use * /del Enter Y to continue Network Pen Testing & Ethical Hacking , Ed Skoudis 15 SMB connections between Windows machines have an important limitation to keep in mind. If there is a connection from one machine to another with a given user account, you cannot open another SMB session to that same target machine as a different user. If you try, you get an error message, saying that Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. This problem manifests itself when you have a connection (such as a mounted share) to a target as one user, and then try to open another session with a different username on the same target. Penetration testers and ethical hackers often do this, as they try to move between different accounts with different access privileges on a target machine. To sidestep this problem, you should drop a session as one user before trying to connect as another user. To drop a single session, you could use this command: C:\> net use \\[targetip] /del If you want to drop all SMB sessions for your current user, you could run: C:\> net use * /del You will be prompted to verify that you are dropping all sessions. Hit Y and Enter to make them all go away. 15
16 FOR Loops Iteration can be very helpful We re not expecting you to be programmers But, as a tester, sometimes you ll want to iterate over a given set of items Numbers Lines in a file The Windows command line supports several kinds of FOR loops We ll go over the most useful for pen testers FOR /L: Counter FOR /F: Iterate over file contents, strings, or command output Network Pen Testing & Ethical Hacking , Ed Skoudis 16 This is not a webcast on programming or scripting. We re not expecting you to be programmers. For those of you who are, you are likely getting ideas for automating various aspects of the concepts we ve covered in the course so far. For those who aren t programmers, don t worry. That said, as a penetration tester or ethical hacker, sometimes iterating a command a large number of times over a set of entities such as lines in a file or numbers is very helpful in scanning and exploitation. We can do that at the Windows command line by composing FOR loops. Windows supports numerous different kinds of FOR loops, but we ll look at two of the most common and powerful, those that are most likely to be used by a penetration tester or ethical hacker. FOR /L loops can be used as counters, starting at a given number, and incrementing by a given step, counting to another number. These simple loops can be immensely helpful in doing a given action repeatedly for a fixed number of times, or iterating through a series of numbers (like network addresses). FOR /F loops are far more sophisticated, offering options for iterating over a set of files, the contents of files, or the output of a command. 16
17 FOR /L Loops FOR /L loops are counters: C:\> for /L %i in ([start],[step],[stop]) do [command] Let s make a loop that will run forever: C:\> for /L %i in (1,0,2) do echo Hello Let s make a simple counter: C:\> for /L %i in (1,1,255) do echo %i Network Pen Testing & Ethical Hacking , Ed Skoudis 17 We can use FOR /L loops to create counters as follows: C:\> for /L %i in ([start],[step],[stop]) do [command] The %i is the variable we want to use as our incrementer. We could use any single letter name, but %i is a common convention. We can refer to the %i in the [command], and it will be replaced with the current value through the loop, starting at the [start] value, changing by [step] at each cycle through the loop, and going up to [stop] value. The [command] runs once each time through the loop. Note that the [start], [step], and [stop] values should be all integers. If they aren t, Windows will truncate any decimal places, forcing them to behave as integers. Thus, the %i will always take the value of an integer in a FOR /L loop. Let s look at some examples. To implement a loop that runs forever (until a CTRL- C), printing Hello on the screen repeatedly, we could run: C:\> for /L %i in (1,0,2) do echo Hello This will run forever because it starts counting at 1 and counts in steps of zero until it reaches 2 (which should never happen). It s the equivalent of a Unix or Linux while [ true ] loop. To make a simple counter that goes from 1 to 255 in steps of 1, we could run: C:\> for /L %i in (1,1,255) do echo %i Note that we are counting from 1 to 255. Do those numbers sound familiar? Soon, we ll use this to iterate through network addresses. 17
18 Pausing in Loops and Turning Off Command Echo Let s pause for 5 seconds between each iteration: C:\> for /L %i in (1,1,255) do echo %i & ping n Run multiple commands: [command1] & [command2] Run command1, and only run command2 if command1 succeeds without error: [command1] && [command2] We usually don t want our command(s) displayed each time through the loop Prepend command to turn off echoing of command C:\> for /L %i in (1,1,255) %i n Network Pen Testing & Ethical Hacking , Ed Skoudis 18 Sometimes, we don t want a loop to go as fast as possible. We want to pause it for N seconds before proceeding to the next cycle. We can do this by having our do clause run multiple commands, separated by an &, with one of the commands pinging localhost ( ) N times. Because ping sends one ping per second, this will result in an N second delay. C:\> for /L %i in (1,1,255) do echo %i & ping n Note that [command1] & [command2] will run command1 followed by command2. Alternatively, we could do [command1] && [command2]. With the &&, command2 will only be executed if command1 ran successfully. Otherwise command 2 will be ignored. While that s nice, its output is horribly ugly. Note that it is cluttered with several things. First, there are the echo and ping commands themselves, displayed at each iteration through the loop. We can turn off this echoing of the commands by prepending each command with as follows: C:\> for /L %i in (1,1,255) %i n That looks a little better, but we still have more to clean up in the output. 18
19 Handling Output We often want some output to be thrown away Redirect it to nul: > nul C:\> for /L %i in (1,1,255) %i n > nul We often want standard error to go away: Redirect it to nul: [command] 2>nul Or, to save error messages, append them to a file: [command] 2>>errorfile.txt We often want to select output lines with a given string in them Pipe output through find "[string]" The find command is case sensitive use find /i to make it case insensitive Network Pen Testing & Ethical Hacking , Ed Skoudis 19 To finish cleaning up our output, we can redirect unwanted standard output to nul, a file descriptor that will just drop anything sent to it. Thus, we can get rid of that ugly ping output and have our 5-second delayed counter with: C:\> for /L %i in (1,1,255) %i n > nul Sometimes, unwanted cruft that is displayed on the screen doesn t come from Standard Output of a command, but instead comes from Standard Error. We can get access to Standard Error using a file descriptor handle of 2, which is synonymous with Standard Error, taking a command and directing its output to nul. So, if there were an error thrown by the command, we could do this to throw the error away: [command] 2>nul If we want to save the error messages, but not have them clutter our output, we can append them to a file with: [command] 2>>errorfile.txt And now for one of the most useful aspects of all output filtering. We often want to screen our output to only display lines with a given string in them, possibly indicating that success occurred or some other situation. We can pipe the output of our command through the find command looking for a specific string, indicated within "", as in find "[string]". 19
20 A More Practical Example: FOR /L Ping Sweep How can we do a ping sweep of network range Run a ping of a machine we know is there and one that isn t there, so we can see how to differentiate our responses for the find string Then, we could use: C:\> for /L %i in (1,1,255) n %i find Reply Network Pen Testing & Ethical Hacking , Ed Skoudis 20 Let s do a more practical example for penetration testers and ethical hackers. Suppose you ve gained command shell access to one system on a DMZ via an exploit. Your Rules of Engagement allow you to scan for other targets, but they do not let you install any software on the machine you ve just conquered. You can do a ping sweep with a FOR /L loop. To see how to construct such a loop, it is helpful to run the command we want to embed in the loop in the lab against one target and see what defining string in its output interests us, so we can look for that string with the find command. If we ping a target machine successfully, our output will include the word Reply. If the ping doesn t get a response, the output will not include Reply. Thus, we can perform a ping sweep with this command: C:\> for /L %i in (1,1,255) n %i find Reply This command will create a counting loop (FOR /L) with a variable of %i, starting at 1, counting by 1, going up through 255. At each iteration of the command, it will run a ping without displaying the command (@), sending 1 (-n 1) ICMP echo request message to %i, and scraping the results through find looking for the word Reply because that indicates that a machine has responded to our ping. Admittedly, this isn t the fastest ping sweeper in the world, checking one address per second. However, it s made from entirely built-in tools in the Windows command line, and is easy to type quickly and understand. If you want it to print the current address it is checking, you could %i & before 20
21 Another Practical Example: Iterating Through Reverse DNS Lookups Let s write a FOR loop that will do a reverse DNS lookup of each IP address in the range Note that nslookup [IPaddr] performs a reverse lookup We want to display each IP address tried, as well as the name of those that successfully resolve With this approach, we can get very useful info even if zone transfers are blocked PTR ? PTR ? PTR ? DNS Server Network Pen Testing & Ethical Hacking , Ed Skoudis 21 Next, let s use the concepts we ve covered to compose a single Windows command that consists of a FOR loop that will perform a reverse DNS lookup of each IP address in the address range of That way, we can iterate through a network range, lookup up IP address after IP address, and find those addresses that are associated with names. Each valid reverse record likely indicates a potential target for our test. Our output will include each IP address that the command tries, and the name of the target machine for which the DNS server has a record. Let s suppose that our DNS server has an IP address of which we will query. Recall that the Windows command nslookup [IPaddr] will perform a DNS reverse lookup using the DNS server the machine is configured for. With a command like this, even without a zone transfer, you can get a feel for which addresses are in use, based on the fact that they have a reverse record in DNS. 21
22 Reverse DNS Lookup Command To display all numbers and those that resolve successfully: C:\> for /L %i in (1,1,255) %i: %i 2>nul find "Name" Network Pen Testing & Ethical Hacking , Ed Skoudis 22 Here is one way to conduct the reverse lookups. Note that you may come up with other ways of doing it. If so, that s fine, so long as your answer works. The command that we formulated is as follows: C:\> for /L %i in (1,1,255) %i: %i 2>nul find "Name" This command starts a FOR /L counting loop at 1, counts by 1, and proceeds through 255, using %i as the variable. At each iteration through the loop, it echoes the IP address that it is trying followed by a colon, without displaying the echo command (@echo %i:). Then, it performs a reverse lookup of each IP address using nslookup, again without displaying the nslookup command (@nslookup %i). If nslookup can t find a name, it displays a message of *** [server] can t find We want to get rid of that Standard Error, so we redirect it to nul (2>nul). We search the output of the nslookup command with the find command, looking for the string Name because successfully searched names will include this string. 22
23 Another Reverse DNS Lookup Command We can clean up the output a bit, displaying only numbers and names that resolve successfully: C:\> for /L %i in (1,1,255) %i 2>nul find "Name" && echo %i Network Pen Testing & Ethical Hacking , Ed Skoudis 23 We could go a little further, cleaning up our command even more relying on the difference in behavior of & and && as command separators. If we only wanted to display the IP address when we successfully resolve a name, we could run: C:\> for /L %i in (1,1,255) %i 2>nul find "Name" && echo %i Now, the IP address will only be displayed if nslookup succeeds in finding a name with its reverse lookup. It s a little more complicated, but has a lot cleaner output. 23
24 Flexibility: FOR /F loops Instead of iterating over integers, sometimes we need something more flexible FOR /F loops let us iterate over other things: C:\> for /F ["options"] %i in ([stuff]) do [command] It s the [stuff] that makes things interesting: Can be the contents of a file set: for /F ["options"] %i in (file-set) do [command] Can be a string: for /F ["options"] %i in ("string") do [command] Can be a command: for /F ["options"] %i in ('command') do [command] Network Pen Testing & Ethical Hacking , Ed Skoudis 24 While iterating over a set of integers by stepping through them is certainly useful, sometimes we need more flexibility. Wouldn t it be nice if we had a FOR loop that could iterate over the contents of a file, the words in a string, or the output of a command? Windows supports another kind of FOR loop with just those capabilities: FOR /F. The syntax of this command is: C:\> for /F ["options"] %i in ([stuff]) do [command] We ll get to the options in a minute, but let s focus on the stuff that we ll iterate through. FOR /F gives us the ability to go through a file-set s contents by simply specifying a file-set as our stuff. We could have one line per file, with something interesting, like usernames or passwords, and then perform a command using each line in the file as the value of a variable. Or, we could jump through a string, with each word in the string being a value we iterate through our loop. To specify a string as your stuff, surround it in double quotes, as in "string". The most powerful option for our stuff, though, is to make it a command. FOR /F will then iterate on the output of that command. To make your stuff a command, you d put single quotes around the command, as in 'command'. We can then scrape through the output of our command and run another command in our do clause on each line or item in the first command s output. 24
25 FOR /F Loop Options The options let us parse through the file, string, or command output For this webcast, we won t use the options, because we ll either create files in the format we want, or use files already in that format No special parsing necessary Default parsing on space and carriage return is just fine for us now Still, for completeness, the options include: eol=[c]: Sets the end of line character skip=[n]: Skip these lines from the output delims=[xxx]: Specifies a delimiter set (default delimiters are spaces and tabs) tokens=[x,y,m-n]: Specifies which element of the output will be passed to the do part for iteration; can be a list or range if multiple values set, variables beyond %i are automatically allocated usebackq: For the command, use ` instead of Wow that s kinda ugly Yeah, but it s powerful Network Pen Testing & Ethical Hacking , Ed Skoudis 25 Now, let s look at the not-small point of the options available in a FOR /F loop. These options, which must be surrounded by double quotation marks, let us specify how we are going to parse the output of the file set, string, or command output of the in clause. For this class, we won t be parsing files, because we ll either create them ourselves in the format we want, or use files that already have the format we desire. Still, for completeness, we do need to discuss the formatting options of FOR /F loops. We could specify a custom end of line character with the syntax eol=[c]. By default, the end of line is just a standard Windows end of line carriage return (hex 0x0d0a). With the syntax skip=[n], we jump forward in the sequence n lines into a file. This lets us jump past some header information or other cruft, focusing on the n+1(th) line. The delims syntax is very helpful if our file, string, or command output has a specific set of delimiters that break its output up into pieces that we are interested in. By default, the delims that are observed are space and tab. If we have comma- and semicolon-delimited output, we would say, delims=,;. The tokens syntax also gets interesting, because they help us parse our output into useful fields. If we have multiple different items per line in the output that we are interested in, and to which we want different variables assigned, we define tokens. The output will be tokenized according to the numbers we put in this options declaration. For example, if we know there are two items on every line of output, we d define tokens=[1,2]. The first value in each line will be assigned to our variable (such as %i). Then, because there is a second token, another variable will be automatically allocated, one letter higher than the first (%j, for example). We can even do ranges of tokens, such as tokens= 2-4, which will skip the first item in each line of output, and assign the second, third, and fourth items to %i, %j, and %k. And, finally, remember how our command in the in clause starts and ends with a single quote? But, if you need a single quote inside of your command itself, you can specific usebackq in your option, which lets you use a ` to set off your command. The ` on most systems is an unshifted tilde key. Now, this may look hideously ugly. That s because it is. However, it is powerful. Again, for this class, we will not need to parse files because we ll use files already in the format we need. Thus, we won t use these options for this class. 25
26 Password Guessing with FOR /F Suppose we know a user name for an account on a target Windows machine, which we can access via SMB Suppose also that we have a wordlist with potential passwords, like John the Ripper s password.lst Suppose also that we don t care about account lockout, so we d like to perform password guessing We can use a FOR /F loop to perform password guessing via SMB with: C:\> for /f %i in (password.lst) %i use \\[target_ip_addr] %i /u:[username] 2>nul && pause Instead of pause, we could append our results to a file with: && echo UserName: %i >> success.txt Network Pen Testing & Ethical Hacking , Ed Skoudis 26 These FOR /F loops can be quite helpful for penetration testers. Consider this scenario. Suppose we have a user name for an account on a target machine. We also have a wordlist file that includes one potential password per line of the file. The John the Ripper password.lst file will suit us fine. Suppose also that we don t care about account lockout. Perhaps the target machine isn t configured to lockout accounts, or the account is in the administrator s group, so we are less concerned about lockout. We ll discuss account lockout on Windows and Linux/Unix machines in more detail in We can use a FOR /F loop to automate password guessing against the target machine with this command: C:\> for /f %i in (password.lst) %i use \\[target_ip_addr] %i /u:[username] 2>nul && pause This command starts a FOR /F loop, using %i as its iterator variable. It will work its way through the password.lst file (in the current directory), taking each line from the file and using it as a value for %i. At each step through the loop, we have the command print out its password guess without displaying the echo command (@echo %i). We then (&) have it try to make an SMB connection with the target machine, using the password guess from the file and the username we supply (@net use \\[target_ip_addr] %i /u:[username]). We direct the numerous error messages from the net use failures to nul. Only if the net use command succeeds (&&), we will pause the FOR loop, prompting the user to hit enter to continue. That will stop our progress when we successfully guess the password. Alternatively, we could have written our results to a file with the syntax && echo UserName: %i >> success.txt. 26
27 More Flexibility: User Name and Password Guessing Suppose we have several users and many potential passwords We want to guess each password for each user We could start by using echo [data] >> [file], to create two files line by line, user.txt and pass.txt We could then use a FOR /F loop for passwords, embedded in a FOR /F loop for users We ll need two different variables for them, like %i and %j We ll use net use to try to set up an SMB session If the session set-up is successful, we ll use net use [stuff] /del to drop it Let s append the successful results to a file called success.txt Network Pen Testing & Ethical Hacking , Ed Skoudis 27 The previous command is helpful for guessing a variety of passwords for one account, but suppose we want more flexibility, creating a command that will guess usernames and passwords. In particular, suppose that we have created files on the target machine, one of which contains userids (user.txt) and the other passwords (pass.txt). A penetration tester could move these files to the machine to use for password guessing via some file transfer mechanism (FTP, TFTP, HTTP, etc.). Alternatively, the tester could create those files at a command prompt by building them line by line using the echo command, appending (>>) its output to the file, as in: C:\> echo password1 >> pass.txt C:\> echo password2 >> pass.txt And so on, creating pass.txt and user.txt. What we d like to do is to try every password in pass.txt for each user in user.txt, iterating through all of the passwords for each user. We could accomplish this using two FOR /F loops, one embedded within the other. The outer FOR /F loop will cycle through user names, while the inner loop tries each password, using net use to set up an SMB connection. If a connection is made successfully, we can tear it down with net use [stuff] /del. And, we ll store our results for successfully guessed userid and password pairs in a file called success.txt. 27
28 The User and Password Guesser C:\> for /f %i in (user.txt) /f %j in (pass.txt) %i:%j use \\ %j /u:%i 2>nul && echo %i:%j >> success.txt && net use \\ /del) ted:password? ted:joshua? ted:stuff? Network Pen Testing & Ethical Hacking , Ed Skoudis 28 There are many ways to solve the username and password guessing loop challenge. One command that does is: C:\> for /f %i in (user.txt) /f %j in (pass.txt) %i:%j use \\ %j /u:%i 2>nul && echo %i:%j >> success.txt && net use \\ /del) It s not pretty, but it does indeed have the desired functionality. Also, remember that this command is using entirely built-in tools on stock Windows machines, not requiring us to install any software whatsoever on the attacking machine, making it ideal to use on a newly conquered system to perform password guessing attacks against other machines. Let s review the components of this command. We start with a FOR /F loop, using a variable of %i that will take on the values of each line in user.txt. For each line in that file, we do the following. We turn off echo (@) and run another, embedded FOR /F loop. This one iterates with a variable of %j, which will take on the value of each line in pass.txt. For each line in that file, it will print on the screen the username and password that it is guessing, separated by a colon (@echo %i:%j). It will then try to make an SMB connection with the target with this username and password combo (@net use \\ %j /u:%i), sending the error messages off to the big bit bucket in the sky (2>nul). Then, if the net use command is successful (&&), it stores the username:password combo by appending it to the file success.txt (echo %i:%j >> success.txt). It then drops the session (&& net use \\ /del). Note that we ve enclosed our internal/embedded FOR /F loop in an extra set of parentheses () to make clearer that certain items are grouped together. However, they are not required for this command to work successfully. One limitation of this command is that it continues guessing passwords for a given username even after it has successfully guessed the password for that account. 28
29 Converting Commands into Scripts Believe it or not, this was not a scripting webcast Still, as a penetration tester or ethical hacker, sometimes you ll need to bundle a series of commands into a script On Windows, you can put any of the commands we ve covered here into a.bat file to create a script Use echo [line] >> to build script line by line Simply convert any variables in FOR loops from %[var] into %%[var] Network Pen Testing & Ethical Hacking , Ed Skoudis 29 Let s re-iterate: this is not a scripting session. That said, however, as a penetration tester or ethical hacker, sometimes you will want to bundle a series of commands together to execute them as a bundle. That bundle is a script. You can take any grouping of the commands we ve covered so far and put them in a Windows bat file (with a.bat suffix) to create a script. You could use the echo command to build a script line by line by running the following command several times, varying the [line] each time you run it: C:\> echo [line] >> file.bat Each of the commands we ve covered will work as is in a batch file, with one exception. The FOR loop variables must be changed from %[var] to %%[var] to make it work in a batch file. Place two percentage signs in front of each variable name. For example, a counter from one to one hundred at the command line would be: C:\> for /L %i in (1,1,100) %i To use this command in a script, you d run: for /L %%i in (1,1,100) %%i 29
30 Outline Why Penetration Testing? Windows Command Line Tips for Pen Testers Conclusions Q&A Network Pen Testing & Ethical Hacking , Ed Skoudis 30 And now, let s conclude. 30
31 Conclusions Penetration testing and ethical hacking provide valuable insights to an organization s security stance Especially when integrated into a comprehensive enterprise security program Windows command line skills really help penetration testers maximize the value of the access they get to target machines, using only built-in tools Network Pen Testing & Ethical Hacking , Ed Skoudis 31 As we have seen, penetration testing can provide real value to an organization, helping to illuminate security flaws and prioritize resources for addressing those flaws. Penetration testing becomes especially valuable when it is integrated into an overall enterprise security program. We ve also looked at how the Windows command line can be useful to penetration testers in getting more information about a target environment, scanning for other targets, and possibly even attacking them with password guessing. All of this can be accomplished using only built-in tools on Windows. 31
32 Follow-Up SANS is offering a brand-new course SANS Security 560: Network Penetration Testing and Ethical Hacking 20% discount if you registered for this webcast [email protected] for discount code When is the course being offered? March 26-31, Tysons Corner, VA: SOLD OUT April 18-23, Orlando, FL: SOLD OUT May 11-16, San Diego, CA: Strand PEN TEST SUMMIT: June 2-3, Las Vegas, NV June 4-9, Las Vegas, NV: Skoudis July 24-29, Wash DC: Skoudis Go to and look for 560 for details Network Pen Testing & Ethical Hacking , Ed Skoudis 32 As we mentioned at the outset of this webcast, SANS is offering a new course that covers the techniques we discussed in this session, plus numerous others, all in a six-day session. If you registered for this webcast, you can receive a 20% discount on the registration fees for the new course. Simply send to [email protected] asking about the SANS 560 discount code for attending the CORE webcast. The course will be offered several times in coming months, according to the schedule on the slide. If you d like more details about the course, simply access and search for
33 Outline Why Penetration Testing? Windows Command Line Tips for Pen Testers Conclusions Q&A REMEMBER: The second webcast in this series of three will be on May 20, 2008 Network Pen Testing & Ethical Hacking , Ed Skoudis 33 Now, let s open up the session for questions and answers. Please send questions via the address provided via the webcast audio. Also, please note that this webcast is the first in a series of three sessions by Ed Skoudis. The next webcast will cover additional penetration testing topics, and is scheduled for May 20, We hope you ll join us then! 33
Penetration Testing Ninjitsu 2: Crouching Netcat, Hidden Vulnerabilities. By Ed Skoudis
Penetration Testing Ninjitsu 2: Crouching Netcat, Hidden Vulnerabilities By Ed Skoudis Copyright 2008, SANS Version 2Q08 Network Pen Testing & Ethical Hacking - 2008, Ed Skoudis 1 This Webcast and the
Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs
Overview of Network Security The need for network security Desirable security properties Common vulnerabilities Security policy designs Why Network Security? Keep the bad guys out. (1) Closed networks
Project 2: Penetration Testing (Phase II)
Project 2: Penetration Testing (Phase II) CS 161 - Joseph/Tygar November 17, 2006 1 Edits If we need to make clarifications or corrections to this document after distributing it, we will post a new version
ITEC441- IS Security. Chapter 15 Performing a Penetration Test
1 ITEC441- IS Security Chapter 15 Performing a Penetration Test The PenTest A penetration test (pentest) simulates methods that intruders use to gain unauthorized access to an organization s network and
How We're Getting Creamed
ed Attacks How We're Getting Creamed By Ed Skoudis June 9, 2011 ed Attacks - 2011 Ed Skoudis 1 $ cut -f5 -d: /etc/passwd grep -i skoudis Ed Skoudis Started infosec career at Bellcore in 1996 working for
Network Traffic Analysis
2013 Network Traffic Analysis Gerben Kleijn and Terence Nicholls 6/21/2013 Contents Introduction... 3 Lab 1 - Installing the Operating System (OS)... 3 Lab 2 Working with TCPDump... 4 Lab 3 - Installing
Creating a remote command shell using default windows command line tools
Creating a remote command shell using default windows command line tools Kevin Bong July 2008 GIAC GSE, GCIH, GCIA, GCFW, GCFA, GAWN, GSEC 1 The Goal Provide the functionality of a remote command shell
Foundstone ERS remediation System
Expediting Incident Response with Foundstone ERS Foundstone Inc. August, 2003 Enterprise Risk Solutions Platform Supports Successful Response and Remediation Introduction The Foundstone Enterprise Risk
NETWORK PENETRATION TESTING
Tim West Consulting 6807 Wicklow St. Arlington, TX 76002 817-228-3420 [email protected] OVERVIEW Tim West Consulting Tim West Consulting is a full service IT security and support firm that specializes
Andreas Dittrich, Philipp Reinecke Testing of Network and System Security. example.
Testing of Network and System Security 1 Testing of Network and System Security Introduction The term security when applied to computer networks conveys a plethora of meanings, ranging from network security
Managing Vulnerabilities for PCI Compliance White Paper. Christopher S. Harper Managing Director, Agio Security Services
Managing Vulnerabilities for PCI Compliance White Paper Christopher S. Harper Managing Director, Agio Security Services PCI STRATEGY Settling on a PCI vulnerability management strategy is sometimes a difficult
SY0-201. system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users.
system so that an unauthorized individual can take over an authorized session, or to disrupt service to authorized users. From a high-level standpoint, attacks on computer systems and networks can be grouped
Host Discovery with nmap
Host Discovery with nmap By: Mark Wolfgang [email protected] November 2002 Table of Contents Host Discovery with nmap... 1 1. Introduction... 3 1.1 What is Host Discovery?... 4 2. Exploring nmap s Default
Learn Ethical Hacking, Become a Pentester
Learn Ethical Hacking, Become a Pentester Course Syllabus & Certification Program DOCUMENT CLASSIFICATION: PUBLIC Copyrighted Material No part of this publication, in whole or in part, may be reproduced,
How To Test For Security On A Network Without Being Hacked
A Simple Guide to Successful Penetration Testing Table of Contents Penetration Testing, Simplified. Scanning is Not Testing. Test Well. Test Often. Pen Test to Avoid a Mess. Six-phase Methodology. A Few
Project 2: Firewall Design (Phase I)
Project 2: Firewall Design (Phase I) CS 161 - Joseph/Tygar November 12, 2006 1 Edits If we need to make clarifications or corrections to this document after distributing it, we will post a new version
PENETRATION TESTING GUIDE. www.tbgsecurity.com 1
PENETRATION TESTING GUIDE www.tbgsecurity.com 1 Table of Contents What is a... 3 What is the difference between Ethical Hacking and other types of hackers and testing I ve heard about?... 3 How does a
Penetration Testing Walkthrough
Penetration Testing Walkthrough Table of Contents Penetration Testing Walkthrough... 3 Practical Walkthrough of Phases 2-5... 4 Chose Tool BackTrack (Armitage)... 5 Choose Target... 6 Phase 2 - Basic Scan...
Wireshark DNS. Introduction. nslookup
Wireshark DNS Introduction The Domain Name System (DNS) translates hostnames to IP addresses, fulfilling a critical role in the Internet infrastructure. In this lab, we ll take a closer look at the client
RemotelyAnywhere. Security Considerations
RemotelyAnywhere Security Considerations Table of Contents Introduction... 3 Microsoft Windows... 3 Default Configuration... 3 Unused Services... 3 Incoming Connections... 4 Default Port Numbers... 4 IP
The Trivial Cisco IP Phones Compromise
Security analysis of the implications of deploying Cisco Systems SIP-based IP Phones model 7960 Ofir Arkin Founder The Sys-Security Group [email protected] http://www.sys-security.com September 2002
1 hours, 30 minutes, 38 seconds Heavy scan. All scanned network resources. Copyright 2001, FTP access obtained
home Network Vulnerabilities Detail Report Grouped by Vulnerability Report Generated by: Symantec NetRecon 3.5 Licensed to: X Serial Number: 0182037567 Machine Scanned from: ZEUS (192.168.1.100) Scan Date:
LAB THREE STATIC ROUTING
LAB THREE STATIC ROUTING In this lab you will work with four different network topologies. The topology for Parts 1-4 is shown in Figure 3.1. These parts address router configuration on Linux PCs and a
A Decision Maker s Guide to Securing an IT Infrastructure
A Decision Maker s Guide to Securing an IT Infrastructure A Rackspace White Paper Spring 2010 Summary With so many malicious attacks taking place now, securing an IT infrastructure is vital. The purpose
The Nexpose Expert System
Technical Paper The Nexpose Expert System Using an Expert System for Deeper Vulnerability Scanning Executive Summary This paper explains how Rapid7 Nexpose uses an expert system to achieve better results
ETHICAL HACKING 010101010101APPLICATIO 00100101010WIRELESS110 00NETWORK1100011000 101001010101011APPLICATION0 1100011010MOBILE0001010 10101MOBILE0001
001011 1100010110 0010110001 010110001 0110001011000 011000101100 010101010101APPLICATIO 0 010WIRELESS110001 10100MOBILE00010100111010 0010NETW110001100001 10101APPLICATION00010 00100101010WIRELESS110
EXTRA. Vulnerability scanners are indispensable both VULNERABILITY SCANNER
Vulnerability scanners are indispensable both for vulnerability assessments and penetration tests. One of the first things a tester does when faced with a network is fire up a network scanner or even several
An Introduction to Network Vulnerability Testing
CONTENTS Introduction 3 Penetration Testing Overview 4 Step 1: Defining the Scope 4 Step 2: Performing the Penetration Test 5 Step 3: Reporting and Delivering Results 6 VeriSign SecureTEST 7 Common Vulnerability
co Characterizing and Tracing Packet Floods Using Cisco R
co Characterizing and Tracing Packet Floods Using Cisco R Table of Contents Characterizing and Tracing Packet Floods Using Cisco Routers...1 Introduction...1 Before You Begin...1 Conventions...1 Prerequisites...1
Security perimeter white paper. Configuring a security perimeter around JEP(S) with IIS SMTP
Security perimeter white paper Configuring a security perimeter around JEP(S) with IIS SMTP Document control Document name: JEP(S) Security perimeter Author: Proxmea, Proxmea Last update: March 23, 2008
Network and Host-based Vulnerability Assessment
Network and Host-based Vulnerability Assessment A guide for information systems and network security professionals 6600 Peachtree-Dunwoody Road 300 Embassy Row Atlanta, GA 30348 Tel: 678.443.6000 Toll-free:
Application security testing: Protecting your application and data
E-Book Application security testing: Protecting your application and data Application security testing is critical in ensuring your data and application is safe from security attack. This ebook offers
Domain Requirements in Spectralink SIP Phones
Technical Bulletin CS-14-12 Domain Requirements in Spectralink SIP Phones This technical bulletin explains how to configure DNS domains to support Spectralink SIP Phones for failover and normal operation.
IS L06 Protect Servers and Defend Against APTs with Symantec Critical System Protection
IS L06 Protect Servers and Defend Against APTs with Symantec Critical System Protection Description Lab flow At the end of this lab, you should be able to Discover how to harness the power and capabilities
Port Scanning and Vulnerability Assessment. ECE4893 Internetwork Security Georgia Institute of Technology
Port Scanning and Vulnerability Assessment ECE4893 Internetwork Security Georgia Institute of Technology Agenda Reconnaissance Scanning Network Mapping OS detection Vulnerability assessment Reconnaissance
Integrated Network Vulnerability Scanning & Penetration Testing SAINTcorporation.com
SAINT Integrated Network Vulnerability Scanning and Penetration Testing www.saintcorporation.com Introduction While network vulnerability scanning is an important tool in proactive network security, penetration
Make a folder named Lab3. We will be using Unix redirection commands to create several output files in that folder.
CMSC 355 Lab 3 : Penetration Testing Tools Due: September 31, 2010 In the previous lab, we used some basic system administration tools to figure out which programs where running on a system and which files
Getting started with OWASP WebGoat 4.0 and SOAPUI.
Getting started with OWASP WebGoat 4.0 and SOAPUI. Hacking web services, an introduction. Version 1.0 by Philippe Bogaerts [email protected] www.radarhack.com Reviewed by Erwin Geirnaert
How To Set Up An Ip Firewall On Linux With Iptables (For Ubuntu) And Iptable (For Windows)
Security principles Firewalls and NAT These materials are licensed under the Creative Commons Attribution-Noncommercial 3.0 Unported license (http://creativecommons.org/licenses/by-nc/3.0/) Host vs Network
Vulnerability Assessment and Penetration Testing
Vulnerability Assessment and Penetration Testing Module 1: Vulnerability Assessment & Penetration Testing: Introduction 1.1 Brief Introduction of Linux 1.2 About Vulnerability Assessment and Penetration
Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant
Evading Infrastructure Security Mohamed Bedewi Penetration Testing Consultant What infrastructure security really means? Infrastructure Security is Making sure that your system services are always running
Lab 8.4.2 Configuring Access Policies and DMZ Settings
Lab 8.4.2 Configuring Access Policies and DMZ Settings Objectives Log in to a multi-function device and view security settings. Set up Internet access policies based on IP address and application. Set
1. LAB SNIFFING LAB ID: 10
H E R A LAB ID: 10 SNIFFING Sniffing in a switched network ARP Poisoning Analyzing a network traffic Extracting files from a network trace Stealing credentials Mapping/exploring network resources 1. LAB
What a Vulnerability Assessment Scanner Can t Tell You. Leveraging Network Context to Prioritize Remediation Efforts and Identify Options
White paper What a Vulnerability Assessment Scanner Can t Tell You Leveraging Network Context to Prioritize Remediation Efforts and Identify Options november 2011 WHITE PAPER RedSeal Networks, Inc. 3965
Deploy Remote Desktop Gateway on the AWS Cloud
Deploy Remote Desktop Gateway on the AWS Cloud Mike Pfeiffer April 2014 Last updated: May 2015 (revisions) Table of Contents Abstract... 3 Before You Get Started... 3 Three Ways to Use this Guide... 4
Secure Software Programming and Vulnerability Analysis
Secure Software Programming and Vulnerability Analysis Christopher Kruegel [email protected] http://www.auto.tuwien.ac.at/~chris Operations and Denial of Service Secure Software Programming 2 Overview
Ethical Hacking as a Professional Penetration Testing Technique
Ethical Hacking as a Professional Penetration Testing Technique Rochester ISSA Chapter Rochester OWASP Chapter - Durkee Consulting, Inc. [email protected] 2 Background Founder of Durkee Consulting since 1996
Network Detective. HIPAA Compliance Module. 2015 RapidFire Tools, Inc. All rights reserved V20150201
Network Detective 2015 RapidFire Tools, Inc. All rights reserved V20150201 Contents Purpose of this Guide... 3 About Network Detective... 3 Overview... 4 Creating a Site... 5 Starting a HIPAA Assessment...
How Your Current IT Security System Might Be Leaving You Exposed TAKEAWAYS CHALLENGES WHITE PAPER
WHITE PAPER CHALLENGES Protecting company systems and data from costly hacker intrusions Finding tools and training to affordably and effectively enhance IT security Building More Secure Companies (and
The Pen Test Perfect Storm: Combining Network, Web App, and Wireless Pen Test Techniques Part 2
The Test Perfect Storm: Combining Network, Web App, and Wireless Test Techniques Part 2 By Joshua Wright, Kevin Johnson, & Ed Skoudis Copyright 2009, All Rights Reserved Version 1Q09 1 Outline The Power
The Pen Test Perfect Storm: Combining Network, Web App, and Wireless Pen Test Techniques Part 2
The Test Perfect Storm: Combining Network, Web App, and Wireless Test Techniques Part 2 By Joshua Wright, Kevin Johnson, & Ed Skoudis Copyright 2009, All Rights Reserved Version 1Q09 Testing Perfect Storm
Penetration Testing with Kali Linux
Penetration Testing with Kali Linux PWK Copyright 2014 Offensive Security Ltd. All rights reserved. Page 1 of 11 All rights reserved to Offensive Security, 2014 No part of this publication, in whole or
WHITE PAPER. An Introduction to Network- Vulnerability Testing
An Introduction to Network- Vulnerability Testing C ONTENTS + Introduction 3 + Penetration-Testing Overview 3 Step 1: Defining the Scope 4 Step 2: Performing the Penetration Test 5 Step 3: Reporting and
Penetration Testing Report Client: Business Solutions June 15 th 2015
Penetration Testing Report Client: Business Solutions June 15 th 2015 Acumen Innovations 80 S.W 8 th St Suite 2000 Miami, FL 33130 United States of America Tel: 1-888-995-7803 Email: [email protected]
The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.
This sample report is published with prior consent of our client in view of the fact that the current release of this web application is three major releases ahead in its life cycle. Issues pointed out
Advanced Web Security, Lab
Advanced Web Security, Lab Web Server Security: Attacking and Defending November 13, 2013 Read this earlier than one day before the lab! Note that you will not have any internet access during the lab,
Exploiting Transparent User Identification Systems
Exploiting Transparent User Identification Systems Wayne Murphy Benjamin Burns Version 1.0a 1 CONTENTS 1.0 Introduction... 3 1.1 Project Objectives... 3 2.0 Brief Summary of Findings... 4 3.0 Background
Wireshark Lab: DNS v6.01
Wireshark Lab: DNS v6.01 Supplement to Computer Networking: A Top-Down Approach, 6 th ed., J.F. Kurose and K.W. Ross Tell me and I forget. Show me and I remember. Involve me and I understand. Chinese proverb
Architecture. The DMZ is a portion of a network that separates a purely internal network from an external network.
Architecture The policy discussed suggests that the network be partitioned into several parts with guards between the various parts to prevent information from leaking from one part to another. One part
Lab PC Network TCP/IP Configuration
Lab PC Network TCP/IP Configuration Objective Identify tools used to discover a computer network configuration with various operating systems. Gather information including connection, host name, Layer
REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB
REPORT ON AUDIT OF LOCAL AREA NETWORK OF C-STAR LAB Conducted: 29 th March 5 th April 2007 Prepared By: Pankaj Kohli (200607011) Chandan Kumar (200607003) Aamil Farooq (200505001) Network Audit Table of
Wireshark Lab: DNS. 1. nslookup
Wireshark Lab: DNS Version: 2.0 2007 J.F. Kurose, K.W. Ross. All Rights Reserved Computer Networking: A Topdown Approach, 4 th edition. As described in Section 2.5 of the textbook, the Domain Name System
NERC CIP Ports & Services. Part 2: Complying With NERC CIP Documentation Requirements
NERC CIP Ports & Services Part 2: Complying With NERC CIP Documentation Requirements White Paper FoxGuard Solutions, Inc. November 2014 Defining Ports And Services In part 2 of our Ports and Services white
DC Agent Troubleshooting
DC Agent Troubleshooting Topic 50320 DC Agent Troubleshooting Web Security Solutions v7.7.x, 7.8.x 27-Mar-2013 This collection includes the following articles to help you troubleshoot DC Agent installation
Web Applications Security: SQL Injection Attack
Web Applications Security: SQL Injection Attack S. C. Kothari CPRE 556: Lecture 8, February 2, 2006 Electrical and Computer Engineering Dept. Iowa State University SQL Injection: What is it A technique
allow all such packets? While outgoing communications request information from a
FIREWALL RULES Firewalls operate by examining a data packet and performing a comparison with some predetermined logical rules. The logic is based on a set of guidelines programmed in by a firewall administrator,
This document was prepared in conjunction with work accomplished under Contract No. DE-AC09-96SR18500 with the U. S. Department of Energy.
This document was prepared in conjunction with work accomplished under Contract No. DE-AC09-96SR18500 with the U. S. Department of Energy. DISCLAIMER This report was prepared as an account of work sponsored
WHITEPAPER. How a DNS Firewall Helps in the Battle against Advanced Persistent Threat and Similar Malware
WHITEPAPER How a DNS Firewall Helps in the Battle against Advanced Persistent Threat and Similar Malware How a DNS Firewall Helps in the Battle against Advanced As more and more information becomes available
Basic Setup Guide. Remote Administrator 4 NOD32 Antivirus 4 Business Edition Smart Security 4 Business Edition
Basic Setup Guide Remote Administrator 4 NOD32 Antivirus 4 Business Edition Smart Security 4 Business Edition Contents Getting started...1 Software components...1 Section 1: Purchasing and downloading
Presto User s Manual. Collobos Software Version 1.6. 2014 Collobos Software, Inc http://www.collobos.com
Presto User s Manual Collobos Software Version 1.6 2014 Collobos Software, Inc http://www.collobos.com Welcome To Presto 3 System Requirements 3 How It Works 4 Presto Service 4 Presto 4 Printers 5 Virtual
Cisco Security Optimization Service
Cisco Security Optimization Service Proactively strengthen your network to better respond to evolving security threats and planned and unplanned events. Service Overview Optimize Your Network for Borderless
Seven Practical Steps to Delivering More Secure Software. January 2011
Seven Practical Steps to Delivering More Secure Software January 2011 Table of Contents Actions You Can Take Today 3 Delivering More Secure Code: The Seven Steps 4 Step 1: Quick Evaluation and Plan 5 Step
Don t skip these expert tips for making your firewall airtight, bulletproof and fail-safe. 10 Tips to Make Sure Your Firewall is Really Secure
Don t skip these expert tips for making your firewall airtight, bulletproof and fail-safe. 10 Tips to Make Sure Your Firewall is Really Secure Security studies back up this fact: It takes less than 20
N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work
N-CAP Users Guide Everything You Need to Know About Using the Internet! How Firewalls Work How Firewalls Work By: Jeff Tyson If you have been using the internet for any length of time, and especially if
Integrating with BarTender Integration Builder
Integrating with BarTender Integration Builder WHITE PAPER Contents Overview 3 Understanding BarTender's Native Integration Platform 4 Integration Builder 4 Administration Console 5 BarTender Integration
The Top Web Application Attacks: Are you vulnerable?
QM07 The Top Web Application Attacks: Are you vulnerable? John Burroughs, CISSP Sr Security Architect, Watchfire Solutions [email protected] Agenda Current State of Web Application Security Understanding
LEARNING COMPUTER SYSTEMS VULNERABILITIES EXPLOITATION THROUGH PENETRATION TEST EXPERIMENTS
1 LEARNING COMPUTER SYSTEMS VULNERABILITIES EXPLOITATION THROUGH PENETRATION TEST EXPERIMENTS Te-Shun Chou and Tijjani Mohammed Department of Technology Systems East Carolina University [email protected] Abstract
Leverage SharePoint with PSI:Capture
Leverage SharePoint with PSI:Capture A White Paper Courtesy of PSIGEN Software, Inc. Table of Contents Intro to PSI:Capture... 1 Intro to PSI:Capture for SharePoint... 1 Key SharePoint Features... 2 Key
How To Set Up A Network Map In Linux On A Ubuntu 2.5 (Amd64) On A Raspberry Mobi) On An Ubuntu 3.5.2 (Amd66) On Ubuntu 4.5 On A Windows Box
CSC-NETLAB Packet filtering with Iptables Group Nr Name1 Name2 Name3 Date Instructor s Signature Table of Contents 1 Goals...2 2 Introduction...3 3 Getting started...3 4 Connecting to the virtual hosts...3
defending against advanced persistent threats: strategies for a new era of attacks agility made possible
defending against advanced persistent threats: strategies for a new era of attacks agility made possible security threats as we know them are changing The traditional dangers IT security teams have been
Track 2 Workshop PacNOG 7 American Samoa. Firewalling and NAT
Track 2 Workshop PacNOG 7 American Samoa Firewalling and NAT Core Concepts Host security vs Network security What is a firewall? What does it do? Where does one use it? At what level does it function?
Local DNS Attack Lab. 1 Lab Overview. 2 Lab Environment. SEED Labs Local DNS Attack Lab 1
SEED Labs Local DNS Attack Lab 1 Local DNS Attack Lab Copyright c 2006 Wenliang Du, Syracuse University. The development of this document was partially funded by the National Science Foundation s Course,
Using DC Agent for Transparent User Identification
Using DC Agent for Transparent User Identification Using DC Agent Web Security Solutions v7.7, 7.8 If your organization uses Microsoft Windows Active Directory, you can use Websense DC Agent to identify
STABLE & SECURE BANK lab writeup. Page 1 of 21
STABLE & SECURE BANK lab writeup 1 of 21 Penetrating an imaginary bank through real present-date security vulnerabilities PENTESTIT, a Russian Information Security company has launched its new, eighth
Cyber Security Management
Cyber Security Management Focusing on managing your IT Security effectively. By Anthony Goodeill With the news cycles regularly announcing a recurrently theme of targets of hacker attacks and companies
IS TEST 3 - TIPS FOUR (4) levels of detective controls offered by intrusion detection system (IDS) methodologies. First layer is typically responsible for monitoring the network and network devices. NIDS
Information Technology Career Cluster Introduction to Cybersecurity Course Number: 11.48100
Information Technology Career Cluster Introduction to Cybersecurity Course Number: 11.48100 Course Description: Introduction to Cybersecurity is designed to provide students the basic concepts and terminology
Discovery Guide. Secret Server. Table of Contents
Secret Server Discovery Guide Table of Contents Introduction... 3 How Discovery Works... 3 Active Directory / Local Windows Accounts... 3 Unix accounts... 3 VMware ESX accounts... 3 Why use Discovery?...
Web Application Security
Chapter 1 Web Application Security In this chapter: OWASP Top 10..........................................................2 General Principles to Live By.............................................. 4
The Real State of WiFi Security in the Connected Home August 25, 2015
The Real State of WiFi Security in the Connected Home August 25, 2015 1 Abstract Analyzing real-world data can teach us about the state of security in the connected home. RouterCheck, a tool for testing
Redhawk Network Security, LLC 62958 Layton Ave., Suite One, Bend, OR 97701 [email protected] 866-605- 6328 www.redhawksecurity.
Planning Guide for Penetration Testing John Pelley, CISSP, ISSAP, MBCI Long seen as a Payment Card Industry (PCI) best practice, penetration testing has become a requirement for PCI 3.1 effective July
For more information email [email protected] or call 703.749.7723
Vulnerability Assessment Methodology Today s networks are typically comprised of a variety of components from many vendors. This adds to the difficulties faced by the system administration staff, as they
Looking for Trouble: ICMP and IP Statistics to Watch
Looking for Trouble: ICMP and IP Statistics to Watch Laura Chappell, Senior Protocol Analyst Protocol Analysis Institute [[email protected]] www.packet-level.com www.podbooks.com HTCIA Member,
INFORMATION SECURITY TRAINING CATALOG (2015)
INFORMATICS AND INFORMATION SECURITY RESEARCH CENTER CYBER SECURITY INSTITUTE INFORMATION SECURITY TRAINING CATALOG (2015) Revision 3.0 2015 TÜBİTAK BİLGEM SGE Siber Güvenlik Enstitüsü P.K. 74, Gebze,
