{"_id": "cwe_q_000001", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\nstruct hostent *hp;struct in_addr myaddr;\nchar* tHost = \"trustme.example.com\";\nmyaddr.s_addr=inet_addr(ip_addr_string);\n\nhp = gethostbyaddr((char *) &myaddr, sizeof(struct in_addr), AF_INET);\nif (hp && !strncmp(hp->h_name, tHost, sizeof(tHost))) {\ntrusted = true;} else {\ntrusted = false;}\n\n[Java]\nString ip = request.getRemoteAddr();\nInetAddress addr = InetAddress.getByName(ip);\nif (addr.getCanonicalHostName().endsWith(\"trustme.com\")) {\ntrusted = true;}\n\n[C#]\nIPAddress hostIPAddress = IPAddress.Parse(RemoteIpAddress);\nIPHostEntry hostInfo = Dns.GetHostByAddress(hostIPAddress);\nif (hostInfo.HostName.EndsWith(\"trustme.com\")) {\ntrusted = true;}", "query_type": "code"} {"_id": "cwe_q_000002", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\nvoid bind_socket(void) {\n\nint server_sockfd;\nint server_len;\nstruct sockaddr_in server_address;\n\n /*unlink the socket if already bound to avoid an error when bind() is called*/\n\nunlink(\"server_socket\");\nserver_sockfd = socket(AF_INET, SOCK_STREAM, 0);\n\nserver_address.sin_family = AF_INET;\nserver_address.sin_port = 21;\nserver_address.sin_addr.s_addr = htonl(INADDR_ANY);\nserver_len = sizeof(struct sockaddr_in);\n\nbind(server_sockfd, (struct sockaddr *) &s1, server_len);\n }", "query_type": "code"} {"_id": "cwe_q_000003", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Go]\nfunc ExecuteGitCommand(name string, arg []string) error {\n\n c := exec.Command(name, arg...)\n\n var err error\n\n c.Path, err = exec.LookPath(name)\n\n if err != nil {\n\n return err\n\n }\n }", "query_type": "code"} {"_id": "cwe_q_000004", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[PHP]\nfunction printFile($username,$filename){\n\n //read file into string\n\n$file = file_get_contents($filename);\nif ($file && isOwnerOf($username,$filename)){\necho $file;\nreturn true;}\nelse{\necho 'You are not authorized to view this file';}\nreturn false;\n }", "query_type": "code"} {"_id": "cwe_q_000005", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[JSP]\nSocial Security Number: <%= ssn %>Credit Card Number: <%= ccn %>", "query_type": "code"} {"_id": "cwe_q_000006", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\nString str1 = new String(\"Hello\");\nString str2 = new String(\"Hello\");\nif (str1 == str2) {\nSystem.out.println(\"str1 == str2\");}", "query_type": "code"} {"_id": "cwe_q_000007", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Python]\ndef validate_password(actual_pw, typed_pw):\n\nif len(actual_pw) <> len(typed_pw):\n\nreturn 0\n\nfor i in len(actual_pw):\n\nif actual_pw[i] <> typed_pw[i]:\n\nreturn 0\n\nreturn 1", "query_type": "code"} {"_id": "cwe_q_000008", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[PHP]\n// Define the target location where the picture being\n\n // uploaded is going to be saved.\n\n$target = \"pictures/\" . basename($_FILES['uploadedfile']['name']);\n\n // Move the uploaded file to the new location.\n\nif(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target))\n{\necho \"The picture has been successfully uploaded.\";}\nelse\n{\necho \"There was an error uploading the picture, please try again.\";}", "query_type": "code"} {"_id": "cwe_q_000009", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\nchar* trimTrailingWhitespace(char *strMessage, int length) {\n\nchar *retMessage;\nchar *message = malloc(sizeof(char)*(length+1));\n\n // copy input string to a temporary string\n\nchar message[length+1];\nint index;\nfor (index = 0; index < length; index++) {\nmessage[index] = strMessage[index];}\nmessage[index] = '\\0';\n\n // trim trailing whitespace\n\nint len = index-1;\nwhile (isspace(message[len])) {\nmessage[len] = '\\0';\nlen--;}\n\n // return string without trailing whitespace\n\nretMessage = message;\nreturn retMessage;\n }", "query_type": "code"} {"_id": "cwe_q_000010", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[JSP]\n<%Statement stmt = conn.createStatement();\nResultSet rs = stmt.executeQuery(\"select * from emp where id=\"+eid);\nif (rs != null) {\nrs.next();\nString name = rs.getString(\"name\");}%>\n\nEmployee Name: <%= name %>\n\n[ASP.NET]\n<%\nprotected System.Web.UI.WebControls.Label EmployeeName;\n...\nstring query = \"select * from emp where id=\" + eid;\nsda = new SqlDataAdapter(query, conn);\nsda.Fill(dt);\nstring name = dt.Rows[0][\"Name\"];\n...\nEmployeeName.Text = name;%>\n
Entry #<%= e.getId() %>
\n<%= e.getText() %>
\n<%\n} %>", "query_type": "code"} {"_id": "cwe_q_000069", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\ntry {\n\n // Something that may throw an exception.\n\n...\n } catch (Throwable t) {\nlogger.error(\"Caught: \" + t.toString());\nreturn;}", "query_type": "code"} {"_id": "cwe_q_000070", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C++]\nint myfunction() throw(std::exception) {\nif (0) throw out_of_range();\nthrow length_error();}", "query_type": "code"} {"_id": "cwe_q_000071", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\nThread thr = new Thread() {\npublic void run() {\n...}};\n\nthr.run();", "query_type": "code"} {"_id": "cwe_q_000072", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\npublic String getValue(int index) {\nreturn array[index];}", "query_type": "code"} {"_id": "cwe_q_000073", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\nr = getName();\nr = getNewBuffer(buf);", "query_type": "code"} {"_id": "cwe_q_000074", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[XML]\n(s4 === i) is FALSE
\n\n(s4 === s1) is FALSE
\n\n var i = 65;\n\n var s1 = '65';\n\n var s4 = new String('65');\n\n if (i === s1)\n\n {\n\ndocument.getElementById(\"ieq3s1\").innerHTML = \"(i === s1) is TRUE\";\n }\n\n if (s4 === i)\n\n {\n\ndocument.getElementById(\"s4eq3i\").innerHTML = \"(s4 === i) is TRUE\";\n }\n\n if (s4 === s1)\n\n {\n\ndocument.getElementById(\"s4eq3s1\").innerHTML = \"(s4 === s1) is TRUE\";\n }", "query_type": "code"} {"_id": "cwe_q_000122", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\nJava Web App ResourceBundle properties file\n\n...\nwebapp.ldap.username=secretUsername\nwebapp.ldap.password=secretPassword\n...\n\n[ASP.NET]\n...\n\\n\";}\nelse if ($_GET[\"action\"] == \"ViewMessages\") {\ninclude($MessageFile);}", "query_type": "code"}
{"_id": "cwe_q_000219", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[XML]\n
\\n\";\nprint \"Subject: \" . encodeHTML($Message->{subject}) . \"\\n\";\nprint \"
\\n\";\nprint \"Body: \" . encodeHTML($Message->{body}) . \"\\n\";}\n\nmy $q = new CGI;\n\n # For purposes of this example, assume that this weakness and\n\n # this weakness do not apply.\n\nif (! AuthenticateUser($q->param('username'), $q->param('password'))) {\nExitError(\"invalid username or password\");}\n\nmy $id = $q->param('id');\nDisplayPrivateMessage($id);", "query_type": "code"}
{"_id": "cwe_q_000281", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[HTML]\n\n\n[PHP]\n// initiate the session in order to validate sessions\n\nsession_start();\n\n //if the session is registered to a valid user then allow update\n\nif (! session_is_registered(\"username\")) {\n\necho \"invalid session detected!\";\n\n // Redirect user to login page\n\n[...]\n\nexit;\n }\n\n // The user session is valid, so process the request\n\n // and update the information\n\nupdate_profile();\n\nfunction update_profile {\n\n // read in the data from $POST and send an update\n\n // to the database\n\nSendUpdateToDatabase($_SESSION['username'], $_POST['email']);\n[...]\necho \"Your profile has been successfully updated.\";\n }", "query_type": "code"}
{"_id": "cwe_q_000282", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\npublic Cipher getRSACipher() {\nCipher rsa = null;\ntry {\nrsa = javax.crypto.Cipher.getInstance(\"RSA/NONE/NoPadding\");}\ncatch (java.security.NoSuchAlgorithmException e) {\nlog(\"this should never happen\", e);}\ncatch (javax.crypto.NoSuchPaddingException e) {\nlog(\"this should never happen\", e);}\nreturn rsa;}", "query_type": "code"}
{"_id": "cwe_q_000283", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[SystemVerilog]\n...\n\nalways_ff @(posedge clk_i) begin\n\nif (req_i) begin\n\nif (!we_i) begin\n\nraddr_q <= addr_i[$clog2(RomSize)-1+3:3];\n\t\t\t\t\t\t\t\t\t\tend else begin\n\nmem[addr_i[$clog2(RomSize)-1+3:3]] <= wdata_i;\n\t\t\t\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\t\t\tend\n\t\t\t\t\t\t\t\tend\n \t...\n\n\t\t\t\t\t\t\t\t// this prevents spurious Xes from propagating into the speculative fetch stage of the core\n\nassign rdata_o = (raddr_q < RomSize) ? mem[raddr_q] : '0;\n\n\t\t\t\t\t\t\t...", "query_type": "code"}
{"_id": "cwe_q_000284", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[SystemVerilog]\nmodule Locked_register_example\n\n (\n\n\t\t input [15:0] Data_in,\n\n\t\t input Clk,\n\n\t\t input resetn,\n\n\t\t input write,\n\n\t\t input Lock,\n\n\t\t input scan_mode,\n\n\t\t input debug_unlocked,\n\n\t\t output reg [15:0] Data_out\n\n\t\t );\n\n reg lock_status;\n\n always @(posedge Clk or negedge resetn)\n\n\t\t\tif (~resetn) // Register is reset resetn\n\n\t\t\tbegin\n\n\t\t\t lock_status <= 1'b0;\n\n\t\t\tend\n\n\t\t\telse if (Lock)\n\n\t\t\tbegin\n\n\t\t\t lock_status <= 1'b1;\n\n\t\t\tend\n\n\t\t\telse if (~Lock)\n\n\t\t\tbegin\n\n\t\t\t lock_status <= lock_status\n\n\t\t\tend\n\n\t\t always @(posedge Clk or negedge resetn)\n\n\t\t\tif (~resetn) // Register is reset resetn\n\n\t\t\tbegin\n\n\t\t\t Data_out <= 16'h0000;\n\n\t\t\tend\n\n\t\t\telse if (write & (~lock_status | scan_mode | debug_unlocked) ) // Register protected by Lock bit input, overrides supported for scan_mode & debug_unlocked\n\n\t\t\tbegin\n\n\t\t\t Data_out <= Data_in;\n\n\t\t\tend\n\n\t\t\telse if (~write)\n\n\t\t\tbegin\n\n\t\t\t Data_out <= Data_out;\n\n\t\t\tend\n\n\t\t endmodule", "query_type": "code"}
{"_id": "cwe_q_000285", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Perl]\n$ENV{\"HOMEDIR\"} = \"/home/mydir/public/\";\nmy $stream = AcceptUntrustedInputStream();\nwhile (<$stream>) {\n\nchomp;\nif (/^ENV ([\\w\\_]+) (.*)/) {\n$ENV{$1} = $2;}\nelsif (/^QUIT/) { ... }\nelsif (/^LIST/) {\nopen($fh, \"/bin/ls -l $ENV{HOMEDIR}|\");\nwhile (<$fh>) {\nSendOutput($stream, \"FILEINFO: $_\");}\nclose($fh);}\n }", "query_type": "code"}
{"_id": "cwe_q_000286", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\nwhile(true) {\nDatagramPacket rp = new DatagramPacket(rData,rData.length);\noutSock.receive(rp);\nInetAddress IPAddress = rp.getAddress();\nint port = rp.getPort();\nout = secret.getBytes();\nDatagramPacket sp =new DatagramPacket(out, out.length, IPAddress, port);\noutSock.send(sp);}", "query_type": "code"}
{"_id": "cwe_q_000287", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[HTML]\n", "query_type": "code"}
{"_id": "cwe_q_000289", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Perl]\nmy $dataPath = \"/users/cwe/profiles\";\nmy $username = param(\"user\");\nmy $profilePath = $dataPath . \"/\" . $username;\n\nopen(my $fh, \"<\", $profilePath) || ExitError(\"profile read error: $profilePath\");\nprint \"\\n\";\nwhile (<$fh>) {\nprint \"
\\n\";", "query_type": "code"}
{"_id": "cwe_q_000291", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C++]\nvoid foo(){\n\nBarObj *ptr = new BarObj()\n\n /* do some work with ptr here */\n\n...\n\nfree(ptr);\n }", "query_type": "code"}
{"_id": "cwe_q_000292", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\n#define DIR \"/restricted/directory\"\n\nchar cmd[500];\nsprintf(cmd, \"ls -l %480s\", DIR);\n\n /* Raise privileges to those needed for accessing DIR. */\n\nRaisePrivileges(...);\nsystem(cmd);\nDropPrivileges(...);\n...", "query_type": "code"}
{"_id": "cwe_q_000293", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\ncontext = new InitialDirContext(env);\nString searchFilter = \"StreetAddress=\" + address;\nNamingEnumeration answer = context.search(searchBase, searchFilter, searchCtls);", "query_type": "code"}
{"_id": "cwe_q_000294", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\npublic class BankManagerLoginServlet extends HttpServlet {\n\nprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\ntry {\n\n // Get username and password from login page request\n\nString username = request.getParameter(\"username\");\nString password = request.getParameter(\"password\");\n\n // Authenticate user\n\nBankManager bankMgr = new BankManager();\nboolean isAuthentic = bankMgr.authenticateUser(username, password);\n\n // If user is authenticated then go to successful login page\n\nif (isAuthentic) {\nrequest.setAttribute(\"login\", new String(\"Login Successful.\"));\ngetServletContext().getRequestDispatcher(\"/BankManagerServiceLoggedIn.jsp\"). forward(request, response);}\nelse {\n\n // Otherwise, raise failed login exception and output unsuccessful login message to error page\n\nthrow new FailedLoginException(\"Failed Login for user \" + username + \" with password \" + password);\n }\n } catch (FailedLoginExce", "query_type": "code"}
{"_id": "cwe_q_000295", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\ntry {\nFile file = new File(\"object.obj\");\nObjectInputStream in = new ObjectInputStream(new FileInputStream(file));\njavax.swing.JButton button = (javax.swing.JButton) in.readObject();\nin.close();}", "query_type": "code"}
{"_id": "cwe_q_000296", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\npwd = getpwnam(getlogin());\nif (isTrustedGroup(pwd->pw_gid)) {\nallow();} else {\ndeny();}", "query_type": "code"}
{"_id": "cwe_q_000298", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[SystemVerilog]\nmodule reglk_wrapper #(\n\n ...\n\n always @(posedge clk_i)\n\n begin\n\n if(~(rst_ni && ~jtag_unlock && ~rst_9))\n\n begin\n\n for (j=0; j < 6; j=j+1) begin\n\n reglk_mem[j] <= 'h0;\n\n end\n\n end\n\n ...", "query_type": "code"}
{"_id": "cwe_q_000299", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[C]\nint main() {\n\n...\n\n char *result = strstr(destBuf, \"Replace Me\");\n\n int idx = result - destBuf;\n\n strcpy(&destBuf[idx], srcBuf);\n\n ...}", "query_type": "code"}
{"_id": "cwe_q_000300", "text": "Which software weakness classification applies to this vulnerable code snippet?\n[Java]\nString[] colors = car.getAllPossibleColors();\ncolors[0] = \"Red\";", "query_type": "code"}
{"_id": "cwe_q_000301", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits weaknesses in privilege management or access control to replace a trusted executable with a malicious version and enable the execution of malware when that trusted executable is called.", "query_type": "nl"}
{"_id": "cwe_q_000302", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary adds duplicate HTTP GET/POST parameters by injecting query string delimiters. Via HPP it may be possible to override existing hardcoded HTTP parameters, modify the application behaviors, access and, potentially exploit, uncontrollable variables, and bypass input validation checkpoints and WAF rules.", "query_type": "nl"}
{"_id": "cwe_q_000303", "text": "Identify the underlying software weakness exploited by this attack behavior: An Adversary can eavesdrop on the content of an external monitor through the air without modifying any cable or installing software, just capturing this signal emitted by the cable or video port, with this the attacker will be able to impact the confidentiality of the data without being detected by traditional security tools\n\nThis attack gives the adversary the ability to view an external monitor with an insignificant delay. There is also no indicator of compromise from the victim visible on the monitor. The eavesdrop is possible due to a signal leakage, that is produced at different points of the connection, including the source port, the connection between the cable and PC, the cable itself, and the connection between the cable and the monitor. That signal leakage can be captured near an", "query_type": "nl"}
{"_id": "cwe_q_000304", "text": "Identify the underlying software weakness exploited by this attack behavior: The adversary modifies state information maintained by the target software or causes a state transition in hardware. If successful, the target will use this tainted state and execute in an unintended manner. State management is an important function within a software application. User state maintained by the application can include usernames, payment information, browsing history as well as application-specific contents such as items in a shopping cart. Manipulating user state can be employed by an adversary to elevate privilege, conduct fraudulent transactions or otherwise modify the flow of the application to derive certain benefits. If there is a hardware logic error in a finite state machine, the adversary can use this to put the system in an undefined state which could cause a denial ", "query_type": "nl"}
{"_id": "cwe_q_000306", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker tricks a victim to execute malicious flash content that executes commands or makes flash calls specified by the attacker. One example of this attack is cross-site flashing, an attacker controlled parameter to a reference call loads from content specified by the attacker.", "query_type": "nl"}
{"_id": "cwe_q_000307", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness in access control to gain access to currently installed hardware and precedes to implement changes or secretly replace a hardware component which undermines the system's integrity for the purpose of carrying out an attack.", "query_type": "nl"}
{"_id": "cwe_q_000308", "text": "Identify the underlying software weakness exploited by this attack behavior: Adversaries may attempt to obtain information about attached peripheral devices and components connected to a computer system. Examples may include discovering the presence of iOS devices by searching for backups, analyzing the Windows registry to determine what USB devices have been connected, or infecting a victim system with malware to report when a USB device has been connected. This may allow the adversary to gain additional insight about the system or network environment, which may be useful in constructing further attacks.", "query_type": "nl"}
{"_id": "cwe_q_000310", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary attacks a target by providing input that causes an application to read beyond the boundary of a defined buffer. This typically occurs when a value influencing where to start or stop reading is set to reflect positions outside of the valid memory location of the buffer. This type of attack may result in exposure of sensitive information, a system crash, or arbitrary code execution.", "query_type": "nl"}
{"_id": "cwe_q_000311", "text": "Identify the underlying software weakness exploited by this attack behavior: This type of attack leverages the use of tags or variables from a formatted configuration data to cause buffer overflow. The adversary crafts a malicious HTML page or configuration file that includes oversized strings, thus causing an overflow.", "query_type": "nl"}
{"_id": "cwe_q_000312", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary serves content whose IP address is resolved by a DNS server that the adversary controls. After initial contact by a web browser (or similar client), the adversary changes the IP address to which its name resolves, to an address within the target organization that is not publicly accessible. This allows the web browser to examine this internal address on behalf of the adversary.\n\nWeb browsers enforce security zones based on DNS names in order to prevent cross-zone disclosure of information. Because the same name resolves to both these IP addresses, browsers will place both IP addresses in the same security zone and allow information to flow between the addresses. This allows adversaries to discover sensitive information about the internal network of an enterprise. If there is a", "query_type": "nl"}
{"_id": "cwe_q_000313", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name.\n\nThe endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the adversary may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the adversary may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive inf", "query_type": "nl"}
{"_id": "cwe_q_000314", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack targets libraries or shared code modules which are vulnerable to buffer overflow attacks. An adversary who has knowledge of known vulnerable libraries or shared code can easily target software that makes use of these libraries. All clients that make use of the code library thus become vulnerable by association. This has a very broad effect on security across a system, usually affecting more than one software process.", "query_type": "nl"}
{"_id": "cwe_q_000315", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits missing or incorrectly configured access control within registers to read/write data that is not meant to be obtained or modified by a user.\n\nHardware systems often utilize trusted lock bits to prevent a set of registers from being written to or to restrict a register to only being written to once. Registers are also frequently used to store sensitive data leveraged in additional security operations, such as secure booting, authenticating code, device attestation, and more. However, the access control mechanisms meant to protect these registers may be fully missing or ineffective due to misconfiguration. If an adversary is able to discover improper access controls surrounding registers, it could result in the adversary obtaining sensitive data and/or modifying data th", "query_type": "nl"}
{"_id": "cwe_q_000316", "text": "Identify the underlying software weakness exploited by this attack behavior: A domain name server translates a domain name (such as www.example.com) into an IP address that Internet hosts use to contact Internet resources. An adversary modifies a public DNS cache to cause certain names to resolve to incorrect addresses that the adversary specifies. The result is that client applications that rely upon the targeted cache for domain name resolution will be directed not to the actual address of the specified domain name but to some other address. Adversaries can use this to herd clients to sites that install malware on the victim's computer or to masquerade as part of a Pharming attack.", "query_type": "nl"}
{"_id": "cwe_q_000318", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary places a malicious version of a Dynamic-Link Library (DLL) in the Windows Side-by-Side (WinSxS) directory to trick the operating system into loading this malicious DLL instead of a legitimate DLL. Programs specify the location of the DLLs to load via the use of WinSxS manifests or DLL redirection and if they aren't used then Windows searches in a predefined set of directories to locate the file. If the applications improperly specify a required DLL or WinSxS manifests aren't explicit about the characteristics of the DLL to be loaded, they can be vulnerable to side-loading.", "query_type": "nl"}
{"_id": "cwe_q_000321", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker manipulates or crafts an LDAP query for the purpose of undermining the security of the target. Some applications use user input to create LDAP queries that are processed by an LDAP server. For example, a user might provide their username during authentication and the username might be inserted in an LDAP query during the authentication process. An attacker could use this input to inject additional commands into an LDAP query that could disclose sensitive information. For example, entering a * in the aforementioned query might return information about all users on the system. This attack is very similar to an SQL injection attack in that it manipulates a query to gather additional information or coerce a particular return value.", "query_type": "nl"}
{"_id": "cwe_q_000322", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary includes formatting characters in a string input field on the target application. Most applications assume that users will provide static text and may respond unpredictably to the presence of formatting character. For example, in certain functions of the C programming languages such as printf, the formatting character %s will print the contents of a memory location expecting this location to identify a string and the formatting character %n prints the number of DWORD written in the memory. An adversary can use this to read or write to memory locations or files, or simply to manipulate the value of the resulting text in unexpected ways. Reading or writing memory may result in program crashes and writing memory could result in the execution of arbitrary code if the adversary can", "query_type": "nl"}
{"_id": "cwe_q_000323", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary engages in fingerprinting activities to determine the type or version of an application installed on a remote target.", "query_type": "nl"}
{"_id": "cwe_q_000324", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker utilizes crafted XML user-controllable input to probe, attack, and inject data into the XML database, using techniques similar to SQL injection. The user-controllable input can allow for unauthorized viewing of data, bypassing authentication or the front-end application for direct XML database access, and possibly altering database information.", "query_type": "nl"}
{"_id": "cwe_q_000325", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the adversary finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.\n\nAlthough the focus of this attack is putting excessive content into an environment variable that is loaded into a buffer, environment variables can be used to assist a classic buffer overflow attack as well. In the case where the buffer used in a traditional buffer overflow attack is not large enough to store the adversary's shell code, they will store the shell code in an environment variable and attempt to return to its address, rather than back into the data they wrote to the buffer.", "query_type": "nl"}
{"_id": "cwe_q_000326", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness in authorization in order to modify content within a registry (e.g., Windows Registry, Mac plist, application registry). Editing registry information can permit the adversary to hide configuration information or remove indicators of compromise to cover up activity. Many applications utilize registries to store configuration and service information. As such, modification of registry information can affect individual services (affecting billing, authorization, or even allowing for identity spoofing) or the overall configuration of a targeted application. For example, both Java RMI and SOAP use registries to track available services. Changing registry values is sometimes a preliminary step towards completing another attack pattern, but given the long term usag", "query_type": "nl"}
{"_id": "cwe_q_000327", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary attempts to exploit an application by injecting additional, malicious content during its processing of serialized objects. Developers leverage serialization in order to convert data or state into a static, binary format for saving to disk or transferring over a network. These objects are then deserialized when needed to recover the data/state. By injecting a malformed object into a vulnerable application, an adversary can potentially compromise the application by manipulating the deserialization process. This can result in a number of unwanted outcomes, including remote code execution.", "query_type": "nl"}
{"_id": "cwe_q_000328", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack utilizes the frequent client-server roundtrips in Ajax conversation to scan a system. While Ajax does not open up new vulnerabilities per se, it does optimize them from an attacker point of view. A common first step for an attacker is to footprint the target environment to understand what attacks will work. Since footprinting relies on enumeration, the conversational pattern of rapid, multiple requests and responses that are typical in Ajax applications enable an attacker to look for many vulnerabilities, well-known ports, network locations and so on. The knowledge gained through Ajax fingerprinting can be used to support other attacks, such as XSS.", "query_type": "nl"}
{"_id": "cwe_q_000330", "text": "Identify the underlying software weakness exploited by this attack behavior: The adversary utilizes a repeating of the encoding process for a set of characters (that is, character encoding a character encoding of a character) to obfuscate the payload of a particular request. This may allow the adversary to bypass filters that attempt to detect illegal characters or strings, such as those that might be used in traversal or injection attacks. Filters may be able to catch illegal encoded strings, but may not catch doubly encoded strings. For example, a dot (.), often used in path traversal attacks and therefore often blocked by filters, could be URL encoded as %2E. However, many filters recognize this encoding and would still block the request. In a the component, the % in the above URL encoding would be encoded again as %25, resulting in %252E which some filters migh", "query_type": "nl"}
{"_id": "cwe_q_000331", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary collects information about the target system in an attempt to identify the system's geographical location. Information gathered could include keyboard layout, system language, and timezone. This information may benefit an adversary in confirming the desired target and/or tailoring further attacks.", "query_type": "nl"}
{"_id": "cwe_q_000332", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary obtains decommissioned, recycled, or discarded systems and devices that can include an organization’s intellectual property, employee data, and other types of controlled information. Systems and devices that have reached the end of their lifecycles may be subject to recycle or disposal where they can be exposed to adversarial attempts to retrieve information from internal memory chips and storage devices that are part of the system.", "query_type": "nl"}
{"_id": "cwe_q_000333", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker initiates cross domain HTTP / GET requests and times the server responses. The timing of these responses may leak important information on what is happening on the server. Browser's same origin policy prevents the attacker from directly reading the server responses (in the absence of any other weaknesses), but does not prevent the attacker from timing the responses to requests that the attacker issued cross domain.\n\nFor GET requests an attacker could for instance leverage the \"img\" tag in conjunction with \"onload() / onerror()\" javascript events. For the POST requests, an attacker could leverage the \"iframe\" element and leverage the \"onload()\" event. There is nothing in the current browser security model that prevents an attacker to use these methods to time responses to the at", "query_type": "nl"}
{"_id": "cwe_q_000334", "text": "Identify the underlying software weakness exploited by this attack behavior: the component results from an insufficient mitigation for SQL Injection. Although suppressing database error messages are considered best practice, the suppression alone is not sufficient to prevent SQL Injection. the component is a form of SQL Injection that overcomes the lack of error messages. Without the error messages that facilitate SQL Injection, the adversary constructs input strings that probe the target through simple Boolean SQL expressions. The adversary can determine if the syntax and structure of the injection was successful based on whether the query was executed or not. Applied iteratively, the adversary determines how and where the target is vulnerable to SQL Injection.", "query_type": "nl"}
{"_id": "cwe_q_000335", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker exploits a weakness in input validation on the target by supplying a specially constructed path utilizing dot and slash characters for the purpose of obtaining access to arbitrary files or resources. An attacker modifies a known path on the target in order to reach material that is not available through intended channels. These attacks normally involve adding additional path separators (/ or \\) and/or dots (.), or encodings thereof, in various combinations in order to reach parent directories or entirely separate trees of the target's directory structure.", "query_type": "nl"}
{"_id": "cwe_q_000337", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker may intercept and log encrypted transmissions for the purpose of analyzing metadata such as packet timing and sizes. Although the actual data may be encrypted, this metadata may reveal valuable information to an attacker. Note that this attack is applicable to VOIP data as well as application data, especially for interactive apps that require precise timing and low-latency (e.g. thin-clients).", "query_type": "nl"}
{"_id": "cwe_q_000338", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary identifies a Rest HTTP (Get, Put, Delete) style permission method allowing them to perform various malicious actions upon server data due to lack of access control mechanisms implemented within the application service accepting HTTP messages.\n\nRest uses standard HTTP (Get, Put, Delete) style permissions methods, but these are not necessarily correlated generally with back end programs. Strict interpretation of HTTP get methods means that these HTTP Get services should not be used to delete information on the server, but there is no access control mechanism to back up this logic. This means that unless the services are properly ACL'd and the application's service implementation are following these guidelines then an HTTP request can easily execute a delete or update on the serv", "query_type": "nl"}
{"_id": "cwe_q_000339", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker is able to leverage access gained to the database to read / write data to the file system, compromise the operating system, create a tunnel for accessing the host machine, and use this access to potentially attack other machines on the same network as the database machine. Traditionally SQL injections attacks are viewed as a way to gain unauthorized read access to the data stored in the database, modify the data in the database, delete the data, etc. However, almost every data base management system (DBMS) system includes facilities that if compromised allow an attacker complete access to the file system, operating system, and full access to the host running the database. The attacker can then use this privileged access to launch subsequent attacks. These facilities include dro", "query_type": "nl"}
{"_id": "cwe_q_000341", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack scenario, the attacker passively listens for WiFi management frame messages containing the Service Set Identifier (SSID) for the WiFi network. These messages are frequently transmitted by WiFi access points (e.g., the retransmission device) as well as by clients that are accessing the network (e.g., the handset/mobile device). Once the attacker is able to associate an SSID with a particular user or set of users (for example, when attending a public event), the attacker can then scan for this SSID to track that user in the future.", "query_type": "nl"}
{"_id": "cwe_q_000343", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker with access to data files and processes on a victim's system injects malicious data into critical operational data during configuration or recalibration, causing the victim's system to perform in a suboptimal manner that benefits the adversary.", "query_type": "nl"}
{"_id": "cwe_q_000344", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack pattern, the adversary monitors network traffic between nodes of a public or multicast network in an attempt to capture sensitive information at the protocol level. Network sniffing applications can reveal TCP/IP, DNS, Ethernet, and other low-level network communication information. The adversary takes a passive role in this attack pattern and simply observes and analyzes the traffic. The adversary may precipitate or indirectly influence the content of the observed transaction, but is never the intended recipient of the target information.", "query_type": "nl"}
{"_id": "cwe_q_000345", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker takes advantage of the structure of integer variables to cause these variables to assume values that are not expected by an application. For example, adding one to the largest positive integer in a signed integer variable results in a negative number. Negative numbers may be illegal in an application and the application may prevent an attacker from providing them directly, but the application may not consider that adding two positive numbers can create a negative number do to the structure of integer storage formats.", "query_type": "nl"}
{"_id": "cwe_q_000346", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary injects one or more TCP RST packets to a target after the target has made a HTTP GET request. The goal of this attack is to have the target and/or destination web server terminate the TCP connection.", "query_type": "nl"}
{"_id": "cwe_q_000347", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker exploits a weakness in the parsing or display code of the recipient software to generate a data blob containing a supposedly valid signature, but the signer's identity is falsely represented, which can lead to the attacker manipulating the recipient software or its victim user to perform compromising actions.", "query_type": "nl"}
{"_id": "cwe_q_000348", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker can craft special user-controllable input consisting of XPath expressions to inject the XML database and bypass authentication or glean information that they normally would not be able to. the component enables an attacker to talk directly to the XML database, thus bypassing the application completely. the component results from the failure of an application to properly sanitize input used as part of dynamic XPath expressions used to query an XML database.", "query_type": "nl"}
{"_id": "cwe_q_000349", "text": "Identify the underlying software weakness exploited by this attack behavior: Operating system allows logon scripts to be run whenever a specific user or users logon to a system. If adversaries can access these scripts, they may insert additional code into the logon script. This code can allow them to maintain persistence or move laterally within an enclave because it is executed every time the affected user or users logon to a computer. Modifying logon scripts can effectively bypass workstation and enclave firewalls. Depending on the access configuration of the logon scripts, either local credentials or a remote administrative account may be necessary.", "query_type": "nl"}
{"_id": "cwe_q_000350", "text": "Identify the underlying software weakness exploited by this attack behavior: The adversary extracts credentials used for code signing from a production environment and then uses these credentials to sign malicious content with the developer's key. Many developers use signing keys to sign code or hashes of code. When users or applications verify the signatures are accurate they are led to believe that the code came from the owner of the signing key and that the code has not been modified since the signature was applied. If the adversary has extracted the signing credentials then they can use those credentials to sign their own code bundles. Users or tools that verify the signatures attached to the code will likely assume the code came from the legitimate developer and install or run the code, effectively allowing the adversary to execute arbitrary code on the victim", "query_type": "nl"}
{"_id": "cwe_q_000351", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.", "query_type": "nl"}
{"_id": "cwe_q_000352", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary inserts a debugger into the program entry point of a mobile application to modify the application binary, with the goal of evading Root/Jailbreak detection. Mobile device users often Root/Jailbreak their devices in order to gain administrative control over the mobile operating system and/or to install third-party mobile applications that are not provided by authorized application stores (e.g. Google Play Store and Apple App Store). Rooting/Jailbreaking a mobile device also provides users with access to system debuggers and disassemblers, which can be leveraged to exploit applications by dumping the application's memory at runtime in order to remove or bypass signature verification methods. This further allows the adversary to evade Root/Jailbreak detection mechanisms, which ca", "query_type": "nl"}
{"_id": "cwe_q_000353", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary spoofs a checksum message for the purpose of making a payload appear to have a valid corresponding checksum. Checksums are used to verify message integrity. They consist of some value based on the value of the message they are protecting. Hash codes are a common checksum mechanism. Both the sender and recipient are able to compute the checksum based on the contents of the message. If the message contents change between the sender and recipient, the sender and recipient will compute different checksum values. Since the sender's checksum value is transmitted with the message, the recipient would know that a modification occurred. In the component an adversary modifies the message body and then modifies the corresponding checksum so that the recipient's checksum calculation will ", "query_type": "nl"}
{"_id": "cwe_q_000354", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack targets a race condition occurring between the time of check (state) for a resource and the time of use of a resource. A typical example is file access. The adversary can leverage a file access race condition by \"running the race\", meaning that they would modify the resource between the first time the target program accesses the file and the time the target program uses the file. During that period of time, the adversary could replace or modify the file, causing the application to behave unexpectedly.", "query_type": "nl"}
{"_id": "cwe_q_000355", "text": "Identify the underlying software weakness exploited by this attack behavior: Compromising Emanations (CE) are defined as unintentional signals which an attacker may intercept and analyze to disclose the information processed by the targeted equipment. Commercial mobile devices and retransmission devices have displays, buttons, microchips, and radios that emit mechanical emissions in the form of sound or vibrations. Capturing these emissions can help an adversary understand what the device is doing.", "query_type": "nl"}
{"_id": "cwe_q_000356", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits weaknesses in input validation on web-mail servers to execute commands on the IMAP/SMTP server. Web-mail servers often sit between the Internet and the IMAP or SMTP mail server. User requests are received by the web-mail servers which then query the back-end mail server for the requested information and return this response to the user. In an the component attack, mail-server commands are embedded in parts of the request sent to the web-mail server. If the web-mail server fails to adequately sanitize these requests, these commands are then sent to the back-end mail server when it is queried by the web-mail server, where the commands are then executed. This attack can be especially dangerous since administrators may assume that the back-end server is protected against ", "query_type": "nl"}
{"_id": "cwe_q_000358", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker exploits characteristics of the infrastructure of a network entity in order to perpetrate attacks or information gathering on network objects or effect a change in the ordinary information flow between network objects. Most often, this involves manipulation of the routing of network messages so, instead of arriving at their proper destination, they are directed towards an entity of the attackers' choosing, usually a server controlled by the attacker. The victim is often unaware that their messages are not being processed correctly. For example, a targeted client may believe they are connecting to their own bank but, in fact, be connecting to a Pharming site controlled by the attacker which then collects the user's login information in order to hijack the actual bank account.", "query_type": "nl"}
{"_id": "cwe_q_000359", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker gains access to application, service, or device with the privileges of an authorized or privileged user by evading or circumventing an authentication mechanism. The attacker is therefore able to access protected data without authentication ever having taken place.\n\nThis refers to an attacker gaining access equivalent to an authenticated user without ever going through an authentication procedure. This is usually the result of the attacker using an unexpected access procedure that does not go through the proper checkpoints where authentication should occur. For example, a web site might assume that all users will click through a given link in order to get to secure material and simply authenticate everyone that clicks the link. However, an attacker might be able to reach secured", "query_type": "nl"}
{"_id": "cwe_q_000360", "text": "Identify the underlying software weakness exploited by this attack behavior: The adversary takes advantage of a bug in an application failing to verify the integrity of the running process to execute arbitrary code in the address space of a separate live process. The adversary could use running code in the context of another process to try to access process's memory, system/network resources, etc. The goal of this attack is to evade detection defenses and escalate privileges by masking the malicious code under an existing legitimate process. Examples of approaches include but not limited to: dynamic-link library (DLL) injection, portable executable injection, thread execution hijacking, ptrace system calls, VDSO hijacking, function hooking, reflective code loading, and more.", "query_type": "nl"}
{"_id": "cwe_q_000364", "text": "Identify the underlying software weakness exploited by this attack behavior: Applications often need to transform data in and out of a data format (e.g., XML and YAML) by using a parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. By nesting these structures, causing the data to be repeatedly substituted, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization.\n\nAn adversary's goal is to leverage parser failure to their advantage. In most cases this type of an attack will result in a Denial of Service due to an application becoming unstable, freezing, or crashing. However ", "query_type": "nl"}
{"_id": "cwe_q_000366", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary intercepts an implicit intent sent to launch a Android-based trusted activity and instead launches a counterfeit activity in its place. The malicious activity is then used to mimic the trusted activity's user interface and prompt the target to enter sensitive data as if they were interacting with the trusted activity.", "query_type": "nl"}
{"_id": "cwe_q_000367", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker, armed with the cipher text and the encryption algorithm used, performs an exhaustive (brute force) search on the key space to determine the key that decrypts the cipher text to obtain the plaintext.", "query_type": "nl"}
{"_id": "cwe_q_000368", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker crafts malicious web links and distributes them (via web pages, email, etc.), typically in a targeted manner, hoping to induce users to click on the link and execute the malicious action against some third-party application. If successful, the action embedded in the malicious link will be processed and accepted by the targeted application with the users' privilege level. This type of attack leverages the persistence and implicit trust placed in user session cookies by many web applications today. In such an architecture, once the user authenticates to an application and a session cookie is created on the user's system, all following transactions for that session are authenticated using that cookie including potential actions initiated by an attacker and simply \"riding\" the exis", "query_type": "nl"}
{"_id": "cwe_q_000369", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary manipulates the headers and content of an email message by injecting data via the use of delimiter characters native to the protocol.\n\nMany applications allow users to send email messages by filling in fields. For example, a web site may have a link to \"share this site with a friend\" where the user provides the recipient's email address and the web application fills out all the other fields, such as the subject and body. In this pattern, an adversary adds header and body information to an email message by injecting additional content in an input field used to construct a header of the mail message. This attack takes advantage of the fact that RFC 822 requires that headers in a mail message be separated by a carriage return. As a result, an adversary can inject new headers or c", "query_type": "nl"}
{"_id": "cwe_q_000370", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack pattern, an adversary injects a the component packet to one or both ends of a target's connection. The attacker is therefore able to have the target and/or the destination server sever the connection without having to directly filter the traffic between them.", "query_type": "nl"}
{"_id": "cwe_q_000371", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack pattern, the adversary leverages fuzzing to try to identify weaknesses in the system. Fuzzing is a software security and functionality testing method that feeds randomly constructed input to the system and looks for an indication that a failure in response to that input has occurred. Fuzzing treats the system as a black box and is totally free from any preconceptions or assumptions about the system. Fuzzing can help an attacker discover certain assumptions made about user input in the system. Fuzzing gives an attacker a quick way of potentially uncovering some of these assumptions despite not necessarily knowing anything about the internals of the system. These assumptions can then be turned against the system by specially crafting user input that may allow an attacker to ac", "query_type": "nl"}
{"_id": "cwe_q_000372", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary performing this type of attack drops packets destined for a target IP address. The aim is to prevent access to the service hosted at the target IP address.", "query_type": "nl"}
{"_id": "cwe_q_000373", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker initiates a resource depletion attack where a large number of small XML messages are delivered at a sufficiently rapid rate to cause a denial of service or crash of the target. Transactions such as repetitive SOAP transactions can deplete resources faster than a simple flooding attack because of the additional resources used by the SOAP protocol and the resources necessary to process SOAP messages. The transactions used are immaterial as long as they cause resource utilization on the target. In other words, this is a normal flooding attack augmented by using messages that will require extra processing on the target.", "query_type": "nl"}
{"_id": "cwe_q_000374", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker forces the target into a previous state in order to leverage potential weaknesses in the target dependent upon a prior configuration or state-dependent factors. Even in cases where an attacker may not be able to directly control the configuration of the targeted application, they may be able to reset the configuration to a prior state since many applications implement reset functions.\n\nSince these functions are usually intended as emergency features to return an application to a stable configuration if the current configuration degrades functionality, they may not be as strongly secured as other configuration options. The resetting of values is dangerous as it may enable undesired functionality, disable services, or modify access controls. At the very least this is a nuisance a", "query_type": "nl"}
{"_id": "cwe_q_000375", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness in the way an application searches for external libraries to manipulate the execution flow to point to an adversary supplied library or code base. This pattern of attack allows the adversary to compromise the application or server via the execution of unauthorized code. An application typically makes calls to functions that are a part of libraries external to the application. These libraries may be part of the operating system or they may be third party libraries. If an adversary can redirect an application's attempts to access these libraries to other libraries that the adversary supplies, the adversary will be able to force the targeted application to execute arbitrary code. This is especially dangerous if the targeted application has enhanced privileges.", "query_type": "nl"}
{"_id": "cwe_q_000376", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker forces the encryption level to be lowered, thus enabling a successful attack against the encrypted data.", "query_type": "nl"}
{"_id": "cwe_q_000377", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary uses stolen Kerberos tickets to access systems/resources that leverage the Kerberos authentication protocol. The Kerberos authentication protocol centers around a ticketing system which is used to request/grant access to services and to then access the requested services. An adversary can obtain any one of these tickets (e.g. Service Ticket, Ticket Granting Ticket, Silver Ticket, or Golden Ticket) to authenticate to a system/resource without needing the account's credentials. Depending on the ticket obtained, the adversary may be able to access a particular resource or generate TGTs for any account within an Active Directory Domain.", "query_type": "nl"}
{"_id": "cwe_q_000378", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary gains access to an application, service, or device with the privileges of an authorized or privileged user by escaping the confines of a virtualized environment. The adversary is then able to access resources or execute unauthorized code within the host environment, generally with the privileges of the user running the virtualized process. Successfully executing an attack of this type is often the first step in executing more complex attacks.", "query_type": "nl"}
{"_id": "cwe_q_000379", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary is able to disguise one action for another and therefore trick a user into initiating one type of action when they intend to initiate a different action. For example, a user might be led to believe that clicking a button will submit a query, but in fact it downloads software. Adversaries may perform this attack through social means, such as by simply convincing a victim to perform the action or relying on a user's natural inclination to do so, or through technical means, such as a clickjacking attack where a user sees one interface but is actually interacting with a second, invisible, interface.", "query_type": "nl"}
{"_id": "cwe_q_000380", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary manipulates the files in a shared location by adding malicious programs, scripts, or exploit code to valid content. Once a user opens the shared content, the tainted content is executed.", "query_type": "nl"}
{"_id": "cwe_q_000382", "text": "Identify the underlying software weakness exploited by this attack behavior: Web Logs Tampering attacks involve an attacker injecting, deleting or otherwise tampering with the contents of web logs typically for the purposes of masking other malicious behavior. Additionally, writing malicious data to log files may target jobs, filters, reports, and other agents that process the logs in an asynchronous attack pattern. This pattern of attack is similar to \"Log Injection-Tampering-Forging\" except that in this case, the attack is targeting the logs of the web server and not the application.", "query_type": "nl"}
{"_id": "cwe_q_000383", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness in the server's trust of client-side processing by modifying data on the client-side, such as price information, and then submitting this data to the server, which processes the modified data. For example, eShoplifting is a data manipulation attack against an on-line merchant during a purchasing transaction. The manipulation of price, discount or quantity fields in the transaction message allows the adversary to acquire items at a lower cost than the merchant intended. The adversary performs a normal purchasing transaction but edits hidden fields within the HTML form response that store price or other information to give themselves a better deal. The merchant then uses the modified pricing information in calculating the cost of the selected items.", "query_type": "nl"}
{"_id": "cwe_q_000384", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker gets access to the database table where hashes of passwords are stored. They then use a rainbow table of pre-computed hash chains to attempt to look up the original password. Once the original password corresponding to the hash is obtained, the attacker uses the original password to gain access to the system.\n\nA password rainbow table stores hash chains for various passwords. A password chain is computed, starting from the original password, P, via a reduce(compression) function R and a hash function H. A recurrence relation exists where Xi+1 = R(H(Xi)), X0 = P. Then the hash chain of length n for the original password P can be formed: X1, X2, X3, ... , Xn-2, Xn-1, Xn, H(Xn). P and H(Xn) are then stored together in the rainbow table. Constructing the rainbow tables takes a very", "query_type": "nl"}
{"_id": "cwe_q_000385", "text": "Identify the underlying software weakness exploited by this attack behavior: Simple Object Access Protocol (SOAP) is used as a communication protocol between a client and server to invoke web services on the server. It is an XML-based protocol, and therefore suffers from many of the same shortcomings as other XML-based protocols. Adversaries can make use of these shortcomings and manipulate the content of SOAP paramters, leading to undesirable behavior on the server and allowing the adversary to carry out a number of further attacks.", "query_type": "nl"}
{"_id": "cwe_q_000386", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary may execute a flooding attack using XML messages with the intent to deny legitimate users access to a web service. These attacks are accomplished by sending a large number of XML based requests and letting the service attempt to parse each one. In many cases this type of an attack will result in a XML Denial of Service (XDoS) due to an application becoming unstable, freezing, or crashing.\n\nXDoS is most closely associated with web services, SOAP, and Rest, because remote service requesters can post malicious XML payloads to the service provider designed to exhaust the service provider's memory, CPU, and/or disk space. The main weakness in XDoS is that the service provider generally must inspect, parse, and validate the XML messages to determine routing, workflow, security consi", "query_type": "nl"}
{"_id": "cwe_q_000387", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker exploits two layers of weaknesses in server or client software for automated update mechanisms to undermine the integrity of the target code-base. The first weakness involves a failure to properly authenticate a server as a source of update or patch content. This type of weakness typically results from authentication mechanisms which can be defeated, allowing a hostile server to satisfy the criteria that establish a trust relationship. The second weakness is a systemic failure to validate the identity and integrity of code downloaded from a remote location, hence the inability to distinguish malicious code from a legitimate update.\n\nOne predominate type of redirection attack requires DNS spoofing or hijacking of a domain name corresponding to an update server. The target softwa", "query_type": "nl"}
{"_id": "cwe_q_000388", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary searches for and invokes interfaces or functionality that the target system designers did not intend to be publicly available. If interfaces fail to authenticate requests, the attacker may be able to invoke functionality they are not authorized for.\n\nAdversaries can also search for undocumented bits on a hardware device, commonly known as \"chicken bits\". These bits are used to enable/disable certain functionality, but are not published. Adversaries can reverse engineer firmware to identify hidden features and change these bits at runtime to achieve malicious behavior.", "query_type": "nl"}
{"_id": "cwe_q_000389", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a cryptographic weakness in the signature verification algorithm implementation to generate a valid signature without knowing the key.\n\nSignature verification algorithms are generally used to determine whether a certificate or piece of code (e.g. executable, binary, etc.) possesses a valid signature and can be trusted. If the leveraged algorithm confirms that a valid signature exists, it establishes a foundation of trust that is further conveyed to the end-user when interacting with a website or application. However, if the signature verification algorithm improperly validates the signature, either by not validating the signature at all or by failing to fully validate the signature, it could result in an adversary generating a spoofed signature and being classified as", "query_type": "nl"}
{"_id": "cwe_q_000390", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness resulting from using a hashing algorithm with weak collision resistance to generate certificate signing requests (CSR) that contain collision blocks in their \"to be signed\" parts. The adversary submits one CSR to be signed by a trusted certificate authority then uses the signed blob to make a second certificate appear signed by said certificate authority. Due to the hash collision, both certificates, though different, hash to the same value and so the signed blob works just as well in the second certificate. The net effect is that the adversary's second X.509 certificate, which the Certification Authority has never seen, is now signed and validated by that Certification Authority.\n\nAlternatively, the second certificate could be a signing certificate. Thus t", "query_type": "nl"}
{"_id": "cwe_q_000391", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary, through a previously installed malicious application, intercepts messages from a trusted Android-based application in an attempt to achieve a variety of different objectives including denial of service, information disclosure, and data injection. An implicit intent sent from a trusted application can be received by any application that has declared an appropriate intent filter. If the intent is not protected by a permission that the malicious application lacks, then the attacker can gain access to the data contained within the intent. Further, the intent can be either blocked from reaching the intended destination, or modified and potentially forwarded along.", "query_type": "nl"}
{"_id": "cwe_q_000392", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary may execute an attack on a program that uses a poor Regular Expression(Regex) implementation by choosing input that results in an extreme situation for the Regex. A typical extreme situation operates at exponential time compared to the input size. This is due to most implementations using a Nondeterministic Finite Automaton(NFA) state machine to be built by the Regex algorithm since NFA allows backtracking and thus more complex regular expressions.\n\nThe algorithm builds a finite state machine and based on the input transitions through all the states until the end of the input is reached. NFA engines may evaluate each character in the input string multiple times during the backtracking. The algorithm tries each path through the NFA one by one until a match is found; the malicio", "query_type": "nl"}
{"_id": "cwe_q_000393", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary embeds malicious scripts in content that will be served to web browsers. The goal of the attack is for the target software, the client-side browser, to execute the script with the users' privilege level. An attack of this type exploits a programs' vulnerabilities that are brought on by allowing remote hosts to execute code and scripts. Web browsers, for example, have some simple security controls in place, but if a remote attacker is allowed to execute scripts (through injecting them in to user-generated content like bulletin boards) then these controls may be bypassed. Further, these attacks are very difficult for an end user to detect.", "query_type": "nl"}
{"_id": "cwe_q_000394", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack targets the encoding of the URL. An adversary can take advantage of the multiple way of encoding an URL and abuse the interpretation of the URL.\n\nA URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An adversary will try to craft an URL with a sequence of special characters which once interpreted b", "query_type": "nl"}
{"_id": "cwe_q_000395", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker exploits a weakness in input validation by controlling the format, structure, and composition of data to an input-processing interface. By supplying input of a non-standard or unexpected form an attacker can adversely impact the security of the target.\n\nFor example, using a different character encoding might cause dangerous text to be treated as safe text. Alternatively, the attacker may use certain flags, such as file extensions, to make a target application believe that provided data should be handled using a certain interpreter when the data is not actually of the appropriate type. This can lead to bypassing protection mechanisms, forcing the target to use specific components for input processing, or otherwise causing the user's data to be handled differently than might othe", "query_type": "nl"}
{"_id": "cwe_q_000396", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary adds malicious logic, often in the form of a computer virus, to otherwise benign software. This logic is often hidden from the user of the software and works behind the scenes to achieve negative impacts. Many times, the malicious logic is inserted into empty space between legitimate code, and is then called when the software is executed. This pattern of attack focuses on software already fielded and used in operation as opposed to software that is still under development and part of the supply chain.", "query_type": "nl"}
{"_id": "cwe_q_000397", "text": "Identify the underlying software weakness exploited by this attack behavior: Inter-component protocols are used to communicate between different software and hardware modules within a single computer. Common examples are: interrupt signals and data pipes. Subverting the protocol can allow an adversary to impersonate others, discover sensitive information, control the outcome of a session, or perform other attacks. This type of attack targets invalid assumptions that may be inherent in implementers of the protocol, incorrect implementations of the protocol, or vulnerabilities in the protocol itself.", "query_type": "nl"}
{"_id": "cwe_q_000398", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \\) and/or dots (.)) to reach desired directories or files.", "query_type": "nl"}
{"_id": "cwe_q_000400", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker sends a series of probes to a web application in order to elicit version-dependent and type-dependent behavior that assists in identifying the target. An attacker could learn information such as software versions, error pages, and response headers, variations in implementations of the HTTP protocol, directory structures, and other similar information about the targeted service. This information can then be used by an attacker to formulate a targeted attack plan. While the component is not intended to be damaging (although certain activities, such as network scans, can sometimes cause disruptions to vulnerable applications inadvertently) it may often pave the way for more damaging attacks.", "query_type": "nl"}
{"_id": "cwe_q_000401", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).", "query_type": "nl"}
{"_id": "cwe_q_000402", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker manipulates either egress or ingress data from a client within an application framework in order to change the content of messages. Performing this attack can allow the attacker to gain unauthorized privileges within the application, or conduct attacks such as phishing, deceptive strategies to spread malware, or traditional web-application attacks. The techniques require use of specialized software that allow the attacker to perform adversary-in-the-middle (this attack pattern) communications between the web browser and the remote system. Despite the use of AiTH software, the attack is actually directed at the server, as the client is one node in a series of content brokers that pass information along to the application framework. Additionally, it is not true \"Adversary-in-the-", "query_type": "nl"}
{"_id": "cwe_q_000403", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary injects the component into a parser during data processing to produce adverse effects upon the parser such as exhausting system resources and arbitrary code execution.\n\nApplications often need to transform data in and out of serialized data formats, such as XML and YAML, by using a data parser. It may be possible for an adversary to inject data that may have an adverse effect on the parser when it is being processed. By supplying oversized payloads in input vectors that will be processed by the parser, an adversary can cause the parser to consume more resources while processing, causing excessive memory consumption and CPU utilization, and potentially cause execution of arbitrary code. An adversary's goal is to leverage parser failure to their advantage. DoS is most closely as", "query_type": "nl"}
{"_id": "cwe_q_000404", "text": "Identify the underlying software weakness exploited by this attack behavior: An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.", "query_type": "nl"}
{"_id": "cwe_q_000405", "text": "Identify the underlying software weakness exploited by this attack behavior: This type of attack involves an attacker leveraging meta-characters in email headers to inject improper behavior into email programs. Email software has become increasingly sophisticated and feature-rich. In addition, email applications are ubiquitous and connected directly to the Web making them ideal targets to launch and propagate attacks. As the user demand for new functionality in email applications grows, they become more like browsers with complex rendering and plug in routines. As more email functionality is included and abstracted from the user, this creates opportunities for attackers. Virtually all email applications do not list email header information by default, however the email header contains valuable attacker vectors for the attacker to exploit particularly if the behavio", "query_type": "nl"}
{"_id": "cwe_q_000406", "text": "Identify the underlying software weakness exploited by this attack behavior: Some web applications require users to submit information through an ordered sequence of web forms. This is often done if there is a very large amount of information being collected or if information on earlier forms is used to pre-populate fields or determine which additional information the application needs to collect. An attacker who knows the names of the various forms in the sequence may be able to explicitly type in the name of a later form and navigate to it without first going through the previous forms. This can result in incomplete collection of information, incorrect assumptions about the information submitted by the attacker, or other problems that can impair the functioning of the application.", "query_type": "nl"}
{"_id": "cwe_q_000407", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary, through a previously installed malicious application, impersonates an expected or routine task in an attempt to steal sensitive information or leverage a user's privileges.\n\nWhen impersonating an expected task, the adversary monitors the task list maintained by the operating system and waits for a specific legitimate task to become active. Once the task is detected, the malicious application launches a new task in the foreground that mimics the user interface of the legitimate task. At this point, the user thinks that they are interacting with the legitimate task that they started, but instead they are interacting with the malicious application. Once the adversary's goal is reached, the malicious application can exit, leaving the original trusted application visible and the a", "query_type": "nl"}
{"_id": "cwe_q_000408", "text": "Identify the underlying software weakness exploited by this attack behavior: This attack pattern combines malicious Javascript and a legitimate webpage loaded into a concealed iframe. The malicious Javascript is then able to interact with a legitimate webpage in a manner that is unknown to the user. This attack usually leverages some element of social engineering in that an attacker must convinces a user to visit a web page that the attacker controls.", "query_type": "nl"}
{"_id": "cwe_q_000409", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary inserts malicious logic into memory enabling them to achieve a negative impact. This logic is often hidden from the user of the system and works behind the scenes to achieve negative impacts. This pattern of attack focuses on systems already fielded and used in operation as opposed to systems that are still under development and part of the supply chain.", "query_type": "nl"}
{"_id": "cwe_q_000410", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary hijacks a privileged thread of execution by injecting malicious code into a running process. By using a privleged thread to do their bidding, adversaries can evade process-based detection that would stop an attack that creates a new process. This can lead to an adversary gaining access to the process's memory and can also enable elevated privileges. The most common way to perform this attack is by suspending an existing thread and manipulating its memory.", "query_type": "nl"}
{"_id": "cwe_q_000411", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary inserts invalid characters in identifiers to bypass application filtering of input. Filters may not scan beyond invalid characters but during later stages of processing content that follows these invalid characters may still be processed. This allows the adversary to sneak prohibited commands past filters and perform normally prohibited operations. Invalid characters may include null, carriage return, line feed or tab in an identifier. Successful bypassing of the filter can result in a XSS attack, resulting in the disclosure of web cookies or possibly other results.", "query_type": "nl"}
{"_id": "cwe_q_000412", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary gains control of a process that is assigned elevated privileges in order to execute arbitrary code with those privileges. Some processes are assigned elevated privileges on an operating system, usually through association with a particular user, group, or role. If an attacker can hijack this process, they will be able to assume its level of privilege in order to execute their own code.", "query_type": "nl"}
{"_id": "cwe_q_000414", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a weakness in authentication to create an access token (or equivalent) that impersonates a different entity, and then associates a process/thread to that that impersonated token. This action causes a downstream user to make a decision or take action that is based on the assumed identity, and not the response that blocks the adversary.", "query_type": "nl"}
{"_id": "cwe_q_000415", "text": "Identify the underlying software weakness exploited by this attack behavior: In this attack pattern, the adversary intercepts information transmitted between two third parties. The adversary must be able to observe, read, and/or hear the communication traffic, but not necessarily block the communication or change its content. Any transmission medium can theoretically be sniffed if the adversary can examine the contents between the sender and recipient. the component are similar to Adversary-In-The-Middle attacks (this attack pattern), but are entirely passive. AiTM attacks are predominantly active and often alter the content of the communications themselves.", "query_type": "nl"}
{"_id": "cwe_q_000416", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a resource shared between multiple applications, an application pool or hardware pin multiplexing to affect behavior. Resources may be shared between multiple applications or between multiple threads of a single application. Resource sharing is usually accomplished through mutual access to a single memory location or multiplexed hardware pins. If an adversary can manipulate this shared resource (usually by co-opting one of the applications or threads) the other applications or threads using the shared resource will often continue to trust the validity of the compromised shared resource and use it in their calculations. This can result in invalid trust assumptions, corruption of additional data through the normal operations of the other users of the shared resource, or", "query_type": "nl"}
{"_id": "cwe_q_000417", "text": "Identify the underlying software weakness exploited by this attack behavior: The use of cryptanalytic techniques to derive cryptographic keys or otherwise effectively defeat cellular encryption to reveal traffic content. Some cellular encryption algorithms such as A5/1 and A5/2 (specified for GSM use) are known to be vulnerable to such attacks and commercial tools are available to execute these attacks and decrypt mobile phone conversations in real-time. Newer encryption algorithms in use by UMTS and LTE are stronger and currently believed to be less vulnerable to these types of attacks. Note, however, that an attacker with a Cellular Rogue Base Station can force the use of weak cellular encryption even by newer mobile devices.", "query_type": "nl"}
{"_id": "cwe_q_000418", "text": "Identify the underlying software weakness exploited by this attack behavior: An adversary exploits a sample, demonstration, test, or debug interface that is unintentionally enabled on a production system, with the goal of gleaning information or leveraging functionality that would otherwise be unavailable.\n\nNon-production interfaces are insecure by default and should not be resident on production systems, since they may reveal sensitive information or functionality that should not be known to end-users. However, such interfaces may be unintentionally left enabled on a production system due to configuration errors, supply chain mismanagement, or other pre-deployment activities. Ultimately, failure to properly disable non-production interfaces, in a production environment, may expose a great deal of diagnostic information or functionality to an adversary, which can b", "query_type": "nl"}
{"_id": "cwe_q_000419", "text": "Identify the underlying software weakness exploited by this attack behavior: The adversary bypasses input validation by using doubled characters in order to perform a cross-site scripting attack. Some filters fail to recognize dangerous sequences if they are preceded by repeated characters. For example, by doubling the < before a script command, (<