/* * This reference program was developed in March 2011 as part of CIT599 * Independent Research by Hamda Hasan * * This code implements CWE-259: http://cwe.mitre.org * This code implements Hard-coded Password vulnerability in a "Basic" structure */ using System; using System.Collections.Generic; using System.Text; class HardCodedPassword_259 { public static bool checkPassword(string pass) { string password = pass; if (password.Equals("654321")) return true; else return false; } static void Main(string[] args) { Console.WriteLine(HardCodedPassword_259.checkPassword("test")); } }