Cyber Security PDF
Cyber Security PDF
program
Step 6: Permissions
Make sure to give full control to the people that have access to the shared folder. Click
Apply then click OK. Once you press OK you'll be back at the advanced sharing page.
Press Apply and OK on that page too.
7.program
Connect to a Wi-Fi network in Windows
Whether you're at home, work, or out and about, chances are you'll find a Wi-Fi network
that we can connect to for internet access.
1. Select the Network icon on the taskbar. The icon that appears depends on your
current connection state. If you don’t see one of the network icons (or a similar one)
shown in the following image, select the Up arrow to see if it appears there.
2. Choose the Wi-Fi network you want, then select Connect.
3. Type the network password, and then select Next.
4. Choose Yes or No, depending on the type of network you're connecting to and if
you want your PC to be discoverable by other PCs and devices on the network.
8. program
a)configuring switches
Make sure that your modem will work with your Internet subscription. While rare, some
modems encounter issues when paired with a specific Internet company (e.g., Comcast).
Double-check your modem's compatibility with your current Internet subscription before
buying (if possible).
If you find that your modem won't work with your current subscription, try to exchange the
modem for a different one that will work, or switch your Internet subscription.
2.Find your room's cable output. The cable output resembles a metal cylinder with a small
hole in the middle and screw threads all around the sides. You'll usually find cable outputs in the
wall near the floor in living rooms and bedrooms.
In some cases, there will already be a cable connected to the cable outlet.
3.Decide on a place to mount the modem. The modem should be relatively high up (e.g., on
top of a bookshelf), and it will need to be close enough to the cable output that you can connect
it without stretching or bending the cable.
You'll also need to have a power outlet nearby.
4.Make sure that you have all of the required cables. A modem generally requires a coaxial
cable to connect to the cable output, as well as a power cable to connect to an electrical outlet.
Both of these cables should come with your modem, but if you bought it used, you may need to
find replacement cables.
If you plan on attaching the modem to a router, you will also need an Ethernet cable.
Consider buying a longer coaxial cable if the one that you have is too short to allow you to
mount properly your modem.
5.Read your modem's instructions. Each modem is unique, and yours may require additional
setup outside of this article's capacity. Reading your modem's manual will help make you aware
of any additional steps that you have to take to install the modem.
Installing
6.Attach one end of the coaxial cable to the cable output. The coaxial cable has a connection
that resembles a needle on each end. This will plug into the cable output. Make sure that you
screw the coaxial cable onto the cable outlet to ensure that the connection is solid.
7.Attach the other end of the cable to the input on your modem. On the back of the modem,
you should see an input that resembles the cable output cylinder. Attach the free end of the
coaxial cable to this input, making sure to tighten as needed.
8.Plug your modem's power cable into an electrical outlet. A wall socket or a surge
protector will do. It's important to plug the cable into the power outlet before connecting it to
the modem, since connecting the power cable to the modem first can cause damage.
9.Insert the modem power cable's free end into the modem. You'll usually find the power
cable input port at the bottom of the back of the modem, but check your modem's
documentation to confirm if you can't find the power port.
10.Place your modem in its spot. With the cables attached, gently move your modem into its
designated position. You shouldn't feel any resistance from the cables.
11.Attach the modem to a router. If you have a Wi-Fi router that you want to use in
conjunction with your modem, plug one end of an Ethernet cable into the square port on the
back of the modem, then plug the other end into the "INTERNET" (or similarly labeled) square
port on the back of the router. As long as the router is plugged into a power source, the router
should immediately light up.
Give your modem and router a few minutes to boot up before attempting to connect to Wi-Fi.
You can also connect your computer directly to your modem via Ethernet if you have an
Ethernet port enabled computer (ex. A PC or Ethernet Adapter for most Macs)
Step 5
Configure the network settings on each connected computer. If you are expanding a
network and the network uses DCHP, or dynamic IP addressing, no configuration will be
necessary. On networks using static IP addressing or on a new network setup using the
Ethernet hub, each computer or device must be assigned a unique IP address. Local IP
addresses must use the allowed “private” address pools that will not interfere with
internet addresses. Acceptable addresses include 192.168.x.x, 172.16.x.x to 172.31.x.x,
or 10.x.x.x. The “x” represents a number that is chosen by the user, from 0 to 254. All
computers on the network should share the first three numbers in the address, with the
final number representing the individual computer. In a network with three computers,
for example, the first could be 192.168.1.1, the second could be 192.168.1.2 and the
third could be 192.168.1.3, though the final number does not need to be sequential.
Step 6
Click the “Start” button in Windows, select “Control Panel" and double-click the icon
labeled “Network Connections.”
Step 7
Right-click the icon for the Ethernet adapter and select “Properties.” Click on the check
box marked “Internet Protocol (TCP/IP)” and press the “Properties” button.
Step 8
Select the radio button labeled “Use the following IP address.” Enter a unique IP address
for the computer and the applicable subnet mask. If a router is used on the network,
enter the router’s IP address as the default gateway. Press the “OK” button and reboot if
necessary.
Step 9
Enable file and printer sharing from the “Properties” dialog for the Ethernet card if files
will be transferred between the networked computers.
Step 10
Click the “Start” button, select “Control Panel” and double-click on the “System” icon.
Select the “Computer Name” tab and click on the button labeled “Change” to set the
computer’s network name. In the “Computer Name” box, enter a unique name for the
computer. In the “Member of” section, choose the radio button marked “Workgroup”
and enter the workgroup of the network. If setting up a new network, this name can be
change but all computers on the network must share the same workgroup name.
Step 11
Verify that all computers can access the network and the Internet if connected.
1.Call an internet service provider (Bell, Rogers, Wightman Telecom) to obtain your
internet service. While you are on the phone setting up your account the customer care person
should then give you a user name, phone number, and a password. This is so you can log on
securely.
2.Make sure your PC is plugged in. Connect a telephone cord from the back of your PC to the
Telephone jack outlet located on the wall of the room you are in. Turn your PC power on.
3.Go to the control panel. When your PC is finished starting up, you should be on your main
desktop page. You should also see various icons. Look for the icon that is named “my computer”.
Enter my computer. When you enter you should see a small square panel to left of your screen
that says “other places”. In that panel are 4 items you can click on. Click on the one that says
“control panel”.
4.Go to network connections. In the control panel you will see various icons. The control panel
lets you change the settings of your computer such as; adding new software to your computer,
changing your mouse icon, adding a new user to the computer, or in this case creating/editing
your internet account. While in the control panel, look for the icon that says “network
connections”. Double click the icon to enter it.
5.Create a new connection. On this screen you will see basically nothing. Look to the upper left
hand side of your screen, you should see a small square panel that says “network tasks”. In this
panel there is a small icon with the words “create a new connection”. Enter this icon.
6.A small window will pop up, just click the next button once.
7.There are 4 bulletins to choose from. Since this is a dial-up connection that is being set up.
Click on the one that says “connect to the internet”. Then click the next button.
8.There are now 3 bulletins you can click on, click the one that says “set up my connection
manually”. Click the next button.
9.Another set of 3 bulletins will appear, click on “connect using a dial up modem”. Then
click the next button.
10.You will now be asked to type in your internet’s ISP name. You may name this whatever
you want to name it. (Ex, Your name, last name, nickname) Type in your ISP name then click the
next button.
11.Now you will be asked to type in a phone number (The number you type in will be the
number that you got from customer care while you were setting up your account in step
1) Type in the phone number and click the next button.
12.Now you will see 3 boxes, one asks for your user name. The other two are for your
password. Type in your user name. (You got your user name while you were on the phone with
your internet service provider in step 1) Do the same process for the password. Once you have
filled in the 3 boxes click the next button.
13.The setup will now tell you that you have completed setting up the internet
connection. Click the finish button.
10.program
Installation of system software
Today, the most common way to get new software is to download it from the Internet.
Applications like Microsoft Office and Adobe Photoshop can now be purchased and
downloaded right to your computer. You can also install free software this way. For
example, if you wanted to install the Google Chrome web browser, you can visit this
page and click the Download button.
The installation file will be saved to your computer in .exe format. Pronounced dot e-x-e,
this is the standard extension for installation files on Windows computers. You can
follow the steps below to install an application from an .exe file.
Locate and download an .exe file.
Locate and double-click the .exe file. (It will usually be in your Downloads folder.)
A dialog box will appear. Follow the instructions to install the software
The software will be installed. You can now open the application from the Start
menu (Windows 7) or the Start Screen (Windows 8).
11.program
A printer is an essential output device that a user needs for printing documents. It works
on a spooling mechanism through which it receives orders for printing from the user
and executes them. Spooling stands for simultaneous peripheral operation online. The
main issue with the spooling mechanism is that once you give an order to print
something, you cannot stop it midway.
There could be times when you might have ordered to print something by mistake. Once
you give the order, you cannot stop it. Even if you unplug your printer and put it back
after some time, the spooler will continue with the previous order. In this article, we will
illustrate various methods on how to stop printer spooling on Windows operating
system.
Method 1: Stop Spooling With Command Prompt
len=strlen(sourceString);
for(i=0;i<len;i++)
{
if(sourceString[i]!='.'){
buf[cnt++]=sourceString[i];
}
if(sourceString[i]=='.'||i==len-1){
buf[cnt]='\0';
cnt=0;
oct[cnt1++]=atoi(buf);
}
}
ipAddress[0]=oct[0];
ipAddress[1]=oct[1];
ipAddress[2]=oct[2];
ipAddress[3]=oct[3];
}
intmain()
{
unsignedcharip[20]={0};
shortipAddress[4];
extractIpAddress(ip,&ipAddress[0]);
if(ipAddress[0]>=0&&ipAddress[0]<=127)
printf("Class A Ip Address.\n");
if(ipAddress[0]>127&&ipAddress[0]<191)
printf("Class B Ip Address.\n");
if(ipAddress[0]>191&&ipAddress[0]<224)
printf("Class C Ip Address.\n");
if(ipAddress[0]>224&&ipAddress[0]<=239)
printf("Class D Ip Address.\n");
if(ipAddress[0]>239)
printf("Class E Ip Address.\n");
return0;
}
Output
Enter IP Address (xxx.xxx.xxx.xxx format): 145.160.017.001
// strong or not.
#include <bits/stdc++.h>
usingnamespacestd;
voidprintStrongNess(string& input)
intn = input.length();
"vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ";
if(islower(input[i]))
hasLower = true;
if(isupper(input[i]))
hasUpper = true;
if(isdigit(input[i]))
hasDigit = true;
size_tspecial = input.find_first_not_of(normalChars);
if(special != string::npos)
specialChar = true;
// Strength of password
if(hasLower&&hasUpper&&hasDigit&&
cout<< "Strong"<<endl;
cout<< "Moderate"<<endl;
else
cout<< "Weak"<<endl;
// Driver code
intmain()
printStrongNess(input);
return0;
Output
Strength of password: -Strong
14.program
How to Use Bluetooth to Transfer Files Between Devices
Send Files from Smartphones and Tablets
To transfer files from a smartphone or tablet to a PC:
1. Open the File Manager app. This also could be called Explorer, Files, File Explorer, My
Files, or something similar. On Android Marshmallow or later, open the Settings app to
find the file manager.
2. While iOS has a Files app, it doesn't generally allow Bluetooth transfers. Instead, it
uses AirDrop for non-internet file transfers, which uses Bluetooth and Wi-Fi.
Go to the folder that contains the files you want to transfer. Camera photos are
usually found in the DCIM folder.
Tap the Menu icon and choose Select.
Select the files you want to send.
Tap the Share icon.
In the list of sharing options, tap Bluetooth.
Send Files from Computers
15.program
Pune Cosmos Bank cyber-attack: Supplementary chargesheet filed against five from
Thane
In one of the biggest cyber attacks on an Indian bank, several cloned debit cards of
the Cosmos Cooperative Bank, which has its headquarters in Pune, were used for
thousands of ATM transactions from India and 28 other countries in a period of
seven hours on August 11, 2018.
The Pune City Police on Thursday filed another supplementary chargesheet in the
Cosmos Bank cyber attack case before a court in Pune. Police have so far arrested 18
people in connection with the malware attack on Cosmos Bank.
A special investigation team (SIT) of Pune City Police filed a supplementary
chargesheet of almost 400 pages against five accused, identified as Ferzo Yasin
Shaikh (37) of Mumbai, Salman Naeem Baig (31), Shahbaz Arif Khatri (30), Asif Jamil
Shaikh (31) and Shahbaz Farooq Shaikh (29), all from Thane.
All five are currently under judicial custody and lodged in Yerwada Central Prison.
Police said the five accused are “money mules” who had allegedly withdrawn money
to the tune of Rs 61 lakh from different ATMs in Jaipur and Indore.
Deputy Commissioner of Police, cyber crime, Sambhaji Kadam confirmed that
another supplementary chargesheet was filed before the court on Thursday in the
Cosmos Bank cyber attack case.
In one of the biggest cyber attacks on an Indian bank, several cloned debit cards of
the Cosmos Cooperative Bank, which has its headquarters in Pune, were used for
thousands of ATM transactions from India and 28 other countries in a period of
seven hours on August 11, 2018.
While nearly Rs 78 crore was withdrawn in more than 12,000 ATM transactions
outside India, another 2,800 transactions were made in different places within India,
to the tune of Rs 2.5 crore.
Deputy Commissioner of Police, cyber crime, Sambhaji Kadam confirmed that
another supplementary chargesheet was filed before the court on Thursday in the
Cosmos Bank cyber attack case.
In one of the biggest cyber attacks on an Indian bank, several cloned debit cards of
the Cosmos Cooperative Bank, which has its headquarters in Pune, were used for
thousands of ATM transactions from India and 28 other countries in a period of
seven hours on August 11, 2018.
While nearly Rs 78 crore was withdrawn in more than 12,000 ATM transactions
outside India, another 2,800 transactions were made in different places within India,
to the tune of Rs 2.5 crore.
16.program
Optimized Algorithm for Pattern Searching
#include <bits/stdc++.h>
usingnamespacestd;
intM = pat.size();
intN = txt.size();
inti = 0;
while(i<= N - M) {
intj;
if(txt[i + j] != pat[j])
break;
if(j == M)
i = i + M;
elseif(j == 0)
i = i + 1;
else
i = i + j;
intmain()
search(pat, txt);
return0;
}
Output
17.program
PUNE Technology has been a silver lining during the ongoing Coronavirus pandemic as
communication, business and personal interactions moved online
PUNE Technology has been a silver lining during the ongoing Coronavirus pandemic as
communication, business and personal interactions moved online. But cybercrime remains a
problem for citizens and the police in Pune
The number of cybercrime complaints reported based on misuse of social networking sites
doubled in 2021 compared to 2020. (REPRESENTATIONAL IMAGE)
The number of cybercrime complaints reported based on misuse of social networking sites
doubled in 2021 compared to 2020. The overall number of complaints have seen an exponential
increase since 2018. The city cybercrime cell received 19,023 total complaints in 2021 that
belong to various categories, such as monetary frauds, sending vulgar messages on phones,
email hacking, stealing online data and defaming people by posting morphed pictures in social
media and many more. According to Pune cybercrime police data, 14,950 such complaints were
reported in 2020 and 7,795 in 2019.
The methods of defrauding people have become innovative, according to BhagyashreeNavatake,
deputy commissioner of police, cybercrime and Economic offence wing of Pune police. “There
were innovative ways of defrauding people every 8-10 days. When Covid began, the number of
cases of calling up positive patients and duping them increased. This happened in addition to
the casual approach of people who click on links and share OTP. The use of e-commerce and
various kinds of software also increased . These factors contributed to the rise in cases,” said
DCP Navatake.
Among social media-related cybercrime, the cases from popular platforms Facebook and
Instagram are the highest. The city police introduced a new section for its records for
“sextortion” and “friendship fraud”, on Facebook and Instagram, which consist of cases of using
sexual images or videos for extortion. The highest number of cases were of defamation and
posts by making fake profiles or making vulgar comments on posts or through messages. The
number of cases doubled from 791 in 2020, to 1,518 in 2021.
On other platforms including Twitter, the new section added for record was of posting vulgar
comments on Zoom meetings and uploading of videos on social media sites other than Facebook
and Instagram. The trend has seen a worrying rise among minor victims and adults equally.
Children were exposed to added screentime owing to the online schooling necessitated by the
lockdown, said officials.
While social media cases rose exponentially, the highest contributor of cybercrime complaints
was online banking fraud. The cases of online banking fraud include bank cards, third party
payment options, QR code scan, lottery fraud, job fraud, matrimonial fraud, loan fraud, and KYC
update fraud. Among the cases of online banking fraud, the number of cases of misuse of bank
cards was the highest contributor followed by job fraud, loan fraud, money transfer using third
party methods. The new entrant in this list is Fastag cheating which took up pace when the
central government made use of Fastag mandatory.
The police have managed to get a refund of the money lost in some of the cases. The total
amount refunded in 2021 by the cybercrime cell, however, has seen a record low in the past
four years. The cyber cell refunded ₹37,902,535 in 2021 compared to ₹ 96,090,893 in
2020, ₹113,935,459 in 2019, and ₹41,855,975 in 2018, according to police records.
“In 2020 as well as 2019, there was a major chunk of refund from cases like Cosmos bank fraud
and Bitcoin case. That way, the recovery in multiple smaller cases is much more this year
compared to earlier years,” said DCP Navatake.
In the final quarter 2021 year, the cybercrime cell has registered five major cases related to
malpractices in exams including Teacher eligibility test (TET) 2018, TET 2020, health
department recruitment exam Group D, Group C, and Maharashtra housing and area
development authority (MHADA) recruitment exam.
18.program
In the London case, where the criminals attempted to transfer $420 from a London branch of
Japanese bank, the technique applied was password cracking. Through the use of Key loggers
the criminals were in a position to get access to some of the key passwords to the bank system.
The information that was obtained from the key logger programs was used to access some of
the most important and restricted data areas, including access codes that were private the
banking top managerial staff. This gave the criminals directs access to the bank information that
led to the attempted crime.
It is also possible that the criminals also used session hijacking through the internet to enable
them get into important accounts of the bank. A combination of these two techniques must have
led to successful log in to the private accounts of the bank. These are some of the top most
methods that the criminals always use in accessing private information from the banks. Recent
crimes related to the same have been witnesses in various regions of the world. It has still been
realized that password cracking is still the main method that is usually employed.
There are numerous measures that exist in order to control cybercrimes. One of these is the use
of strong passwords or user ID. This should be frequently reviewed and changed to limit the
extent to which the key logger programs can access the passwords. It may be able to detect the
password, but in changing this password again and again, successful hacking may be limited.
19.program
2. Secure your infrastructure: To successfully defend against a DoS attack, you need to
make sure your castle’s walls are fully fortified. For this, it is essential to have multi-level
protection strategies that use intrusion prevention and threat management systems.
These systems can use anti-spam, content filtering, VPN, firewalls, load balancing, and
security layers to spot and block attacks before they overwhelm your network. That
said, software cannot do the job alone: You need a hardware component. Edge
microsegmentation — which we will cover in the next point — is one of the most
powerful ways of protecting your network from DoS attacks.
3. Reduce the attack surface: One of the most effective strategies against DoS attacks is to
reduce the size of the available attack area. The smaller the attack surface, the easier it is
to defend. While there are many ways of implementing this
strategy, microsegmentation is an innovative approach gaining traction in the industry.
Microsegmentation spits a network into granular zones and protects each zone
separately. The net effect is a higher overall security profile. Byos has built a powerful
edge microsegmentation solution that uses hardware-enforced isolation to secure
endpoints on small microsegments, maximizing the defensive capabilities of the
network as a whole. Ready to learn more? Get started here.
4. Create a DoS response plan: Benjamin Franklin once said, “If you fail to plan, you are
planning to fail,” and this principle holds with DoS attacks. The purpose of the plan is to
ensure that your current setup is secure, that you can detect an attack as soon as
possible, that everyone on your team knows their role should an attack occur, and that
escalation and resolution procedures are all clear.
This means the plan should provide a systems checklist, define the response team, and
lay out the entire response process. In the heat of an attack, it is easy to lose focus and
make errors, so have a plan for how to resolve a denial-of-service attack in place to
make sure that everyone is ready when the time comes.
5. Know the warning signs: The earlier you can spot the onset of a DoS attack, the more
likely it is that you will be able to defend against it successfully. Common warning signs
of the beginning of an attack are poor connectivity, network slowdown, repeated site
crashes, or any sustained disruption of performance.
It is important to remember that these symptoms can result from both high-volume and
low-volume DoS attacks. Low-volume attacks are more challenging to identify because
of their similarity to less serious security incidents, so it is essential to have team
members with the experience or instinct to follow up on the subtle warning signs that
could portend a larger breach.
20.
1. Installation
Snort can be downloaded from it’s official website at http://www.snort.org. Snort is supported
on a number of hardware platforms and operating systems. These include:
Linux
OpenBSD
FreeBSD
NetBSD
Solaris (both Sparc and i386)
HP-UX
AIX
IRIX
MacOS
Windows
In this report, we downloaded the source file package and compiled from scratch, however,
Snort website also provide binary version for linux and windows platforms.
Before compile and install snort, we have to first install the related software and libraries.
2 Components of Snort
A Snort-based IDS contains the following components:
Packet Decoder
Preprocessors
Detection Engine
Logging and Alerting System
Output Modules
Below shows how these components work together to detect particular attacks and to generate
output. Any data packet coming from the Internet enters the packet decoder. On its way towards
the output modules, it is either dropped, logged or an alert is generated.
In an organization’s network, the network interface can be Ethernet, SLIP, or PPP and so on. The
packet decoder takes packets from different types of network interfaces and prepares the
packets to be preprocessed or to be sent to the detection engine.
2.2 Preprocessors
Preprocessors are components that can be used to arrange or modify data packets before the
detection engine does some operation to find out if the packet is being used by an intruder.
Hackers use different techniques to fool an IDS in different way, these may include:
Exact match: For examples, you may have created a rule to find a signature “httpd/conf” in
HTTP packets. If you are matching this string exactly, a hacker can easily fool you by modifying
the string as “httpd/./conf” or “httpd../httpd/conf”. In addition, since the web servers usually
understand hexadecimal characters or Unicode characters, hackers can also inset these kinds of
characters into the web URI. This also makes the exact match rule void. A preprocessor can
rearrange the string so that it is detectable by the IDS.
Packets fragmentation: When a large data chunk is transferred to a host, the packet is usually
fragmented into multiple data packets so that each packet fragment satisfies the requirement of
default maximum length of some particular network interface. Later, the receiving systems need
to reassemble these smaller units to form the original data packets. Hackers can use
fragmentation to hide a signature into several small units to fool the IDS. A Preprocessor can
reassemble these small units first and send the whole packet to the detection engine for
signature testing.
The detection engine is the most important part of Snort. Its responsibility is to detect if any
intrusion activity exists in a packet. The detection engine employs Snort rules for this purpose.
The rules are read into internal data structures or chains where they are matched against all
packets. If a packet matches any rule, Snort will send alerts to system logs or output plug-ins;
otherwise the packet is dropped. The detection engine is the time-critical part of Snort. The load
on it depends on the following factors:
Number of rules
Power of the machine on which Snort is running
Speed of internal bus used in the Snort machine
Load on the network
Note that the detection engine can dissert a packet and apply rules on different parts of the
packet. These parts may be:
The Transport layer header: This header includes TCP, UDP or other transport layer headers. It
may also work on the ICMP header.
The application layer level header: Application layer headers include, but are not limited to, DNS
header, FTP header, SNMP header, and SMTP header. You may have to use some indirect
methods for application layer headers, like offset of data to be looked for.
Packet payload. This means that you can create a rule that is used by the detection engine to
find a string inside the data that is present inside the packet.
Depending on what the detection engine finds inside a packet, the packet may be used to log the
activity or generate an alert. Logs are kept in simple text files, tcpdump-style files or some other
form. All of the log files are stored under /var/log/snort folder by default. You can use –l
command line options to modify the location of generating logs and alerts. Many command line
options discussed in the next chapter can modify the type and detail of information that is
logged by the logging and alerting system.
Output modules or plug-ins can do different operations depending on how you want to save
output generated by the logging and alerting system of Snort. Basically, these modules control
the type of output generated by the logging and alerting system. Depending on the
configuration, output modules can do things like the following:
Simply logging to /var/log/snort/alerts file or some other file
Sending SNMP traps
Sending messages to syslog facility
Logging to a database like MySQL or Oracle.
Generating eXtensible Markup Language (XML) output
Modifying configuration on routers and firewalls
Sending Server Message Block (SMB) messages to Microsoft Windows-based machines
Other tools can also be used to send alerts in other formats such as e-mail messages or viewing
alerts using a web interface.
21.program
What is Malware?
As software designed to interfere with a computer's normal functioning, malware is a blanket
term for viruses, trojans, and other destructive computer programs threat actors use to infect
systems and networks in order to gain access to sensitive information.
How to remove malware from a PC
Follow these six steps to malware removal on a PC.
1. SQL Injection
Many applications use Structured Query Language (SQL) to manage communications
with the database. SQL vulnerabilities allow attackers to insert malicious SQL commands
to exfiltrate, modify, or delete data. Some hackers use SQL to gain root access to the
target system.
SQL injection attacks target servers that hold critical data used by web applications or
services. They are particularly dangerous when they expose critical or sensitive data,
such as user credentials and personal information. The most common vulnerability
enabling SQL injection attacks is using unsensitized user inputs. It is important to strip
out any element in user-supplied inputs that the server could execute as SQL code.
2. Cross-Site Scripting (XSS)
XSS attacks are similar to SQL injection attacks and involve the injection of malicious
scripts into websites or web applications. The point of difference is that the malicious
code runs in the browser only when the user visits a compromised website or app.
Attackers often carry out XSS attacks by injecting code into input fields that the target
page runs when visitors view the page (e.g., embedded JavaScript link).
3. Cross-Site Request Forgery (CSRF)
A CSRF attack occurs when an attacker forces the victim to perform unintended actions
on the web application. The victim first logs into the web app, which has deemed the
user and browser trustworthy. Therefore, the app will execute malicious actions that the
attacker tricks the victim into forwarding a request to the web app. The motivation for
CSRF ranges from simple pranks to enabling illicit financial transactions.
4. Session Fixation
A session fixation attack involves forcing a user’s session ID to a specified value.
Depending on the target web application’s functionality, attackers may use various
techniques to fix session ID values. Examples of session fixation techniques include
cross-site scripting exploits and reusing HTTP requests.
First, an attacker fixes the victim’s user session ID. Then, the user logs in and
inadvertently exposes the online identity. The attacker can then hijack the victim’s user
identity using the fixed session ID value.
Any web application that authenticates users with sessions is vulnerable to session
fixation attacks without adequate defences. Web apps that use session IDs typically use
cookies, though they can also use hidden form fields or URLs. Cookie-based user
sessions are the most popular and the easiest to compromise. Most fixation attacks
target cookie-based sessions.
5. Local File Inclusion (LFI)
An LFI attack exploits the dynamic file inclusion mechanisms in a web application. It
may occur when a web application takes user input, such as a parameter value or URL,
and passes it to a file inclusion command. An attacker can use this mechanism to trick
the app into including a remote file containing malicious code.
6. Security Misconfigurations
Security misconfigurations are some of the most serious web application vulnerabilities
because they provide attacks with opportunities to infiltrate the application easily.
Attackers could exploit a wide range of security configuration vulnerabilities. These
include unchanged default configurations, data stored in the cloud, ad hoc or incomplete
configurations, plaintext error messages containing sensitive information, and HTTP
header misconfigurations. Security misconfigurations may be present in any operating
system, library, framework, or application.
23.program
There are two ways to share your printer: using Settings or Control Panel.
Share your printer using Settings
Select the Start button, then select Settings > Devices > Printers & scanners.
Choose the printer you want to share, then select Manage.
Select Printer Properties, then choose the Sharing tab.
On the Sharing tab, select Share this printer.
If you want, edit the share name of the printer. You'll use this name to connect to
the printer from a secondary PC.
2.Malwarebytes
Safeguard your Android devices from ransomware, malware, and other threats using the
advanced protection of Malwarebytes.
It can efficiently detect dangerous threats and remove them before your device gets
compromised. Malware bytes offers real-time shields and scans for even the sophisticated
phishing URLs while you use the Chrome browser. It also alerts you in case it detects anything
suspicious to ensure a safe browsing experience.
The application conducts periodic privacy audits by identifying access permissions of your apps
installed on your phone or tablet. You can track those apps tracking your location, costing you
hidden fees, or monitoring your calls. Malware bytes can quickly search all your files for
malware and potentially harmful programs, including adware, screen lockers, etc.
It supports Android versions 6.0 or higher and languages like English, French, Italian, Spanish,
Russian, Dutch, German, Indonesian, Polish, and Portuguese.
Want to try out?
Malware bytes offers a 30-day free trial with all the premium features. You can buy its starting
plan for $3.33/month for one device, or choose a higher plan for more devices.
3.Kaspersky Security and VPN
For good reasons, Kaspersky is a well-known name in the cybersecurity space. This free-to-
download app has excellent features to keep you safe in this ever-dangerous digital territory.
This has:
Real-time malware protection
Remote wipe & Find My Device
Anti-phishing mechanisms
Safe browsing and messaging
Password manager
Virtual private network, etc.
In addition, you get a breach alert to tell if your personally identifiable information is leaked.
Besides, it also pings you when a new device connects to your WIFI network.
Overall, it provides Kaspersky 360-degree protection in a freemium package which is definitely
worth considering.
4.Norton 360
Norton 360 mobile security covers all bases to offer complete peace of mind. It helps you fight
against online threats with its malware detection, advert blocker, WIFI analyzer, etc.
Following the trend, Norton mobile security also has a built-in VPN to encrypt all the network
traffic.
Additionally, you get powerful phishing detectors indicating risky links in text messages, emails,
and apps. Likewise, it identifies your personal information leaks over the dark web.
You can check this and more with its 14-day premium trial.
5.McAfee Security
McFee packs a capable cybersecurity suite to become the guardian of your smartphone.
It includes:
Malware shield
VPN
Wi-Fi Scan
Identity Protection
Anti-phishing, etc.
The subscriptions of McFee come in two flavours which basically differ in their identity
protection module and a few advanced features you can check in their 7-day free trial.
AVG is another freemium mobile security solution with a decently powerful free version. Its
paid subscription is frequently dubbed as ‘well worth’ by its enormous user base.
It offers:
Malware scanner
Phishing protection
Media vault
App lock
VPN
Performance booster
In addition to this long list of features, you also get an app usage tracker, breach alert, junk
cleaner, etc.
You can expect similarities among Avast, Norton, and AVG mobile security, as all of these work
under the same parent company.
Overall, it promises a lot to be ignored, and its powerful free subscription makes it a must-try
security application.
ESET comes loaded with the best features to help you stay secure, and you can try its premium
package for 30 days without paying a penny.
You’ll get:
Antivirus
USB scanner
Online payment protection
Powerful Anti-theft
Remote wipe
App lock
Call filtering
Scheduled scans, etc.
Among these, ESET antivirus, real-time scanning, security report, activity log, etc., are free
features. A paid subscription is clearly more potent with the advanced protection for 5-devices
per plan.
A critically acclaimed security product, Bit defender offers a free premium trial for the first 14
days.
It boasts of:
Malware detector
Internet security
Breach alert
App locker
VPN
Anti-theft, etc.
In addition to your Android Smartphone, Bit defender also protects Android wear devices.
Besides, its autopilot mode recommends security actions based on usage.
Overall, Bit defender has a solid premium subscription and a capable free plan anyone can take
benefit of.
9.Nox
An all-in-one security app, nox security helps you protect your device from malware and various
other threats. It’s like having a single weapon that can tackle all the nasty security concerns.
This app can:
Keep your phone away from viruses and malware
Protect and lock your apps to prevent privacy breaches
Prevent others from viewing your notifications menu
Block spam and suspicious calls
Apart from these security features, Nox Security also helps you clean junk files, stop power-
draining apps, and even protect your phone from Wifi network attacks.
10.Bouncer
There are some apps that we use only a couple of times or for only a single purpose and then
keep it as it is, so in those cases, it doesn’t make much sense to keep the permissions intact.
However, generally, there’s no option to remove the permissions, but thankfully there’s an app
for it. Bouncer allows you to keep or remove permissions on demand and even disallow certain
actions of the app that may seem inappropriate to you. It also notifies you of any apps on your
device that drains your battery fast and those that appear to sell your information to third
parties.
Install Avast Mobile Security
1. On your Android device, tap the button below to open the Avast Mobile Security product
page in Google Play Store.
2. Tap Install to download and install the app. When installation is complete, tap Open.
3. Tap Get started to confirm that you accept Avast's Agreement and Privacy Policy, then
tap Next.
Purchase: Tap Upgrade options and select your preferred plan, then follow the
on-screen instructions to complete the purchase.
Use free version: Tap Continue with free ▸ Continue as free to start using the free
version of the app.
HMAC algorithm stands for Hashed or Hash-based Message Authentication Code. It is a result
of work done on developing a MAC derived from cryptographic hash functions. HMAC is a great
resistance towards cryptanalysis attacks as it uses the Hashing concept twice. HMAC consists of
twin benefits of Hashing and MAC and thus is more secure than any other authentication code.
RFC 2104 has issued HMAC, and HMAC has been made compulsory to implement in IP security.
The FIPS 198 NIST standard has also issued HMAC.
Objectives –
As the Hash Function, HMAC is also aimed to be one way, i.e, easy to generate output
from input but complex the other way round.
It aims at being less affected by collisions than the hash functions.
HMAC reuses the algorithms like MD5 and SHA-1 and checks to replace the embedded
hash functions with more secure hash functions, in case found.
HMAC tries to handle the Keys in a more simple manner.
HMAC algorithm –
The working of HMAC starts with taking a message M containing blocks of length b bits. An
input signature is padded to the left of the message and the whole is given as input to a hash
function which gives us a temporary message-digest MD’. MD’ again is appended to an output
signature and the whole is applied a hash function again, the result is our final message digest
MD.
Here is a simple structure of HMAC:
To a normal hash function, HMAC adds a compression instance to the processing. This structural
implementation holds efficiency for shorter MAC values.
26.program
HYDERABAD: Investigators looking into the Mahesh Bank hacking case have been left shocked
at how flimsy the security deployed by the bank to protect itself from hackers was.
During the investigation that stretched over two months, the cybercrime sleuths deployed over
100 personnel to different States in northern and north-eastern India, incurring an expenditure
of about Rs 58 lakh. Unfortunately, their efforts went in vain as they could not nab the kingpin
who had remotely accessed the bank using proxy IP addresses.
Cybercrime sleuths found several chinks in the cybersecurity of the bank, so much so that there
were times the sleuths clutched their heads in sheer frustration. Commissioner CV Anand, who
briefed the media about the case, said that in some instances, even basic security protocols were
not followed, putting public deposits at risk.
The Police Commissioner pointed out that the bank staff was not trained in cybersecurity and
this was the reason why two of its employees opened the phishing emails sent by the hacker,
allowing him access to the bank servers.
“The firewalls are so rudimentary, that even a beginner could have bypassed them,” said a
cybersecurity expert. The investigators found that the bank also compromised when it came to
putting in place proper network infrastructure. “Every user was given internet access,” the
expert said.
The bank did not have a virtual Local Area Network to mitigate hacking incidents and also did
not use Intrusion Detection System (IDS) mechanism and Intrusion Prevention System (IPS)
mechanism to prevent and detect vulnerability exploits.
Anand opined that the banking system is at great risk and said that the police department will
soon convene a meeting with bankers to create awareness among them.
He said that even RBI rules were not being followed to the letter, enhancing the risk to the
banks as well as customers. The investigators are now focusing on a Mumbai-based tech
company that is suspected to have sold the hacking software to the as-yet-unidentified Nigerian
hacker.
The police suspect this is the same software used in the Apex Bank hacking case as
well. Meanwhile, cybercrime sleuths are preparing the grounds to issue a Red Corner notice
against the unidentified Nigerian mastermind behind the Mahesh Bank hacking.
27.program
Facebook is a social media giant that runs a website and an application which allows users from
all over the globe to connect and share information of their choice with each other and the rest
of the world.
Facebook used to store the user's passwords in a text manner and that is accessible for the
employees working on Facebook. This was captured by Brian Kreds, an expert in
cybersecurity.
In the month of April, another cyber security breach was detected, where nearly 540 million
user accounts and their details appeared on an insecure public server where these accounts
are accessible easily.
3. Incident 3 - September 2019
After that In September 2019, A group of attackers accessed the nearly 419 million records of
Facebook which consists of the account details of users.
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
29.program
SSL Protocol :
SSL Protocol stands for Secure Sockets Layer protocol, which is an encryption-based
Internet security protocol that protects confidentiality and integrity of data.
SSL is used to ensure the privacy and authenticity of data over the internet.
SSL is located between the application and transport layers.
At first, SSL contained security flaws and was quickly replaced by the first version of TLS
that’s why SSL is the predecessor of the modern TLS encryption.
TLS/SSL website has “HTTPS” in its URL rather than “HTTP”.
SSL is divided into three sub-protocols: the Handshake Protocol, the Record Protocol,
and the Alert Protocol.
1. TLS Protocol :
Same as SSL, TLS which stands for Transport Layer Security is widely used for the
privacy and security of data over the internet.
TLS uses a pseudo-random algorithm to generate the master secret which is a key used
for the encryption between the protocol client and protocol server.
TLS is basically used for encrypting communication between online servers like a web
browser loading a web page in the online server.
TLS also has three sub-protocols the same as SSL protocol – Handshake Protocol, Record
Protocol, and Alert Protocol.
2. SHTTP :
SHTTP stands for Secure Hypertext Transfer Protocol, which is a collection of security
measures like Establishing strong passwords, setting up a firewall, thinking of antivirus
protection, and so on designed to secure internet communication.
SHTTP includes data entry forms that are used to input data, which has previously been
collected into a database. As well as internet-based transactions.
SHTTP’s services are quite comparable to those of the SSL protocol.
Secure Hypertext Transfer Protocol works at the application layer (that defines the
shared communications protocols and interface methods used by hosts in a network)
and is thus closely linked with HTTP.
SHTTP can authenticate and encrypt HTTP traffic between the client and the server.
SHTTP operates on a message-by-message basis. It can encrypt and sign individual
messages.
1.Set Protocol :
Secure Electronic Transaction (SET) is a method that assures the security and integrity
of electronic transactions made using credit cards.
SET is not a payment system; rather, it is a secure transaction protocol that is used via
the internet.
The SET protocol provides the following services:
It establishes a safe channel of communication between all parties engaged in an e-
commerce transaction.
It provides confidentiality since the information is only available to the parties engaged
in a transaction when and when it is needed.
The SET protocol includes the following participants:
Cardholder
Merchant
Issuer
Acquire
Payment Gateway
Certification Authority
PEM Protocol :
PEM Protocol stands for privacy-enhanced mail and is used for email security over the
internet.
RFC 1421, RFC 1422, RFC 1423, and RFC 1424 are the four particular papers that
explain the Privacy Enhanced Mail protocol.
It is capable of performing cryptographic operations such as encryption,
nonrepudiation, and message integrity.
PGP Protocol:
PGP Protocol stands for Pretty Good Privacy, and it is simple to use and free, including
its source code documentation.
It also meets the fundamental criteria of cryptography.
When compared to the PEM protocol, the PGP protocol has grown in popularity and use.
The PGP protocol includes cryptographic features such as encryption, non-repudiation,
and message integrity.
30.program
If you’re responsible for maintaining the network in your home, office, or business, you know
how critical it is to track how many devices are connected to your WIFI.
The following are the two ways:
The first is to use your router’s web interface, which, in my opinion, is the best method.
It is a simple way to allow you to see everything that is connected. Most will have a
record of previously connected devices, even if they are not currently active.
The second method is to use a network scanning app. These apps are especially useful
for those who scan often, as they provide more tools to do it with.
31.program
Detect the number of connections
Open a browser, type the IP address of the router and log in to your Router.
Note: Find the IP address, username, and password of the router on the back of your
router.
Logging in to the router
The settings will depend on each router, but mostly it can be found in Status or Info of
connections. For us, we go to Device info and click on DHCP.
Note: For some users, the option will be wireless clients.
The settings will depend on each router, but mostly it can be found in Status or Info of
connections. For us, we go to Device info and click on DHCP.
Note: For some users, the option will be wireless clients.
Opening the DHCP option
Here you can see the information about all the devices that are connected to the router.
32.program
Decentralized Finance (DeFi) platform Grim Finance announced on the evening of December 18,
2021, that it suffered a hack resulting in over $30 million in losses. This is the third hack in the
last week and the fifth for the month of December bringing total losses to over $600 million.
Key Findings
Over $600 million in cryptocurrency stolen in platform attacks in the first three weeks
of December from Badger DAO, Bit Mart, Ascend EX, Vulcan Forged, and Grim Finance.
Cross-chain swaps and Tornado Cash dominated on-chain movements by attackers.
Attackers continue to target crypto platforms as 2021 comes to a close through phishing and
contract exploits.
Analysis by Grim Finance identified the platform compromise was carried out by an advanced
attacker.
“The attacker attacked using the function titled before Deposit () from our vault strategy
entering a malicious token contract. The attacker creates a malicious token contract that
executed five reentrancy loops from safe Transfer From (), where in all 5 reentrancy, the _pool
value is set to the current balance (). On the last safe Transfer From(), the reentrancy loop is
broken, and some want can be transferred to the strategy, which will increase the _amount to
put the vault in a state to mint shares. On the unwinding of the 5 reentrancy, each loop will see
that the _amount is not 0, and mint the corresponding shares, mint the same share count 5x (the
number of reentrancy loops).”
Approximately one hour prior to the malicious token contract was created, the attacker funded
both Ethereum (ETH) and Binance Smart Chain (BSC) wallets from Tornado Cash. The attacker
bridged the stolen crypto from Grim Finance from the Fantom Main net to the ETH main net for
USDC and DAI.
Key Findings
Over $600 million in cryptocurrency stolen in platform attacks in the first three weeks of
December from Badger DAO, Bit Mart, Ascend EX, Vulcan Forged, and Grim Finance.
Cross-chain swaps and Tornado Cash dominated on-chain movements by attackers.
Attackers continue to target crypto platforms as 2021 comes to a close through phishing and
contract exploits.
Decentralized Finance (DeFi) platform Grim Finance announced on the evening of December 18,
2021, that it suffered a hack resulting in over $30 million in losses. This is the third hack in the
last week and the fifth for the month of December bringing total losses to over $600 million.
Analysis by Grim Finance identified the platform compromise was carried out by an advanced
attacker.
“The attacker attacked using the function titled beforeDeposit() from our vault strategy entering
a malicious token contract. The attacker create a malicious token contract that executed five
reentrancy loops from safeTransferFrom(), where in all 5 rentrancy, the _pool value is set to the
current balance(). On the last safeTransferFrom(), the rentrancy loop is broken, and some want
can be transferred to the strategy, which will increase the _amount to put the vault in a state to
mint shares. On the unwinding of the 5 rentrancies, each loop will see that the _amount is not 0,
and mint the corresponding shares, mint the same share count 5x (the number of rentrancy
loops).”
Approximately one hour prior to the malicious token contract was created, the attacker funded
both Ethereum (ETH) and Binance Smart Chain (BSC) wallets from Tornado Cash. The attacker
bridged the stolen crypto from Grim Finance from the Fantom Mainnet to the ETH mainnet for
USDC and DAI.
33.program
Input:
A String of lower case letters, called Text.
An Integer between 0-25 denoting the required shift.
Procedure:
Traverse the given text one character at a time .
For each character, transform the given character as per the rule, depending on whether
we’re encrypting or decrypting the text.
Return the new string generated.
A program that receives a Text (string) and Shift value( integer) and returns the
encrypted text.
# traverse text
fori inrange(len(text)):
char =text[i]
returnresult
#check the above function
text ="ATTACKATONCE"
s =4
print("Text : "+text)
print("Shift : "+str(s))
print("Cipher: "+encrypt(text,s))
Output
Text : ATTACKATONCE
Shift: 4
Cipher: EXXEGOEXSRGI
34.program
Data encryption standard (DES) has been found vulnerable to very powerful attacks and
therefore, the popularity of DES has been found slightly on the decline. DES is a block cipher and
encrypts data in blocks of size of 64 bits each, which means 64 bits of plain text go as the input
to DES, which produces 64 bits of ciphertext. The same algorithm and key are used for
encryption and decryption, with minor differences. The key length is 56 bits.
The basic idea is shown in the figure:
We have mentioned that DES uses a 56-bit key. Actually, The initial key consists of 64 bits.
However, before the DES process even starts, every 8th bit of the key is discarded to produce a
56-bit key. That is bit positions 8, 16, 24, 32, 40, 48, 56, and 64 are discarded.
Thus, the discarding of every 8th bit of the key produces a 56-bit key from the original 64-
bit key.
DES is based on the two fundamental attributes of cryptography: substitution (also called
confusion) and transposition (also called diffusion). DES consists of 16 steps, each of which is
called a round. Each round performs the steps of substitution and transposition. Let us now
discuss the broad-level steps in DES.
In the first step, the 64-bit plain text block is handed over to an initial Permutation (IP)
function.
The initial permutation is performed on plain text.
Next, the initial permutation (IP) produces two halves of the permuted block; saying Left
Plain Text (LPT) and Right Plain Text (RPT).
Now each LPT and RPT go through 16 rounds of the encryption process.
In the end, LPT and RPT are rejoined and a Final Permutation (FP) is performed on the
combined block
The result of this process produces 64-bit ciphertext.
As we have noted after IP is done, the resulting 64-bit permuted text block is divided into two
half blocks. Each half-block consists of 32 bits, and each of the 16 rounds, in turn, consists of the
broad-level steps outlined in the figure.
Step-1: Key transformation:
We have noted initial 64-bit key is transformed into a 56-bit key by discarding every 8th bit of
the initial key. Thus, for each a 56-bit key is available. From this 56-bit key, a different 48-bit
Sub Key is generated during each round using a process called key transformation. For this, the
56-bit key is divided into two halves, each of 28 bits. These halves are circularly shifted left by
one or two positions, depending on the round.
For example: if the round numbers 1, 2, 9, or 16 the shift is done by only one position for other
rounds, the circular shift is done by two positions. The number of key bits shifted per round is
shown in the figure.
After an appropriate shift, 48 of the 56 bits are selected. for selecting 48 of the 56 bits the table
is shown in the figure given below. For instance, after the shift, bit number 14 moves to the first
position, bit number 17 moves to the second position, and so on. If we observe the table , we will
realize that it contains only 48-bit positions. Bit number 18 is discarded (we will not find it in
the table), like 7 others, to reduce a 56-bit key to a 48-bit key. Since the key transformation
process involves permutation as well as a selection of a 48-bit subset of the original 56-bit key it
is called Compression Permutation.
Because of this compression permutation technique, a different subset of key bits is used in each
round. That makes DES not easy to crack.
Step-2: Expansion Permutation:
Recall that after the initial permutation, we had two 32-bit plain text areas called Left Plain
Text(LPT) and Right Plain Text(RPT). During the expansion permutation, the RPT is expanded
from 32 bits to 48 bits. Bits are permuted as well hence called expansion permutation. This
happens as the 32-bit RPT is divided into 8 blocks, with each block consisting of 4 bits. Then,
each 4-bit block of the previous step is then expanded to a corresponding 6-bit block, i.e., per 4-
bit block, 2 more bits are added.
This process results in expansion as well as a permutation of the input bit while creating output.
The key transformation process compresses the 56-bit key to 48 bits. Then the expansion
permutation process expands the 32-bit RPT to 48-bits. Now the 48-bit key is XOR with 48-bit
RPT and the resulting output is given to the next step, which is the S-Box substitution.
Javascript
Python
defhex2bin(s):
mp={'0': "0000",
'1': "0001",
'2': "0010",
'3': "0011",
'4': "0100",
'5': "0101",
'6': "0110",
'7': "0111",
'8': "1000",
'9': "1001",
'A': "1010",
'B': "1011",
'C': "1100",
'D': "1101",
'E': "1110",
'F': "1111"}
bin=""
foriinrange(len(s)):
bin=bin+mp[s[i]]
returnbin
defbin2hex(s):
mp={"0000": '0',
"0001": '1',
"0010": '2',
"0011": '3',
"0100": '4',
"0101": '5',
"0110": '6',
"0111": '7',
"1000": '8',
"1001": '9',
"1010": 'A',
"1011": 'B',
"1100": 'C',
"1101": 'D',
"1110": 'E',
"1111": 'F'}
hex=""
ch=""
ch=ch+s[i]
ch=ch+s[i+1]
ch=ch+s[i+2]
ch=ch+s[i+3]
hex=hex+mp[ch]
returnhex
defbin2dec(binary):
binary1 =binary
decimal, i, n =0, 0, 0
while(binary !=0):
binary =binary//10
i+=1
returndecimal
defdec2bin(num):
if(len(res) %4!=0):
div =len(res) /4
div =int(div)
foriinrange(0, counter):
res ='0'+res
returnres
permutation =""
foriinrange(0, n):
returnpermutation
# shifting the bits towards left by nth shifts
defshift_left(k, nth_shifts):
s =""
foriinrange(nth_shifts):
s =s +k[j]
s =s +k[0]
k =s
s =""
returnk
defxor(a, b):
ans=""
foriinrange(len(a)):
ifa[i] ==b[i]:
ans=ans+"0"
else:
ans=ans+"1"
returnans
exp_d=[32, 1, 2, 3, 4, 5, 4, 5,
6, 7, 8, 9, 8, 9, 10, 11,
2, 8, 24, 14,
32, 27, 3, 9,
# S-box Table
pt =hex2bin(pt)
# Initial Permutation
# Splitting
left =pt[0:32]
right =pt[32:64]
foriinrange(0, 16):
# Expansion D-box: Expanding the 32 bits data into 48 bits
xor_x=xor(right_expanded, rkb[i])
sbox_str=""
col =bin2dec(
val=sbox[j][row][col]
sbox_str=sbox_str+dec2bin(val)
left =result
# Swapper
if(i !=15):
returncipher_text
pt ="123456ABCD132536"
key ="AABB09182736CCDD"
# Key generation
# --hex to binary
key =hex2bin(key)
2, 2, 2, 2,
1, 2, 2, 2,
2, 2, 2, 1]
# Splitting
rkb=[]
rk=[]
foriinrange(0, 16):
combine_str=left +right
# Compression of key from 56 to 48 bits
rkb.append(round_key)
rk.append(bin2hex(round_key))
print("Encryption")
print("Decryption")
rkb_rev=rkb[::-1]
rk_rev=rk[::-1]
Output
...60AF7CA5
Round 12 FF3C485F 22A5963B C2C1E96A4BF3
Round 13 22A5963B 387CCDAA 99C31397C91F
Round 14 387CCDAA BD2DD2AB 251B8BC717D0
Round 15 BD2DD2AB CF26B472 3330C5D9A36D
Round 16 19BA9212 CF26B472 181C5D75C66D
Decryption
Decryption
We will check the plain text in the next step. If it is plain text, then we
indicate message was successfully decrypted otherwise, unable to decrypt
the message:
if text:
print(f'Message text: {text}')
else:
print(f'Unable to decrypt the message.')
We verify our signature using the code below:
ifverify(text, signature, publicKey):
print(Successfully verified signature)
else:
print('The message signature could not be verified')
With that, you can enter your message, encrypt, and then decrypt it.
36.program
1. Learn to Inspect Message Headers
Your email message headers are usually hidden by default, but you can Google ways to view the
original message headers for your specific email client. For example, if you’re using the Outlook
365 email client:
Double-click on an email to open it in a new window.
Go to the File menu and select Properties.
In the Properties window, you’ll see a field at the bottom that contains email header
information.
Once you can see the headers, look for the “Received From” field that tracks the route the
message traveled across the net via servers to reach you. If you get a suspicious email, search
for the sender’s IP and do a reverse lookup to trace the message back to where it originated. You
can also check if the message fails sender policy framework (SPF) and domain keys
identification mail (DKIM) checks.
Though most mail programs have email security indications like a red question mark for
unauthenticated emails in Gmail, knowing how to examine email headers is a useful skill to
have.
37.program
1. The first party picks two prime numbers, g and p and tells them to the second party.
2. The second party then picks a secret number (let’s call it a), and then it computes ga mod p
and sends the result back to the first party; let’s call the result A. Keep in mind that the secret
number is not sent to anyone, only the result is.
3. Then the first party does the same; it selects a secret number b and calculates the result B
similor to the
4. step 2. Then, this result is sent to the second party.
5. The second party takes the received number B and calculates Ba mod p
6. The first party takes the received number A and calculates Ab mod p
This is where it gets interesting; the answer in step 5 is the same as the answer in step 4. This means
both parties will get the same answer no matter the order of exponentiation.
(ga mod p)b mod p = gab mod p
(gb mod p)a mod p = gba mod p
The number we came within steps 4 and 5 will be taken as the shared secret key. This key can be
used to do any encryption of data that will be transmitted, such as blowfish, AES, etc.
39.program
Algorithm
# of two numbers
defeuclid(m, n):
ifn ==0:
returnm
else:
r =m %n
returneuclid(n, r)
# Program to find
# Multiplicative inverse
defexteuclid(a, b):
r1 =a
r2 =b
s1 =int(1)
s2 =int(0)
t1 =int(0)
t2 =int(1)
whiler2 >0:
q =r1//r2
r =r1-q *r2
r1 =r2
r2 =r
s =s1-q *s2
s1 =s2
s2 =s
t =t1-q *t2
t1 =t2
t2 =t
ift1 <0:
t1 =t1 %a
return(r1, t1)
# numbers p and q
p =823
q =953
n =p *q
Pn=(p-1)*(q-1)
# in range 1<e<Pn
key =[]
foriinrange(2, Pn):
gcd=euclid(Pn, i)
ifgcd==1:
key.append(i)
e =int(313)
# Obtain inverse of
r, d =exteuclid(Pn, e)
ifr ==1:
d =int(d)
else:
M =19070
S =(M**d) %n
# Alice sends M and S both to Bob
# and product n.
M1 =(S**e) %n
ifM ==M1:
else:
Output:
decryption key is: 160009
As M = M1, Accept the message sent by Alice
40.program
Linear Congruential Generator is most common and oldest algorithm for generating pseudo-
randomized numbers. The generator is defined by the recurrence relation:
Xn+1 = (aXn + c) mod m
where X is the sequence of pseudo-random values
m, 0 <m - modulus
a, 0 < a <m - multiplier
c, 0 ≤ c <m - increment
x0, 0 ≤ x0<m - the seed or start value
We generate the next random integer using the previous random integer, the integer constants,
and the integer modulus. To get started, the algorithm requires an initial Seed, which must be
provided by some means. The appearance of randomness is provided by performing modulo
arithmetic.
#include <random>
#include <iostream>
int main() {
std::random_devicerd;
std::mt19937 mt(rd());
std::uniform_real_distribution<double>dist(1.0, 10.0);
for (int i=0; i<16; ++i)
std::cout<<dist(mt) << "\n";
}
// variation
int main(int argc, char const *argv[])
{
short newnum;
short randmax = argc> 1 ? stoi(argv[1]) : 10;;
cout<< "randmax: " <<randmax<<endl;
std::random_devicerd;
std::mt19937 mt(rd());
std::uniform_real_distribution<double>udist(0, randmax); // dist(1.0, 10.0)
C++11 has much more powerful random-number generation facilities. Here's an example:
#include <random>
#include <functional>
engine_type engine;
int main()
{
// seed rng first:
engine_type::result_type const seedval = get_seed();
engine.seed(seedval);
41.program
What is Cyber Law?
Cyber laws, more commonly known as internet laws, are laws that are related to legal
informatics, regulating the digital distribution of information, e-commerce, software, and
information security. It usually covers many related areas, such as usage and access to the
Internet, freedom of speech, and privacy.
Why Cybercrime Laws?
Many security and privacy issues arise with the use of the internet. Ingenious criminals have
been known to use advanced strategies to carry out unauthorized activities and potential fraud.
Therefore, the need to protect against them is substantial, and the most effective method of
doing so is to enforce a cyber security policy. These policies and laws are made to protect
individuals and businesses online by holding these criminals accountable for their malicious
actions and sentencing them to appropriate punishment as decided by the federal government.
CYBER FORENSICS
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
3.
4.
5.
6.
7.
8.
9.
10.
45.
46.program
Check if email address valid or not in
Given a string, write a Python program to check if the string is a valid email address or not. An email
is a string (a subset of ASCII characters) separated into two parts by @ symbol, a “personal_info” and
a domain, that is personal_info@domain.
Examples:
Input:[email protected]: Valid Email
Input:[email protected]
Output: Valid Email
Input:ankitrai326.com
Output: Invalid Email
Method 1: Check for a valid email address using regular expression
This method either returns None (if the pattern doesn’t match) or re.MatchObject contains
information about the matching part of the string. This method stops after the first match, so this is
best suited for testing a regular expression more than extracting data.
1. Python3
importre
regex =r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,7}\b'
defcheck(email):
if(re.fullmatch(regex, email)):
print("Valid Email")
else:
print("Invalid Email")
# Driver Code
if__name__ =='__main__':
# Enter the email
email ="[email protected]"
check(email)
email ="[email protected]"
check(email)
email ="ankitrai326.com"
check(email)
Output
Valid Email
Valid Email
Invalid Email
47.program
View devices connected to your network and review data usage
You can check how many personal devices are connected to your Wi-Fi network in the Google
Home app or the Google Wifi app.
Check connected devices and data usage
With the Google Home app
The Google Home app shows how much data your devices upload and download. Devices that
used the network within the last 30 days will be displayed, including ones not currently
connected.
1.Open the Google Home app .
2.Tap Wi-Fi .
3.At the top, tap Devices.
4.Tap a specific device and a tab to find additional details.
Speed: Real-time usage is how much data your device is currently using. Usage is how
much data the device has used over the selected time frame.
Info: Device details, like connection status, IP address and MAC address.
With the Google WIFI app
Review network data usage
With Nest WIFI and Google WIFI you can review the total amount of data that has gone through
your network over different time frames: real-time, today, 7 days, and 30 days.
With the Google Home app
1. Open the Google Home app .
2. Tap Wi-Fi .
3. Tap Internet.
Real-time usage: How much data your network is currently uploading and downloading.
Usage: How much data the device has uploaded and downloaded over the selected time frame.
With the Google WIFI app
1.Open the Google WIFI app .
2.Tap Network Internet.
3.On the 'Usage' tab, near the top, tap the time frame and select the desired period. The default
is 'Real-time'.
48.program
49.program
50.program
Header Forging
The actual delivery of emails doesn't depend on any of these headers. They are just convenient.
Usually, the From line, for example, will be sent to the sender's address so you know who the
message is from and can reply quickly.
Spammers want to make sure you cannot reply easily, and certainly don't want you to know
who they are. That's why they insert fictitious email addresses in the From lines of their junk
messages.
Received Lines
The From line is useless in determining the real source of an email. You don't need to rely on it.
The headers of every email message also contain Received lines.
Email programs do not usually display these, but they can be beneficial in tracing spam.