What is the Cross Frame Scripting attack?

by | Mar 9, 2017 | CCNA, CCNP, CompTIA, Most Common Vulnerabilities

What is the Cross Frame Scripting attack?

The Cross Frame Scripting attack is an attack in which the attacker exploits the security vulnerabilities of a browser and tricks a user into navigating a webpage that the attacker controls. Afterward, the attacker uses HTML iFrames and JavaScript to steal sensitive data of the user.

The security vulnerabilities used in the Cross Frame Scripting attack

As per the standard security model of a browser, if a user opens several web pages, one webpage of the user cannot use JavaScript to access the contents of other web pages. The other web pages may be opened using the same browser, in different windows, or in different frames. If the web pages are opened from the same server or the same domain, only then JavaScript can be used to access the contents of the other web pages.

However, some web browsers have certain security vulnerabilities that allow an attacker to access the contents of other webpages of a user. This can happen even though the web pages are opened from different servers or domains. As a result, if the user types login credentials in one of the web pages, the attacker can use JavaScript to steal the credentials by loading a third-party page in an HTML iFrame.

How does the Cross Frame Scripting attack work?

The Cross Frame Scripting attack can be perpetrated in a number of different ways :

Example 1:

An attacker may create a webpage on his own website. On that webpage, the attacker may use an HTML iFrame to display the login page of a well-known website.

The attacker may use some tricks like hiding the frame border or expanding the frame to cover the whole page to convince the innocent user that he is opening a web page of a well-known website.

If the victim does not understand the attacker’s trick, he may type login credentials on the fraudulent webpage. And, the attacker can use JavaScript to notify events on whatever the user types in the web page.

As per the standard web browser security model, the attacker should not get notified about whatever the user types on a web page. However, the security vulnerabilities discussed above may make that possible.

Example 2:

In this attack, the attacker creates a web page on his website and includes a hidden iframe on that web page. The iframe may open the login web page of a well-known website. The attackers can use Cross-Site Scripting or XSS vulnerabilities of the well-known website to inject malicious scripts on that web page.

If the victim does not understand the trickery of the attacker and enters login credentials on the …

Facebooktwitterredditpinterestlinkedinmail

Calculate the pseudoinverse of a matrix using Python

What is the pseudoinverse of a matrix? We know that if A is a square matrix with full rank, then A-1 is said to be the inverse of A if the following condition holds: $latex AA^{-1}=A^{-1}A=I $ The pseudoinverse or the Moore-Penrose inverse of a matrix is a...

Cholesky decomposition using Python

What is Cholesky decomposition? A square matrix A is said to have Cholesky decomposition if it can be written as a product of a lower triangular matrix and its conjugate transpose. $latex A=LL^{*} $ If all the entries of A are real numbers, then the conjugate...

Tensor Hadamard Product using Python

In one of our previous articles, we already discussed what the Hadamard product in linear algebra is. We discussed that if A and B are two matrices of size mxn, then the Hadamard product of A and B is another mxn matrix C such that: $latex H_{i,j}=A_{i,j} \times...

Perform tensor addition and subtraction using Python

We can use numpy nd-array to create a tensor in Python. We can use the following Python code to perform tensor addition and subtraction. import numpy A = numpy.random.randint(low=1, high=10, size=(3, 3, 3)) B = numpy.random.randint(low=1, high=10, size=(3, 3, 3)) C =...

How to create a tensor using Python?

What is a tensor? A tensor is a generalization of vectors and matrices. It is easily understood as a multidimensional array. For example, in machine learning, we can organize data in an m-way array and refer it as a data tensor. Data related to images, sounds, movies,...

How to combine NumPy arrays using horizontal stack?

We can use the hstack() function from the numpy module to combine two or more NumPy arrays horizontally. For example, we can use the following Python code to combine three NumPy arrays horizontally. import numpy A = numpy.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) B =...

How to combine NumPy arrays using vertical stack?

Let’s say we have two or more NumPy arrays. We can combine these NumPy arrays vertically using the vstack() function from the numpy module. For example, we can use the following Python code to combine three NumPy arrays vertically. import numpy A = numpy.array([[1, 2,...

Singular Value Decomposition (SVD) using Python

What is Singular Value Decomposition (SVD)? Let A be an mxn rectangular matrix. Using Singular Value Decomposition (SVD), we can decompose the matrix A in the following way: $latex A_{m \times n}=U_{m \times m}S_{m \times n}V_{n \times n}^T $ Here, U is an mxm matrix....

Eigen decomposition of a square matrix using Python

Let A be a square matrix. Let’s say A has k eigenvalues λ1, λ2, ... λk. And the corresponding eigenvectors are X1, X2, ... Xk. $latex X_1=\begin{bmatrix} x_{11} \\ x_{21} \\ x_{31} \\ ... \\ x_{k1} \end{bmatrix} \\ X_2=\begin{bmatrix} x_{12} \\ x_{22} \\ x_{32} \\ ......

How to calculate eigenvalues and eigenvectors using Python?

In our previous article, we discussed what eigen values and eigenvectors of a square matrix are and how we can calculate the eigenvalues and eigenvectors of a square matrix mathematically. We discussed that if A is a square matrix, then $latex (A- \lambda I) \vec{u}=0...

Amrita Mitra

Author

Ms. Amrita Mitra is an author, who has authored the books “Cryptography And Public Key Infrastructure“, “Web Application Vulnerabilities And Prevention“, “A Guide To Cyber Security” and “Phishing: Detection, Analysis And Prevention“. She is also the founder of Asigosec Technologies, the company that owns The Security Buddy.

0 Comments

Submit a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Not a premium member yet?

Please follow the link below to buy The Security Buddy Premium Membership.

Featured Posts

Translate »