Patent attributes
A detection device runs a first sample file in a first virtual operating environment, when the first sample file sends a first Hypertext Transfer Protocol (HTTP) request to a server, the detection device obtains an identifier of the first sample file and a first data flow identifier correspondingly from the first HTTP request. The detection device obtains a second data flow identifier and a second sample file carried in subsequently transmitted data flow. If the second data flow identifier is the same as the first data flow identifier in the correspondence, the detection device determines that the second sample file is a subsample file of the first sample file, detects the second sample file to obtain a detection result of the second sample file, and determines, based on the detection result of the second sample file, that the first sample file is a malicious file.