85 lines
2.2 KiB
Plaintext
85 lines
2.2 KiB
Plaintext
Script started on Thu 24 Feb 2022 10:34:10 AM CST
|
||
[?1034hbash-4.2$ ./vulnerable_capp
|
||
|
||
Enter the password now: aaaa
|
||
|
||
Login failure
|
||
|
||
suppliedPassword: aaaa
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 4
|
||
correctPassword: aaaaabbbbbccccc
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 15
|
||
|
||
bash-4.2$ ./vulnerable_capp
|
||
|
||
Enter the password now: aaaaabbbbbccccc
|
||
|
||
Login successful
|
||
|
||
suppliedPassword: aaaaabbbbbccccc
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 15
|
||
correctPassword: aaaaabbbbbccccc
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 15
|
||
|
||
bash-4.2$ perl -e 'print "a"x90' | ./vulnerable_capp
|
||
|
||
Enter the password now:
|
||
Login successful
|
||
|
||
suppliedPassword: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 90
|
||
correctPassword: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 58
|
||
|
||
Segmentation fault
|
||
bash-4.2$ ./protected_capp
|
||
|
||
Enter the password now: aaaa
|
||
|
||
Login failure
|
||
|
||
suppliedPassword: aaaa
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 4
|
||
correctPassword: aaaaabbbbbccccc
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 15
|
||
|
||
bash-4.2$ ./protected_capp
|
||
[C[C[C[C[C[C[C[C[C[Cperl -e 'print "a"x90' | ./vulnerable_capp
|
||
[C[C[C[C[C[C[C[C[C[C[26P./protected_capp
|
||
|
||
Enter the password now: aaaaabbbbbccccc
|
||
|
||
Login successful
|
||
|
||
suppliedPassword: aaaaabbbbbccccc
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 15
|
||
correctPassword: aaaaabbbbbccccc
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 15
|
||
|
||
bash-4.2$ perl -e 'print "a"x90' | ./protected_capp
|
||
|
||
Enter the password now:
|
||
Login failure
|
||
|
||
suppliedPassword: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||
sizeof(suppliedPassword) = 20
|
||
strlen(suppliedPassword) = 90
|
||
correctPassword: aaaaabbbbbccccc
|
||
sizeof(correctPassword) = 20
|
||
strlen(correctPassword) = 15
|
||
|
||
*** stack smashing detected ***: ./protected_capp terminated
|
||
Segmentation fault
|
||
bash-4.2$ exit
|
||
exit
|
||
|
||
Script done on Thu 24 Feb 2022 10:36:25 AM CST
|