Configure the CSRF defense tool seride

Source: Internet
Author: User

WoYiGuis BLoG

I. Description

This program is used to prevent Riding/CSRF attacks.

Ii. Usage

First download the system: http://projects.playhack.net/project.php? Id = 3, and then include the file in the PHP page to be prevented. If my form file is seride_test.php and my form is seride_recv.php, then I can do this:

Seride_test.php:

<? PHP
Include ("seride. php ");
?>
<Div align = "center">
<Form name = "login" action = "seride_recv.php" method = "POST">
<Input name = "test" type = "text">
<Input type = "submit">
<? = Seride_form ();?>
</Form>
</Div>
First include the seride. php file, and thenJoin One row. Check in seride_recv.php:

Seride_recv.php:
<? PHP
Include ("seride. php ");
Seride_check ();
Echo $ _ POST [test];
?>
When we use seride_test.php to submit a table normally, the page is normally executed. If we create a seride_test.html page, the content is as follows:
<Div align = "center">
<Form name = "login" action = "seride_recv.php" method = "POST">
<Input name = "test" type = "text">
<Input type = "submit">
</Form>

If you submit an external form, the browser will return the following information:

This effectively prevents CSRF attacks.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.