EC-COUNCIL EC-Council Certified Secure Programmer v2 - 312-92 Exam Practice Test

Question 1
What type of problem or error will result from the following statement?
void f2b(void * arg, size_t len)
{
char buffer[100];
long val = ...;
long *ptr = ...;
extern void (*f)();
memcpy(buff, arg, len);
*ptr = val;
f();
return;
}

Correct Answer: C
Question 2
William is the lead programmer for Gummerson, Inc., a software company located in San Francisco. Gummerson is looked upon as one of the leading software development companies for medical and health related applications. William believes that his company is so successful because they believe in involving the user or client in the design and development of the programs. What software development methodology does Gunnerson, Inc. use when creating applications for clients?

Correct Answer: C
Question 3
In the following socket programming code, who will the server allow connections from?
int main(void)
{
int s1, s2;
s1 = socket(AF_INET, SOCK_STREAM, 0);
sin.sin_port = htons(30);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = 0;
bind(sockfd, (struct sockaddr *)&sin, sizeof(sin));
listen(sockfd, 10);
s2 = accept(sockfd, 10);
write(s2, "hello\n", 6)
}

Correct Answer: D
Question 4
Mathew is working on a Fedora machine and is having issues with some shellcode he wrote that is producing errors. Mathew decides to download and use Ktrace to debug the shellcode to see where the errors are originating from. Why will his plan not work?

Correct Answer: A
Question 5
Jayson is the head developer of a team working on an inventory tracking and maintenance program. Jayson and his team are in the third phase of the software development life cycle, designing the program. In their current development phase, what material would be considered the input for their program?

Correct Answer: C
Question 6
What programming threat model with six categories includes repudiation, spoofing identity, information disclosure and so on?

Correct Answer: C
Question 7
What function can be used with SQL to encrypt user suppliedpasswords so that they can be compared with the encrypted passwords stored on the SQL server?

Correct Answer: A
Question 8
What two encryption methods are used by the Secure Electronic Transaction system?

Correct Answer: C,D
Question 9
Lyle is writing some code in VB.NET and is implementing some build-in security. What type of .NET security is Lyle using in the following code?
public class Myclass1
Public Sub New()
End Sub
Public Sub MyMethods()
Dim Perm As New MyPermission()
Perm.Demand()
End Sub
Pub Sub YourMethod()
End Sub
End Class

Correct Answer: C
Question 10
Jacob just purchased the BlueFire Mobile Security Enterprise software package for all his company's mobile devices. Jacob wants to configure the software so that it will quarantine a device by blocking all incoming and outgoing network communication if a breach or violation has occurred. What feature of the BlueFire software will be able to accomplish this?

Correct Answer: B