CN111444392A - Method, device and equipment for accessing cave library - Google Patents

Method, device and equipment for accessing cave library Download PDF

Info

Publication number
CN111444392A
CN111444392A CN202010223399.5A CN202010223399A CN111444392A CN 111444392 A CN111444392 A CN 111444392A CN 202010223399 A CN202010223399 A CN 202010223399A CN 111444392 A CN111444392 A CN 111444392A
Authority
CN
China
Prior art keywords
vulnerability
template
type
vulnerabilities
array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010223399.5A
Other languages
Chinese (zh)
Other versions
CN111444392B (en
Inventor
潘奂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010223399.5A priority Critical patent/CN111444392B/en
Publication of CN111444392A publication Critical patent/CN111444392A/en
Application granted granted Critical
Publication of CN111444392B publication Critical patent/CN111444392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/57Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
    • G06F21/577Assessing vulnerabilities and evaluating computer system security

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses access method, device and equipment of a vulnerability library, the vulnerability library comprises a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying vulnerabilities, and index values are used for indicating whether the corresponding vulnerabilities are in the templates, and the method comprises the following steps: responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from a template table, and acquiring a vulnerability in a vulnerability table; determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability; and returning a response carrying the first type of vulnerability and the second type of vulnerability. According to the method and the device, response efficiency of the user to the access of the vulnerability library can be improved, and therefore access experience of the user to the vulnerability library is improved.

Description

Method, device and equipment for accessing cave library
Technical Field
The application relates to the field of data processing, in particular to a method, a device and equipment for accessing a vulnerability library.
Background
With the development of computer and internet technologies, various devices and software are layered endlessly, and it is inevitable that vulnerabilities exist in the development of the devices and software, and thus vulnerability scanning tasks for the devices or software are also increased year by year.
The vulnerability database is used for storing existing types of vulnerabilities, and vulnerability scanning is to scan equipment or software based on the existing types of vulnerabilities in the vulnerability database so as to determine whether corresponding vulnerabilities exist in the equipment or software. Since the magnitude of the vulnerability stored in the vulnerability database is large, and the possible vulnerabilities are different for different devices or software, it is obviously impractical to scan various devices or software for vulnerabilities based on all vulnerabilities in the vulnerability database. For this reason, before conducting vulnerability scanning, a vulnerability set is generally determined from a vulnerability library, so that vulnerability scanning is conducted based on the determined vulnerability set.
At present, in order to meet the requirements of users, templates containing vulnerability identification are stored in a vulnerability database, and users can select corresponding templates in the vulnerability database according to the requirements and then perform vulnerability scanning based on vulnerabilities corresponding to vulnerability identification in the templates. Further, there is a need to display the vulnerability in the selected template and other vulnerabilities in the vulnerability database to the user, so that the user can further select and add other vulnerabilities in the vulnerability database in a visual manner on the basis of the selected template to meet the vulnerability scanning requirement.
However, the current solution to the above need is to determine the vulnerabilities in the selected template by traversing all vulnerabilities of the vulnerability library multiple times, so as to display the vulnerabilities in the selected template and other vulnerabilities in the vulnerability library for the user. Specifically, for each vulnerability identification included in the selected template, all vulnerabilities in the vulnerability library need to be traversed once to determine the vulnerability corresponding to the vulnerability identification, and the vulnerability identification is marked to be in the selected template, so that the purpose of displaying the vulnerability in the selected template and other vulnerabilities in the vulnerability library for the user is finally achieved.
Obviously, responding to the operation of the user for accessing the vulnerability library in a mode of traversing all the vulnerabilities in the vulnerability library for many times can affect the response efficiency of the vulnerability library and further affect the access experience of the user for the vulnerability library.
Disclosure of Invention
In view of this, the application provides a method, a device and equipment for accessing a vulnerability library, which can improve the response efficiency of a user to the access of the vulnerability library, thereby improving the access experience of the user to the vulnerability library.
In a first aspect, to achieve the above object, the present application provides an access method for a vulnerability library, where the vulnerability library includes a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, indexes of the arrays are used for identifying vulnerabilities, index values of the arrays are used for indicating whether corresponding vulnerabilities are in the templates, and the method includes:
responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table;
determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability;
and returning a response carrying the first type of vulnerability and the second type of vulnerability.
In an optional embodiment, the obtaining, in response to a preset access request with a template identifier, an array corresponding to a template with the template identifier from the template table, and obtaining a vulnerability in the vulnerability table include:
responding to a preset access request carrying a template identifier, and determining whether an array corresponding to the template with the template identifier is stored in a cache;
if the array is stored in the cache, acquiring the array from the cache and acquiring the vulnerability in the vulnerability table;
and if the array is not stored in the cache, acquiring the array corresponding to the template with the template identifier from the template table, and acquiring the vulnerability in the vulnerability table.
In an optional implementation manner, after returning a response carrying the first type vulnerability and the second type vulnerability, the method further includes:
responding to a preset new adding request carrying the vulnerability identification of the second type of vulnerability, and determining an index corresponding to the vulnerability identification in the array;
and setting an index value corresponding to the index as a first preset value, wherein the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
In an optional implementation manner, after returning a response carrying the first type vulnerability and the second type vulnerability, the method further includes:
responding to a preset deleting request carrying the vulnerability identification of the first vulnerability, and determining an index corresponding to the vulnerability identification in the array;
and setting an index value corresponding to the index as a second preset value, wherein the second preset value is used for indicating that the vulnerability corresponding to the index is not in the template.
In an optional embodiment, the first type of vulnerability and the second type of vulnerability in the vulnerability table are determined based on the index and the index value of the array; wherein the first type of vulnerability includes vulnerabilities in the template, and the second type of vulnerability includes vulnerabilities other than the first type of vulnerability, including:
determining whether the vulnerability identified by the corresponding index is in the template based on the index value of the array;
if the vulnerabilities identified by the indexes are in the template, determining the vulnerabilities identified by the indexes in the vulnerability table as vulnerabilities of a first type;
and determining the bugs except the first type bugs in the bug table as second type bugs.
In a second aspect, the present application provides an access device for a vulnerability library, the vulnerability library includes a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying vulnerabilities, the index values of the arrays are used for representing whether corresponding vulnerabilities are in the templates, the device includes:
the acquisition module is used for responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table;
the first determining module is used for determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability;
and the return module is used for returning a response carrying the first type of vulnerability and the second type of vulnerability.
In an optional implementation manner, the obtaining module includes:
the determining submodule is used for responding to a preset access request carrying a template identifier and determining whether an array corresponding to the template with the template identifier is stored in a cache or not;
the first obtaining submodule is used for obtaining the array from the cache and obtaining the bug in the bug table when the array is stored in the cache;
and the second obtaining submodule is used for obtaining the array corresponding to the template with the template identifier from the template table and obtaining the loophole in the loophole table when the array is not stored in the cache.
In an alternative embodiment, the apparatus further comprises:
the second determining module is used for responding to a preset new adding request carrying the vulnerability identification of the second type of vulnerability and determining the index corresponding to the vulnerability identification in the array;
and the setting module is used for setting the index value corresponding to the index as a first preset value, and the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
In a third aspect, the present application also provides a computer-readable storage medium having stored therein instructions that, when run on a terminal device, cause the terminal device to perform the method according to any one of the above.
In a fourth aspect, the present application further provides an apparatus comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the method as in any one of the above.
According to the method for accessing the vulnerability library, the response efficiency of the vulnerability library is improved by adjusting the storage mode of the template. Specifically, corresponding arrays are respectively set for each template in the vulnerability database, wherein indexes of the arrays corresponding to the templates are used for identifying vulnerabilities, and index values of the arrays are used for indicating whether the corresponding vulnerabilities are in the templates. Based on the indexes and index values in the array corresponding to the template, whether the vulnerability corresponding to each index in the vulnerability table is in the template can be directly determined, the vulnerability library does not need to be traversed for many times, the response efficiency of the vulnerability library is improved, and the access experience of a user to the vulnerability library is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of an access method for a vulnerability library according to an embodiment of the present application;
FIG. 2 is a flowchart of another method for accessing a vulnerability library according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for accessing a vulnerability library according to an embodiment of the present application;
FIG. 4 is a flowchart of another method for accessing a vulnerability library according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an access device for a cave library according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an access device of a vulnerability library according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, templates containing vulnerability identification are stored in a vulnerability library, and for the vulnerability identification contained in the templates, it is required to determine that each vulnerability identification respectively corresponds to a vulnerability in the vulnerability library in a manner of traversing all vulnerabilities in the vulnerability library for many times so as to distinguish vulnerabilities in the template from other vulnerabilities in the vulnerability library, and finally, the vulnerabilities are distinctively displayed to a user, so that the user can know which vulnerabilities belong to the selected template, and can perform operations such as adding, deleting and the like on the vulnerabilities in the selected template according to requirements, and finally, vulnerabilities for vulnerability scanning are obtained.
The method for accessing the vulnerability library comprises the steps that all vulnerabilities in the vulnerability library are traversed for multiple times to determine the vulnerability in the selected template in the vulnerability library, so that the response efficiency of the vulnerability library is influenced, and further the access experience of a user on the vulnerability library is possibly influenced. Specifically, corresponding arrays are respectively set for each template in the vulnerability database, wherein indexes of the arrays corresponding to the templates are used for identifying vulnerabilities, and index values of the arrays are used for indicating whether the corresponding vulnerabilities are in the templates. Based on the indexes and index values in the array corresponding to the template, whether the vulnerability corresponding to each index in the vulnerability table is in the template can be directly determined, the vulnerability library does not need to be traversed for many times, the response efficiency of the vulnerability library is improved, and the access experience of a user to the vulnerability library is further improved.
Based on this, the embodiment of the application provides an access method of a vulnerability library, the vulnerability library includes a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying vulnerabilities, and the index values of the arrays are used for representing whether corresponding vulnerabilities are in the templates.
Referring to fig. 1, a flowchart of an access method for a vulnerability library provided in an embodiment of the present application is shown, where the method includes:
s101: and responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table.
In order to improve the response speed of the vulnerability database, the embodiment of the application sets an array for each template in the template table, identifies vulnerabilities in the vulnerability database by using the indexes of the arrays, and indicates whether vulnerabilities identified by corresponding indexes are stored in the templates corresponding to the arrays by using the index values of the arrays.
Assuming that 10 vulnerabilities are included in the vulnerability table of the vulnerability library, in fact, the vulnerabilities in the vulnerability table are generally in the order of hundreds of thousands, and the above "10" are only used as examples, and do not constitute a limitation to the scope of the embodiments of the present application. The template table of the vulnerability library includes a template of "camera related vulnerability", the array corresponding to the template is [0,1,1,0,0,0,0,1,1,1], it is assumed that an index value of 0 indicates that the vulnerability identified by the corresponding index is not in the template, and an index value of 1 indicates that the vulnerability identified by the corresponding index is in the template. Therefore, it can be known from the array corresponding to the template, where the template includes 2 nd, 3 rd, 8 th, 9 th, and 10 th vulnerabilities in the vulnerability table.
In the embodiment of the application, when a preset access request carrying the template identifier is received, an array corresponding to the template with the template identifier is obtained from a template table of the vulnerability library. The preset access request is used for accessing the vulnerability database to obtain vulnerabilities contained in the template corresponding to the template identifier carried by the preset access request and other vulnerabilities in the vulnerability database, and finally the vulnerabilities are displayed on a user interface in a distinguishing mode, so that a user can know the vulnerabilities for subsequent vulnerability scanning and perform subsequent operations such as deleting and adding the vulnerabilities contained in the template, and vulnerability scanning requirements of the user are met to the greatest extent.
In an alternative embodiment, the storage format of the array corresponding to each template in the template table of the vulnerability library may be json format. That is, the array corresponding to each template is converted into json format and stored in the template table of the leak library. And when a preset access request carrying the template identification is received, acquiring an array in a json format corresponding to the template identification from the template table, and converting the array in the json format into an array format for response of a subsequent vulnerability library.
In addition, the response to the preset access request needs to include not only the vulnerability in the template but also the vulnerability not in the template, namely, the vulnerability and the vulnerability are displayed on the user interface in a distinguishing manner. Therefore, in the embodiment of the application, when a preset access request carrying a template identifier is received, the vulnerability in the vulnerability table also needs to be acquired, so that the vulnerability in the template and other vulnerabilities in the vulnerability table can be determined and displayed on the user interface in a differentiated manner.
S102: determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; wherein the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities other than the first type of vulnerability.
In the embodiment of the application, after the array corresponding to the template and the bugs in the bug table are obtained, whether each bug in the bug table is in the template is determined based on the index and the index value of the array.
In an optional embodiment, first, based on the index value of the array, it is determined whether the vulnerability identified by the corresponding index is in the template. And if the vulnerabilities identified by the indexes are in the template, determining the vulnerabilities identified by the indexes in the vulnerability table as first-class vulnerabilities, and determining vulnerabilities in the vulnerability table except the first-class vulnerabilities as second-class vulnerabilities.
For example, still taking a "camera related vulnerability" template with an array of [0,1,1,0,0,0,0,1,1,1] as an example, it can be determined through the array that 2 nd, 3 rd, 8 th, 9 th, 10 th vulnerabilities in the vulnerability table are in the template, and 1 st, 4 th, 5 th, 6 th, 7 th vulnerabilities are not in the template, so that it can be determined that 2 nd, 3 th, 8 th, 9 th, 10 th vulnerabilities in the vulnerability table are a first type vulnerability, and 1 st, 4 th, 5 th, 6 th, 7 th vulnerabilities are a second type vulnerability. Because whether each vulnerability in the vulnerability table is in the template can be determined only through the array, the vulnerability in the vulnerability table does not need to be traversed for many times, and the response efficiency of the vulnerability database is improved.
S103: and returning a response carrying the first type of vulnerability and the second type of vulnerability.
In the embodiment of the application, after the first-type bugs and the second-type bugs in the bug table are determined, responses carrying the first-type bugs and the second-type bugs are returned, and the first-type bugs and the second-type bugs are displayed on a user interface in a distinguishing mode.
According to the method for accessing the vulnerability library, the response efficiency of the vulnerability library is improved by adjusting the storage mode of the template. Specifically, corresponding arrays are respectively set for each template in the vulnerability database, wherein indexes of the arrays corresponding to the templates are used for identifying vulnerabilities, and index values of the arrays are used for indicating whether the corresponding vulnerabilities are in the templates. Based on the indexes and index values in the array corresponding to the template, whether the vulnerability corresponding to each index in the vulnerability table is in the template can be directly determined, the vulnerability library does not need to be traversed for many times, the response efficiency of the vulnerability library is improved, and the access experience of a user to the vulnerability library is further improved.
Based on the foregoing embodiment, a further embodiment of the present application further provides an access method for a vulnerability library, where after a user interface displays vulnerabilities and other vulnerabilities included in a selected template, a user may further perform operations such as adding, deleting, and the like on the vulnerabilities included in the selected template based on vulnerability scanning requirements, so as to further meet the vulnerability scanning requirements of the user.
Referring to fig. 2, a flowchart of another method for accessing a vulnerability library provided in an embodiment of the present application is shown, where the method includes:
s201: responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table;
s202: determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; wherein the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities other than the first type of vulnerability.
S203: and returning a response carrying the first type of vulnerability and the second type of vulnerability.
S201 to S203 in the embodiment of the present application can be understood by referring to S101 to S103 in the above embodiment, which are not described herein again.
S204: and determining an index corresponding to the vulnerability identification in the array in response to a preset new adding request carrying the vulnerability identification of the second type of vulnerability.
In the embodiment of the application, based on the first type of bugs and the second type of bugs displayed on the user interface, the user can increase the bugs for bug scanning by selecting any one or more second type of bugs, and the bug scanning requirements of the user are met. And the preset new adding request is used for requesting to add the second type of vulnerability to the template.
In practical application, when a preset new adding request carrying vulnerability identification of a second type of vulnerability is received, firstly, an array corresponding to a selected template is obtained from a template table, then the vulnerability needing to be added to the array is determined, and a corresponding index is arranged in the array.
For example, still taking a "camera related vulnerability" template with an array of [0,1,1,0,0,0,0,1,1,1] as an example, assuming that the second type of vulnerability carried in the new addition request is preset, that is, the vulnerabilities not in the selected template are respectively the 1 st vulnerability, the 4 th vulnerability and the 5 th vulnerability in the vulnerability table, it can be determined that the indexes of the vulnerabilities in the array are respectively 0, 3 and 4.
S205: and setting an index value corresponding to the index as a first preset value, wherein the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
In this embodiment of the application, the first preset value may be 1, and specifically, if the index value of the array corresponding to the template is 1, it indicates that the vulnerability corresponding to the index of the index value is in the template.
In practical application, after determining the index corresponding to the vulnerability identification carried in the preset new adding request, setting all index values corresponding to the index in the selected template as the first preset value.
For example, the index values of indexes 0, 3 and 4 in the array [0,1,1,0,0,0, 1,1,1, 1] in the above example are all set to 1, so as to obtain an updated array [1,1,1,1,1,0,0,1,1,1] to complete the update of the array, and the array is converted into json format and stored in the template table of the leak library.
In the embodiment of the application, the vulnerability contained in the template can be increased by resetting the index value of the array corresponding to the template, the processing is simple, and the response speed of the vulnerability library is improved.
On the basis of the method for adding operation processing to the bugs contained in the selected template, further embodiments of the present application provide a method for accessing a bug base.
Referring to fig. 3, a flowchart of a method for accessing a vulnerability library provided in an embodiment of the present application is provided, where the method includes:
s301: and responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table.
S302: determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; wherein the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities other than the first type of vulnerability.
S303: and returning a response carrying the first type of vulnerability and the second type of vulnerability.
S301 to S303 in the embodiment of the present application can be understood by referring to S101 to S103 in the above embodiment, which are not described herein again.
S304: and responding to a preset deleting request carrying the vulnerability identification of the first vulnerability, and determining the index corresponding to the vulnerability identification in the array.
In the embodiment of the application, based on the first-type bugs and the second-type bugs displayed on the user interface, the user can delete the bugs in the selected template by selecting any one or more first-type bugs, so that the bug scanning requirement of the user is met, and the processing efficiency of the bug database is improved. And the preset deleting request is used for requesting to delete the first type of vulnerability from the selected template.
In practical application, when a preset deletion request carrying vulnerability identifiers of a first type of vulnerability is received, firstly, an index corresponding to the vulnerability identifier in the preset deletion request is determined from an array corresponding to a selected template.
For example, still taking a "camera related vulnerability" template with an array of [0,1,1,0,0,0,0,1,1,1] as an example, assuming that the first type of vulnerability carried in the preset deletion request, that is, the vulnerabilities in the selected template are respectively the 2 nd and 3 rd vulnerabilities in the vulnerability table, it may be determined that the indexes of the vulnerabilities in the array are respectively 1 and 2.
S305: and setting an index value corresponding to the index as a second preset value, wherein the second preset value is used for indicating that the vulnerability corresponding to the index is not in the template.
In this embodiment of the application, the second preset value may be 0, and specifically, if the index value of the array corresponding to the template is 0, it indicates that the vulnerability corresponding to the index of the index value is not in the template.
In practical application, after determining the index corresponding to the vulnerability identification carried in the preset deletion request, all index values corresponding to the index in the selected template are set to be the second preset value.
For example, the index values of indexes 1 and 2 in the array [0,1,1,0,0,0,0,1,1,1] in the above example are all set to 0, so as to obtain an updated array [0,0,0,0,0,0,0,1,1,1], so as to complete the update of the array, and the array is converted into json format and stored in the template table of the leak library.
In the embodiment of the application, the vulnerability contained in the template can be deleted by resetting the index value of the array corresponding to the template, the processing is simple, and the response speed of the vulnerability library is improved.
Based on the foregoing embodiment, a further embodiment of the present application further provides an access method for a leak library, and with reference to fig. 4, a flowchart of the access method for another leak library provided in the embodiment of the present application is provided, where the method includes:
s401: and responding to a preset access request carrying a template identifier, and determining whether an array corresponding to the template with the template identifier is stored in a cache.
The method for storing the array corresponding to the template in the template table of the leak library usually needs to convert the array into the json format and then store the array, and each time the array corresponding to the template is processed, the array of the json format of the selected template needs to be obtained from the leak library firstly, then the json format is converted into the array format, and finally the template based on the array format is processed. If the template needs to be processed for multiple times, the operation needs to be completed every time, obviously, the operation is complex, and the operation efficiency of the cave library is easily reduced.
Therefore, in the embodiment of the application, the array of the selected template is stored by using the cache, so that when the template needs to be processed, the array corresponding to the template does not need to be obtained from the leakage library for many times, but the array is directly obtained from the cache, and the problem of low access efficiency caused by accessing the leakage library for many times is solved.
In practical application, when a preset access request carrying a template identifier is received, whether a template corresponding to the template identifier carried by the preset access request is stored in a cache or not is determined, and if the template corresponding to the template identifier carried by the preset access request is stored in the cache, an array corresponding to the template is directly obtained from the cache. It is noted that the array corresponding to the template may be directly stored in the cache without being converted into json format.
S402: and if the array is stored in the cache, acquiring the array from the cache and acquiring the vulnerability in the vulnerability table.
S403: and if the array is not stored in the cache, acquiring the array corresponding to the template with the template identifier from the template table, and acquiring the vulnerability in the vulnerability table.
In practical application, if it is determined that the array is not stored in the cache, the array corresponding to the template having the template identifier may be obtained from the template table of the vulnerability library, and then the array is stored in the cache, so that the corresponding array may be directly obtained from the cache when the template is subsequently processed.
S404: determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; wherein the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities other than the first type of vulnerability.
S405: and returning a response carrying the first type of vulnerability and the second type of vulnerability.
S404 and S405 in the embodiment of the present application can be understood by referring to S102 and S103 in the above embodiment, and are not described herein again.
According to the method for accessing the leaky library, the array corresponding to each template in the leaky library is stored by the cache, so that when the template is processed, the corresponding array can be directly obtained from the cache without accessing the leaky library for many times, and therefore the access efficiency of the leaky library can be improved.
Based on the above method embodiment, the present application further provides an access device for a vulnerability library, the vulnerability library includes a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying vulnerabilities, and the index values of the arrays are used for indicating whether corresponding vulnerabilities are in the templates.
Referring to fig. 5, a schematic structural diagram of an access apparatus for a cave library provided in an embodiment of the present application is shown, where the apparatus includes:
an obtaining module 501, configured to, in response to a preset access request with a template identifier, obtain an array corresponding to a template with the template identifier from the template table, and obtain a vulnerability in the vulnerability table;
a first determining module 502, configured to determine a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability;
a returning module 503, configured to return a response carrying the first type of vulnerability and the second type of vulnerability.
In an optional implementation manner, the obtaining module 501 includes:
the determining submodule is used for responding to a preset access request carrying a template identifier and determining whether an array corresponding to the template with the template identifier is stored in a cache or not;
the first obtaining submodule is used for obtaining the array from the cache and obtaining the bug in the bug table when the array is stored in the cache;
and the second obtaining submodule is used for obtaining the array corresponding to the template with the template identifier from the template table and obtaining the loophole in the loophole table when the array is not stored in the cache.
In addition, the apparatus further comprises:
the second determining module is used for responding to a preset new adding request carrying the vulnerability identification of the second type of vulnerability and determining the index corresponding to the vulnerability identification in the array;
and the setting module is used for setting the index value corresponding to the index as a first preset value, and the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
According to the access device of the vulnerability library, the response efficiency of the vulnerability library is improved by adjusting the storage mode of the template. Specifically, corresponding arrays are respectively set for each template in the vulnerability database, wherein indexes of the arrays corresponding to the templates are used for identifying vulnerabilities, and index values of the arrays are used for indicating whether the corresponding vulnerabilities are in the templates. Based on the indexes and index values in the array corresponding to the template, whether the vulnerability corresponding to each index in the vulnerability table is in the template can be directly determined, the vulnerability library does not need to be traversed for many times, the response efficiency of the vulnerability library is improved, and the access experience of a user to the vulnerability library is further improved.
In addition, an embodiment of the present application further provides an access device for a vulnerability library, as shown in fig. 6, the access device may include:
a processor 601, a memory 602, an input device 603, and an output device 604. The number of processors 601 in the access device of the leak library may be one or more, and one processor is taken as an example in fig. 6. In some embodiments of the invention, the processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, wherein the connection by the bus is exemplified in fig. 6.
The memory 602 may be used for storing software programs and modules, and the processor 601 executes various functional applications and data processing of the access device of the vulnerability library by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The input means 603 may be used to receive entered numerical or character information and to generate signal inputs related to user settings and function controls of the access device of the vulnerability library.
Specifically, in this embodiment, the processor 601 loads an executable file corresponding to a process of one or more application programs into the memory 602 according to the following instructions, and the processor 601 runs the application programs stored in the memory 602, thereby implementing various functions in the access method of the vulnerability library.
In addition, the present application also provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a terminal device, the terminal device is caused to execute the above-mentioned access method for the vulnerability library.
It is understood that for the apparatus embodiments, since they correspond substantially to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the device and the equipment for accessing the vulnerability library provided by the embodiment of the application are introduced in detail, a specific example is applied in the description to explain the principle and the implementation mode of the application, and the description of the embodiment is only used for helping to understand the method and the core idea of the application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. The access method of the vulnerability library is characterized in that the vulnerability library comprises a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying the vulnerabilities, the index values of the arrays are used for representing whether the corresponding vulnerabilities are located in the templates, and the method comprises the following steps:
responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table;
determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability;
and returning a response carrying the first type of vulnerability and the second type of vulnerability.
2. The method according to claim 1, wherein the obtaining an array corresponding to the template with the template identifier from the template table and obtaining the vulnerability in the vulnerability table in response to a preset access request with the template identifier comprises:
responding to a preset access request carrying a template identifier, and determining whether an array corresponding to the template with the template identifier is stored in a cache;
if the array is stored in the cache, acquiring the array from the cache and acquiring the vulnerability in the vulnerability table;
and if the array is not stored in the cache, acquiring the array corresponding to the template with the template identifier from the template table, and acquiring the vulnerability in the vulnerability table.
3. The method of claim 1, wherein after returning the response carrying the first type of vulnerability and the second type of vulnerability, further comprising:
responding to a preset new adding request carrying the vulnerability identification of the second type of vulnerability, and determining an index corresponding to the vulnerability identification in the array;
and setting an index value corresponding to the index as a first preset value, wherein the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
4. The method of claim 1, wherein after returning the response carrying the first type of vulnerability and the second type of vulnerability, further comprising:
responding to a preset deleting request carrying the vulnerability identification of the first vulnerability, and determining an index corresponding to the vulnerability identification in the array;
and setting an index value corresponding to the index as a second preset value, wherein the second preset value is used for indicating that the vulnerability corresponding to the index is not in the template.
5. The method of claim 1, wherein the first and second types of vulnerabilities in the vulnerability table are determined based on an index and an index value of the array; wherein the first type of vulnerability includes vulnerabilities in the template, and the second type of vulnerability includes vulnerabilities other than the first type of vulnerability, including:
determining whether the vulnerability identified by the corresponding index is in the template based on the index value of the array;
if the vulnerabilities identified by the indexes are in the template, determining the vulnerabilities identified by the indexes in the vulnerability table as vulnerabilities of a first type;
and determining the bugs except the first type bugs in the bug table as second type bugs.
6. An access device for a vulnerability library, wherein the vulnerability library comprises a vulnerability table and a template table, the vulnerability table is used for storing vulnerabilities, the template table is used for storing templates, the templates have corresponding arrays, the indexes of the arrays are used for identifying vulnerabilities, the index values of the arrays are used for representing whether the corresponding vulnerabilities are in the templates, the device comprises:
the acquisition module is used for responding to a preset access request carrying a template identifier, acquiring an array corresponding to the template with the template identifier from the template table, and acquiring a vulnerability in the vulnerability table;
the first determining module is used for determining a first type of vulnerability and a second type of vulnerability in the vulnerability table based on the index and the index value of the array; the first type of vulnerability comprises vulnerabilities in the template, and the second type of vulnerability comprises vulnerabilities except for the first type of vulnerability;
and the return module is used for returning a response carrying the first type of vulnerability and the second type of vulnerability.
7. The apparatus of claim 6, wherein the obtaining module comprises:
the determining submodule is used for responding to a preset access request carrying a template identifier and determining whether an array corresponding to the template with the template identifier is stored in a cache or not;
the first obtaining submodule is used for obtaining the array from the cache and obtaining the bug in the bug table when the array is stored in the cache;
and the second obtaining submodule is used for obtaining the array corresponding to the template with the template identifier from the template table and obtaining the loophole in the loophole table when the array is not stored in the cache.
8. The apparatus of claim 6, further comprising:
the second determining module is used for responding to a preset new adding request carrying the vulnerability identification of the second type of vulnerability and determining the index corresponding to the vulnerability identification in the array;
and the setting module is used for setting the index value corresponding to the index as a first preset value, and the first preset value is used for indicating that the vulnerability corresponding to the index is in the template.
9. A computer-readable storage medium having stored therein instructions that, when executed on a terminal device, cause the terminal device to perform the method of any one of claims 1-5.
10. An apparatus, comprising: memory, a processor, and a computer program stored on the memory and executable on the processor, when executing the computer program, implementing the method of any of claims 1-5.
CN202010223399.5A 2020-03-26 2020-03-26 Vulnerability library access method, device and equipment Active CN111444392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010223399.5A CN111444392B (en) 2020-03-26 2020-03-26 Vulnerability library access method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010223399.5A CN111444392B (en) 2020-03-26 2020-03-26 Vulnerability library access method, device and equipment

Publications (2)

Publication Number Publication Date
CN111444392A true CN111444392A (en) 2020-07-24
CN111444392B CN111444392B (en) 2023-04-25

Family

ID=71652538

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010223399.5A Active CN111444392B (en) 2020-03-26 2020-03-26 Vulnerability library access method, device and equipment

Country Status (1)

Country Link
CN (1) CN111444392B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859399A (en) * 2020-07-29 2020-10-30 网宿科技股份有限公司 Vulnerability detection method and device based on oval

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103065095A (en) * 2013-01-29 2013-04-24 四川大学 WEB vulnerability scanning method and vulnerability scanner based on fingerprint recognition technology
US20130247207A1 (en) * 2011-09-21 2013-09-19 Mcafee, Inc., A Delaware Corporation System and method for grouping computer vulnerabilities
CN104363236A (en) * 2014-11-21 2015-02-18 西安邮电大学 Automatic vulnerability validation method
US20160300065A1 (en) * 2015-04-07 2016-10-13 Bank Of America Corporation Program Vulnerability Identification
CN106295347A (en) * 2015-05-28 2017-01-04 国家计算机网络与信息安全管理中心 For building the method and device of validating vulnerability environment
CN108011898A (en) * 2018-01-30 2018-05-08 上海壹账通金融科技有限公司 Leak detection method, device, computer equipment and storage medium
CN108537042A (en) * 2018-04-04 2018-09-14 上海有云信息技术有限公司 Self-defined plug-in unit generation method, device, equipment and storage medium
CN110431819A (en) * 2017-03-20 2019-11-08 浩瀚有限公司 Driver sweep based on the variation of network data available
CN110704847A (en) * 2019-09-27 2020-01-17 重庆紫光华山智安科技有限公司 Vulnerability scanning method and related device
CN110909361A (en) * 2019-11-08 2020-03-24 北京长亭未来科技有限公司 Vulnerability detection method and device and computer equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130247207A1 (en) * 2011-09-21 2013-09-19 Mcafee, Inc., A Delaware Corporation System and method for grouping computer vulnerabilities
CN103065095A (en) * 2013-01-29 2013-04-24 四川大学 WEB vulnerability scanning method and vulnerability scanner based on fingerprint recognition technology
CN104363236A (en) * 2014-11-21 2015-02-18 西安邮电大学 Automatic vulnerability validation method
US20160300065A1 (en) * 2015-04-07 2016-10-13 Bank Of America Corporation Program Vulnerability Identification
CN106295347A (en) * 2015-05-28 2017-01-04 国家计算机网络与信息安全管理中心 For building the method and device of validating vulnerability environment
CN110431819A (en) * 2017-03-20 2019-11-08 浩瀚有限公司 Driver sweep based on the variation of network data available
CN108011898A (en) * 2018-01-30 2018-05-08 上海壹账通金融科技有限公司 Leak detection method, device, computer equipment and storage medium
CN108537042A (en) * 2018-04-04 2018-09-14 上海有云信息技术有限公司 Self-defined plug-in unit generation method, device, equipment and storage medium
CN110704847A (en) * 2019-09-27 2020-01-17 重庆紫光华山智安科技有限公司 Vulnerability scanning method and related device
CN110909361A (en) * 2019-11-08 2020-03-24 北京长亭未来科技有限公司 Vulnerability detection method and device and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
段丹青;陈松乔;杨卫平;: "漏洞扫描与入侵检测联动系统的研究" *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111859399A (en) * 2020-07-29 2020-10-30 网宿科技股份有限公司 Vulnerability detection method and device based on oval

Also Published As

Publication number Publication date
CN111444392B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN107506300B (en) User interface testing method, device, server and storage medium
CN107239392B (en) Test method, test device, test terminal and storage medium
CN108255620B (en) Service logic processing method, device, service server and system
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN110955409B (en) Method and device for creating resources on cloud platform
CN116107892A (en) Automatic test method, device, equipment and storage medium
CN113535577B (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN111444392A (en) Method, device and equipment for accessing cave library
CN109189688A (en) A kind of generation method, generating means and the electronic equipment of test case script
CN108664505B (en) Method and device for exporting database table structure
CN116842910A (en) Service data display method, device, equipment and storage medium
CN114625407A (en) Method, system, equipment and storage medium for implementing AB experiment
CN110955449A (en) Method and device for releasing gray scale of client
CN114564856B (en) Data sharing method based on FMEA and electronic equipment
CN111026629A (en) Method and device for automatically generating test script
CN113626301B (en) Method and device for generating test script
CN111309623B (en) Coordinate class data classification test method and device
CN113641628A (en) Data quality detection method, device, equipment and storage medium
CN110223108B (en) Click through rate prediction method, device and equipment
CN112559331A (en) Test method and device
CN110750569A (en) Data extraction method, device, equipment and storage medium
CN112540820A (en) User interface updating method and device and electronic equipment
CN106934555B (en) Workflow organization method and device, computer equipment and storage medium
CN113010587A (en) Data source configuration method, device, terminal, server and medium
CN117573561B (en) Automatic test system, method, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant