312-92 Exam Details

  • Exam Code
    :312-92
  • Exam Name
    :EC-Council Certified Secure Programmer v2 (ECSP)
  • Certification
    :EC-COUNCIL Certifications
  • Vendor
    :EC-COUNCIL
  • Total Questions
    :99 Q&As
  • Last Updated
    :Jul 12, 2026

EC-COUNCIL 312-92 Online Questions & Answers

  • Question 91:

    What type of error will result from the following statement?

    int main(int argc, char* argv[])

    {

    char i[7];

    strncpy(i, "sdfusdofof", sizeof(i));

    }

    A. Unbounded string copy
    B. Null-termination
    C. String-termination
    D. String truncation

  • Question 92:

    Travis is writing a website in PHP but is worried about its inherent vulnerability from session hijacking. What function could Travis use to protect against session hijacking in his PHP code?

    A. Renew_session_id
    B. PHP_id_renew
    C. Create_newsession_id
    D. Session_regenerate_id

  • Question 93:

    Victor has completed writing his software application and is now working on error messages that will be displayed in case of any kind of failure or problem. He has written code that will display a pop-up message where there is an error. He has also written code that explain the error that has occurred.

    What is the last aspect of error messages that Victor needs to create for his application?

    A. Display exact code in application where erroroccurred
    B. Suggest solution
    C. Shut down application so no damage canoccur
    D. Fix error in application

  • Question 94:

    Tyler is in the applicaion testing phase of a particular project. He has decided to use the White Box testing method. Tyler has made a number of changes to his code after some initial tests found some bugs. Tyler now needs to test the code with those changes in place.

    What type of testing is Tyler getting ready to perform?

    A. Integration testing
    B. Mutation testing
    C. Statement coverage testing
    D. Branch coverage testing

  • Question 95:

    What type of problem will result if the following statement is used?

    int main()

    {

    short int a;

    unsigned short int=b32768;

    a=b;

    printf( " a = %d", a);

    b=65535;

    a=b;

    printf( " a = %d", a);

    }

    A. Truncation
    B. Pointer subterfuge
    C. Sign error
    D. Function-pointer clobbering

  • Question 96:

    Carl is writing cgi-bin scripts in PERL for some web pages. He is concerned about malicious users trying to exploit the site and/or the cgi-sripts. If Carl uses the following code, what will he be able to prevent? $filename =~ s/[^A-Za-z0-9_-.//g

    A. Dangerous input expression
    B. Algorihmic complexity attacks
    C. XSS attack
    D. Insecure environmental variables

  • Question 97:

    What is the following shellcode trying to accomplish?

    int main(void) {

    mkdir("A");

    chdir("A");

    chroot("..//..//..//..//..//..//..//..//");

    system("/bin/sh")

    A. Corrupt the Linux kernel
    B. Break out of "chroot jail"
    C. Traverse to the /bin/sh directory
    D. Create a buffer overflow

  • Question 98:

    After learning from an external auditor that his code was susceptible to attack, George decided to rewrite some of his code to look like the following.

    What is George preventing by changing the code?

    public voif doContent(...) {

    ...

    String s;

    if ((s = getUsernameByID("userid")) != null) {

    s = StringUtils.encodeToHTML(s, 50);

    response.write("
    Applicant:" + s +

    "");

    }

    ...

    }

    A. Query string manipulation
    B. XSS attack
    C. Cookie poisoning
    D. SQL injection

  • Question 99:

    What type of encryption will be used from the following code? Dim Publickey As Byte() = {214,46,220,83,160,73,40,39,201

    155,19,202,3,11,191,178,56,74,90,36,248,103,

    18,144,170,163,145,87,54,61,34,220,222,207,

    137,149,173,14,92,120,206,222,158,28,40,24,

    30,16,175,108,128,35,203,118,40,121,113,125,

    216,130,11,24,9,0,48,194,240,105,44,76,34,57,

    249,228,125,80,38,9,136,29,117,207,139,168,181,

    85,137,126,10,126,242,120,247,121,8,100,12,201,

    171,38,226,193,180,190,117,177,87,143,242,213,

    11,44,18,0,113,93,106,99,179,68,175,211,164,116,

    64,148,226,254,172,147}

    Dim Exponent As Byte() = {1,0,1}

    Dim Encrypted SymmetricKey() As Byte

    Dim Encrypted SymmetricIV() As Byte

    Dim RSA as New RSACryptoServiceProvider()

    Dim RSAKeyInfo As New RSAParameters()

    RSAKeyInfo.Modules = PublicKey

    RSAKeyInfo.Exponent = Exponent

    RSA.ImportParameters(RSAKeyInfo)

    Dim RM As New RijendaelManaged()

    EncryptedSymmetricKey = RSA.Encrypt(RM.Key,False)

    EncryptedSymmetricIV = RSA.Encrypt(RM.Key,False)

    A. Symmetric encryption
    B. MITM encryption
    C. Reverse-key encryption
    D. Asymmetric encryption

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only EC-COUNCIL exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 312-92 exam preparations and EC-COUNCIL certification application, do not hesitate to visit our Vcedump.com to find your solutions here.