MY200541A

Method and device for preventing server from being attacked

Abstract

The present disclosure discloses a method and device for preventing a server from being attacked, and relates to the field of network security technologies, to resolve a problem of low server security. Main technical solutions of the present disclosure are as follows: dynamically and randomly allocating a page script corresponding to a page request from a plurality of page scripts corresponding to the page request, when receiving the page request sent by a browser (101); sending the dynamically and randomly allocated page script to the browser (102), so that the browser executes the page script to obtain a script execution parameter; determining whether a page verification request is expired, when receiving the page verification request sent by the browser (103); and if expired, outputting error prompt information indicating page expiration (104a); or if not expired, verifying whether the script execution parameter included in the page verification request is valid (104b); and if invalid, rejecting the page request (105b). The present disclosure is mainly used to prevent the server from being attacked.

MY200541A, drawing sheet 1
Sheet 1 of 6

Term

No projected expiry on record.

  1. Priority
  2. Filed
  3. Published
  4. Today

9 claims: 2 independent, 7 dependent

  1. 1
    CLAIMS 1. A computer implemented method for preventing a server from being attacked, the method comprising:in response to receiving a page request sent by a browser, obtaining (201) a page URL in the page request;randomly extracting a page script from a plurality of page scripts that exist in a predetermined script library and are corresponding to the page URL, wherein different script execution parameter acquisition logic is used in the plurality of page scripts (202);sending (203) the randomly extracted page script to the browser, so that the browser executes the page script to obtain a script execution parameter;in response to receiving a page verification request sent by the browser, determining (204) whether the page verification request is expired;in response to determining that the page verification request is expired, outputting (205a) error prompt information indicating page expiration;or in response to determining that the page verification request is unexpired, verifying (205b) whether the script execution parameter comprised in the page verification request is valid;and if the script execution parameter is invalid, rejecting the page request (206b).
  2. 9
    A device for preventing a server from being attacked, the device comprising a plurality of modules configured to perform the method of any one of claims 1 to 8.