NO.164 #!/usr/bin/python import socket buffer=[“”A””] counter=50 while len(buffer)<=100: buffer.append (“”A””*counter) counter=counter+50 commands= [“”HELP””,””STATS .””,””RTIME .””,””LTIME. “”,””SRUN .”‘,””TRUN .””,””GMON
.””,””GDOG .””,””KSTET .”,””GTER .””,””HTER .””, “”LTER .”,””KSTAN .””] for command in commands: for buffstring in buffer: print “”Exploiting”” +command +””:””+str(len(buffstring)) s=socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((‘127.0.0.1’, 9999)) s.recv(50) s.send(command+buffstring) s.close() What is the code written for?
NO.175 To create a botnet. the attacker can use several techniques to scan vulnerable machines. The attacker first collects Information about a large number of vulnerable machines to create a list. Subsequently, they infect the machines. The list Is divided by assigning half of the list to the newly compromised machines. The scanning process runs simultaneously. This technique ensures the spreading and installation of malicious code in little time.
Which technique is discussed here?
Explanation
One of the biggest problems a worm faces in achieving a very fast rate of infection is “getting off the ground.” although a worm spreads exponentially throughout the early stages of infection, the time needed to infect say the first 10,000 hosts dominates the infection time.
There is a straightforward way for an active worm a simple this obstacle, that we term hit-list scanning. Before the worm is free, the worm author collects a listing of say ten,000 to 50,000 potentially vulnerable machines, ideally ones with sensible network connections. The worm, when released onto an initial machine on this hit-list, begins scanning down the list. once it infects a machine, it divides the hit-list in half, communicating half to the recipient worm, keeping the other half.
This fast division ensures that even if only 10-20% of the machines on the hit-list are actually vulnerable, an active worm can quickly bear the hit-list and establish itself on all vulnerable machines in only some seconds.
though the hit-list could begin at 200 kilobytes, it quickly shrinks to nothing during the partitioning. This provides a great benefit in constructing a quick worm by speeding the initial infection.
The hit-list needn’t be perfect: a simple list of machines running a selected server sort could serve, though larger accuracy can improve the unfold. The hit-list itself is generated victimization one or many of the following techniques, ready well before, typically with very little concern of detection.
* Stealthy scans. Portscans are so common and then wide ignored that even a quick scan of the whole net would be unlikely to attract law enforcement attention or over gentle comment within the incident response community. However, for attackers wish to be particularly careful, a randomised sneaky scan taking many months would be not possible to attract much attention, as most intrusion detection systems are not currently capable of detecting such low-profile scans. Some portion of the scan would be out of date by the time it had been used, however abundant of it’d not.
* Distributed scanning. an assailant might scan the web using a few dozen to some thousand already-compromised “zombies,” the same as what DDOS attackers assemble in a very fairly routine fashion. Such distributed scanning has already been seen within the wild-Lawrence Berkeley National Laboratory received ten throughout the past year.
* DNS searches. Assemble a list of domains (for example, by using wide offered spam mail lists, or trolling the address registries). The DNS will then be searched for the science addresses of mail-servers (via mx records) or net servers (by looking for www.domain.com).
* Spiders. For net server worms (like Code Red), use Web-crawling techniques the same as search engines so as to produce a list of most Internet-connected web sites. this would be unlikely to draw in serious attention.
* Public surveys. for many potential targets there may be surveys available listing them, like the Netcraft survey.
* Just listen. Some applications, like peer-to-peer networks, wind up advertising many of their servers.
Similarly, many previous worms effectively broadcast that the infected machine is vulnerable to further attack. easy, because of its widespread scanning, during the Code Red I infection it was easy to select up the addresses of upwards of 300,000 vulnerable IIS servers-because each came knock on everyone’s door!
NO.176 Bill is a network administrator. He wants to eliminate unencrypted traffic inside his company’s network. He decides to setup a SPAN port and capture all traffic to the datacenter. He immediately discovers unencrypted traffic in port UDP 161. what protocol is this port using and how can he secure that traffic?
We have various articles already in our documentation for setting up SNMPv2 trap handling in Opsview, but SNMPv3 traps are a whole new ballgame. They can be quite confusing and complicated to set up the first time you go through the process, but when you understand what is going on, everything should make more sense.
SNMP has gone through several revisions to improve performance and security (version 1, 2c and 3). By default, it is a UDP port based protocol where communication is based on a ‘fire and forget’ methodology in which network packets are sent to another device, but there is no check for receipt of that packet (versus TCP port when a network packet must be acknowledged by the other end of the communication link).
There are two modes of operation with SNMP – get requests (or polling) where one device requests information from an SNMP enabled device on a regular basis (normally using UDP port 161), and traps where the SNMP enabled device sends a message to another device when an event occurs (normally using UDP port 162). The latter includes instances such as someone logging on, the device powering up or down, or a wide variety of other problems that would need this type of investigation.
This blog covers SNMPv3 traps, as polling and version 2c traps are covered elsewhere in our documentation.
SNMP traps
Since SNMP is primarily a UDP port based system, traps may be ‘lost’ when sending between devices; the sending device does not wait to see if the receiver got the trap. This means if the configuration on the sending device is wrong (using the wrong receiver IP address or port) or the receiver isn’t listening for traps or rejecting them out of hand due to misconfiguration, the sender will never know.
The SNMP v2c specification introduced the idea of splitting traps into two types; the original ‘hope it gets there’ trap and the newer ‘INFORM’ traps. Upon receipt of an INFORM, the receiver must send an acknowledgement back. If the sender doesn’t get the acknowledgement back, then it knows there is an existing problem and can log it for sysadmins to find when they interrogate the device.
NO.177 Ricardo has discovered the username for an application in his targets environment. As he has a limited amount of time, he decides to attempt to use a list of common passwords he found on the Internet. He compiles them into a list and then feeds that list as an argument into his password-cracking application, what type of attack is Ricardo performing?
Explanation
A brute force attack could be a popular cracking method: by some accounts, brute force attacks accounted for five% has a of confirmed security breaches. A brute force attack involves ‘guessing’ username and passwords to achieve unauthorized access to a system. Brute force could be a easy attack methodology and encompasses a high success rate.Some attackers use applications and scripts as brute force tools. These tools attempt various parole combos to bypass authentication processes. In different cases, attackers try and access net applications by sorting out the correct session ID. offender motivation might embody stealing data, infecting sites with malware, or disrupting service.While some attackers still perform brute force attacks manually, nowadays most brute force attacks nowadays area unit performed by bots. Attackers have lists of ordinarily used credentials, or real user credentials, obtained via security breaches or the dark net. Bots consistently attack websites and take a look at these lists of credentials, and apprize the offender after they gain access.
Types of Brute Force Attacks* Simple brute force attack-uses a scientific approach to ‘guess’ that doesn’t believe outside logic.* Hybrid brute force attacks-starts from external logic to see that parole variation could also be presumably to succeed, then continues with the easy approach to undertake several potential variations.* Dictionary attacks-guesses username or passwords employing a wordbook of potential strings or phrases.* Rainbow table attacks-a rainbow table could be a precomputed table for reversing cryptologic hash functions. It may be wont to guess a perform up to a precise length consisting of a restricted set of characters.* Reverse brute force attack-uses a typical parole or assortment of passwords against several potential username . Targets a network of users that the attackers have antecedently obtained knowledge.* Credential stuffing-uses previously-known password-username pairs, attempting them against multiple websites.
Exploits the actual fact that several users have an equivalent username and parole across totally different systems.
Hydra and different widespread Brute Force Attack ToolsSecurity analysts use the THC-Hydra tool to spot vulnerabilities in shopper systems. Hydra quickly runs through an outsized range of parole combos, either easy brute force or dictionary-based. It will attack quite fifty protocols and multiple operational systems. Hydra is an open platform; the safety community and attackers perpetually develop new modules.
Other high brute force tools are:* Aircrack-ng-can be used on Windows, Linux, iOS, and golem. It uses a wordbook of wide used passwords to breach wireless networks.* John the Ripper-runs on fifteen totally different platforms as well as UNIX operating system, Windows, and OpenVMS. Tries all potential combos employing a dictionary of potential passwords.* L0phtCrack-a tool for cracking Windows passwords. It uses rainbow tables, dictionaries, and digital computer algorithms.* Hashcat-works on Windows, Linux, and Mac OS. will perform easy brute force, rule-based, and hybrid attacks.* DaveGrohl-an open-source tool for cracking mac OS. may be distributed across multiple computers.* Ncrack-a tool for cracking network authentication. It may be used on Windows, Linux, and BSD.