quiz1spring23

pdf

School

New York University *

*We aren’t endorsed by this school

Course

312

Subject

Computer Science

Date

Apr 3, 2024

Type

pdf

Pages

27

Uploaded by DrOryxPerson763

Report
Previous Pape Next N' Pasc 1 Of 16 Question 1 (6.25 points) Which countermeasures did we disable in Lab 1/Part 1 to facilitate the buffer overflow attack? | | Stack Protection q—— [ | ASLR “— [ RELRO | | Fortify Source If needed, you may view the pre-recorded course lessons here. Previous Page mm Page 1 Of 16 BT oo Previous Page Next Page Page 2of 16 Question 2 (6.25 points) Khe EIP/RIP (Program Counter) register stores the address of the next instruction to be executed by the CPU. () True () False if needed, you may view the pre-recorded course lessons here, Previous Page Next Page Page 2 of 16 1 of 16 questions saved
Question 3 (6.25 points) Saved If nyuappsec can exploit a SetUID program owned by root and execute a shell without callir setuid|{0) in the shellcode, ... () nyuappsec can obtain a root shell in dash. () the SetUID will prevent nyuappsec from obtaining a shell, () nyuappsec can obtain a root shell in zsh. () root will be forced into an unprivileged shell in zsh, If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 3 of Jof 16 questions saved Previcus Page Next Pagn Page 4 of Question 4 (6.25 points) From lab 1/Part 1, what was the major obstacle described when transitioning from your 32- attack to your &4-bit attack? () 0x90 bytes. () The offset. () Shelicode instructions. () 0x00 bytes. If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 4 of 3 of 16 questions saved
Previcus Page Next Page Page S of Question 5 (6.25 points) Saved The REBP/RSP register stores the address of the next instruction to be executed by the CPU. ' True (e) False Iif needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 5 of ! m 5 of 16 questions saved Previcus Page Next Page Page Question 6 (6.25 points) Saved Which of the following could be the cutput of this program on a 64-bit Linux system? int main() { int var = 97; printf(*AS:%d-7\n", var); } (®) AS:97-7 () AS97-7 () AS90 () AS:90
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Previcus Page Next Page Page 7 of 16 Question 7 (6.25 points) Saved Perfarmed in Lab 1, what did the following command do? sudo /sbin/sysot]l -wv kernel.randomize_va_space~2 (") Disabled ASLR (®) Enabled ASLR () Disabled Virtual Address Space () Enabled Virtual Address Space if needed, you may view the pre-recorded course lessons here, Previous Page Next Pagw Page 7 of 16 7 of 16 questions saved Previcus Page Next Page Page Pof 16 Question 9 (6.25 points) Saved What is true regarding static analysis tools and techniques? () They are for detecting memory leaks. () They require exercising of the application and interaction with the program features, (®) They are ideal for drawing conclusions about a program without executing it. () They are ideal for determining code coverage for a given input. If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 9 of 16
Previcus Page Next Page Page 10 of 16 Question 10 (6.25 points) Saved Memory safety-related bugs incdlude all of the following, except... () buffer overflow () format string (®) use-before free (UBF) () double-free If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 10 of 16 Previous Page Next Page Page 110of 1 Question 11 (6.25 points) Saved 8 bits can be use to represent values up to () 1024K @) 256 () 64K (] 2048 If needed, you may view the pre-recorded course lessons here. Bosdniie Basa Slausd Bawa Me o A a2 a
Previcus Page Next Page Page 12 of 16 Question 12 (6.25 points) Saved Address Space Layout Randomization (ASLR) protects applications by preventing buffers from overflowing (®) True () False q¢—— if needed, you may view the pre-recorded course lessons here, Previous Pape Next Fage Page 12 of 16 B 2o oo o Previcus Page Next Page Page 13 of 16 Question 13 (6.25 points) Saved Peach Fuzzer is... (®) a smart fuzzer. () is not a security-related tool, () a dumb fuzzer. () also known as Zzuf. If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 13 of 16 s ... .
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Previcus Page Next Page Page 14 of 16 Question 14 (6.25 points) Saved Gitis a... (®) distributed version control system, () decentralized version control system, 'fi,;f: distributed software package management system., () decentralized software package management system. If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 14 of 16 Previcus Page Next Pagn Page 150f 16 Question 15 (6.25 points) Saved __________ control is a category of processes and tools designed to keep track of multiple different versions of software, content, documents, websites and other information in development. () Source () Stack ) Git () Version
Previous Page Next Page Page 16 0of 16 Question 16 (6.25 points) - Saved If you want to find a format string vulnerability in a very big project, fuzzing is a better technigue than static analysis. (®) True () False « Iif needed, you may view the pre-recorded course lessons here, Previous Page Next Page Page 16 of 16 Question 1 3,125 / 6.25 points Which countermeasures did we disable in Lab 1/Part 1 to facilitate the buffer overflow attack? = . Stack Protection = % ASLR v RELRO v Fortify Source Question 4 0/ 6.25 points From lab 1/Part 1, what was the major obstacle described when transitioning from your 32-bit attack to your 64-bit attack? 0x90 bytes. The offset. Shellcode instructions. content |[offsetioffser + L) = (ret).to bytes(L,byteorder~'little’) with open( badfile’, 'wb') as £: f.write(contant) The number of bytes between EIP and EBP. = The number of bytes between the vulnerable buffer and the return address stored in the stack frame, % « The number of bytes between the vulnerable buffer and EBP. EBP + 112 Question 12 0/ 6.25 points Address Space Layout Randomization {ASLR) protects applications by preventing buffers from tverflowlng % * True - False Question 16 0/ 6.25 points If you want to find a format string vulnerability in a very big project, fuzzing is a better technigue than static analysis. x * True = False
Previous Page Next Page Page 1 of 16 Question 1 (6.25 points) Saved Which is not a version control system? @ MakeKeeper .f_-_j: Concurrent Version System () Bazaar () Git If needed, you may view the pre-recorded course lessons here. Previous Page Nm@ge Page 1 of 16 Submit Quiz 1 of 16 guestions saved Previous Page Next Page Page 2 of 16 Question 2 (6.25 points) Saved In Return-Oriented Programming (ROP), malicious control of the program is obtained by overwriting the return address on the stack. (@) True () False < If needed, you may view the pre-recorded course lessons here. Previous Page Next Page Page 2 of 16
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Previous Page Next Page Page 3 of 16 Question 3 (6.25 points) Saved Which is not a benefit of CI/CD automation? (") Faster and Easier Testing () Increased Code Coverage () Scalability @ Compacted Information (Cl) Question 4 (6.25 points) Saved Place the build steps that a compiler takes to compile C code in order o Locator | | 2 o Preprocessing | 1 o ’Compiling ‘L 4 « | Linker ; Previous Page Next Page Page 5 of 16 Question 5 (6.25 points) Saved Code coverage is the percentage of code which is covered by automated tests (®) True () False If needed, you may view the pre-recorded course lessons here,
Question 7 (6.25 points) Saved The two major types of fuzzers include... dumb ") dynamic " | static (v) smart Question 8 (6.25 points) Saved Which of the following commands will upload your local repository contents to a remote repository, using Git? () git clone -u origin main ;f_’_‘_f;| git pull -u origin main () git add -u origin main (®) sit pu@u origin main Question 9 (6.25 points) Saved What is Ox90? (:} An assembly language pneumonic that represents 'no operation. :j"'_j;. The decimal value, 90, converted to hexadecimal format. () ACPU opcode that represents 'execute shellcode! (e) A CPU opcode instruction that represents 'no operation Question 10 (6.25 points) * Saved What is this? const char var[] = "Ax31\xcB\ x50\ X638 \ %2\ x2f\x73\ x68\x68 \x2f" "\x62\x69\x6e\ %89 \xe3 x50\ x53\x8% \xel\x31" "\xd2\x31\xca8\xba\x00 \xcd\x80"; () SetUID Syscall () Assembly Code () Source Code ;I Shell Code
Question 11 (6.25 points) Saved Netcat (nc) can be used to read and write data across a network connection (®) True () False If needed, you may view the pre-recorded course lessons here, Question 12 (6.25 points) Saved What countermeasure. specific to the dash shell, did we have to defeat to obtain a root shell during S EOI e LIRS G E TG E T 1 B o Ta s K () Stack Protection (Canaries) @ Address Space Layout Randomization () EUID vs UID Privilege Comparison () No eXecution (NX) Bit Previous Page Next Page Question 13 (6.25 points) Saved Page 13 of 16 chmod 4755 a.out command turns on the SetUID bit. How does configuring the SetUID bit on a file change its execution? () It will be executed as root. @ It will be executed as the user that owns () It will be executed as zsh or dash, depenéir_rg on the shell. () It will be executed as the group that owns the file. Question 14 (6.25 points) Saved What does %n represent, as a printf specifier? () The modulus of a number () Astring (@) The number of characters written () A series of NOP (No-Operation) instructions, or a nopsled
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 16 (6.25 points) Saved function's stack frame on a 64-bit system is generally between which two pointer locations? () RIP and RBP (@) RBP and RSP () RIP and HEAP () RIP and RSP Question 2 In Return-Oriented Programming (ROP), malicious control of the program is obtained by overwriting the return address on the stack % (e True = False Question 4 Place the build steps that a compiler takes to compile C code in order % 1 (4) Locator X _2 (1) Pra’processilwg ¥ __3 _(2) Compiling ®x _.4 _(3) Linker Question 12 What countermeasure, specific to the dash shell, did we have to defeat to obtain a root shell during buffer overflow exploitation in | Stack Protection (Canaries) 3 (e Address Space Layout Randomization = EUID vs UID Privilege Comparison
Previous Page Next Page Page 5 of 16 Question 5 (6.25 points) .~ Saved What countermeasure, specific to the dash shell, did we have to defeat to obtain a root shell during buffer overflow exploitation in Lab 1 Part 1? (:) Stack Protection (Canaries) () Address Space Layout Randomization (@) EUID vs UID Privilege Comparison () No eXecution (NX) Bit Previous Page Next Page Page 6 of 16 Question 6 (6.25 points) ' Saved The EIP/RIP (Program Counter) register stores the address of the next instruction to be executed by the CPU. (@) True () False Previous Page Next Page Page 9 of 16 Question 9 (6.25 points) - Saved 16 bits can be used to represent values up to () 1024K () 2048 () 256 (o) 64K
Previous Page Next Page Page 13 of 16 Question 13 (6.25 points) Saved StackGuard is a memory protection mechanism based on canaries. (@) True () False If needed, you may view the pre-recorded course lessons here. Question 14 (6.25 points) ' Saved o is a defense against heap spraying attacks. () Address Sanitizer ¢ (®) Heap Canary () Heap Token () Use-After-Free (UAF) Question 15 (6.25 points) . Saved If you want to find a format string vulnerability in a very big project, fuzzing is a better technique than static analysis. () True (e) False I mandad vinii manuvinau bha nea vacavdad caviven laccane hava
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 2 Which countermeasures did we disable in Lab 1/Part 1 to facilitate the buffer overflow attack? = . Stack Protection % |~ RELRO % . Fortify Source = X ASLR Question 14 __________ is a defense against heap spraying attacks. = () Address Sanitizer % (o Heap Canary Heap Token Use-After-Free (UAF)
Question 1 (6.25 points) Which is not a benefit of CI/CD automation? @ Compacted Information (Cl) () Scalability () Increased Code Coverage () Faster and Easier Testing If needed, you may view the pre-recorded course lessons here. Ly pagc Submit Quiz 0 of 16 questions saved i I Previous Page : ! Question 2 (6.25 points) ; Which is not a version control system? (O Concurrent Version System / () Bazaar }’g @B MakeKeeper / O Git If needed, you may view the pre-recorded course lessons here. ¥ 4 Previous Page Next Page : L & giFry PIREPOE SR ETEE T BN 00N -lgrL«.'\'v’m‘..'.‘,.»,.»:-‘.‘..z.‘.;._:‘u‘m-.vmah@afinfl‘ P;" Gy | AT S [ 4. PR
Previous Page N * : Page 3 of Question 3 (6.25 points) E —=————__ Control is a catego ry of processes and | R bl ity tools designed to keep track of multiple - w - ' 0 = If needed, you may view the pre-recorded course lessons here. Previous Page m Page 3 of 16 Submit Quiz 2 of 16 questions saved \ ~ Screenshot | RN e
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
i ! m--mml ) bdghtspmnyuQdud2|I|mslquuzzlngfusellaltempthunz start_frame_auto. d21"ou =2473888isprv= &drc-o&ar-276967&clql =0&dnb=08&fromQB= =0&inProgress=0 Quiz 1 5 { X ime Limit: 1:30:00 Time Left:1:24:21 Arul Yagappan: Attempt 1 Page 1: . v ([ Pase 4ot 1 | 1 v | Question 4 (6.25 points) | Page 2: From the learning modules, which heap-based vulnerability is present in the following line of code? 4 2 v char® ptr = (char+*)malloc (SIZE); if (err) {( abandon = 1; P“' 3: free(ptr); } 3 if (abandon) ( v sendError(“Abandon!®, ptr); } Page 4 () Integer Overflow - 4 il () Double Free - Page 5: (©) Heap Overflow 3 -:j%Use-After Free (UAF) 5 \ 6 If needed, you may view the pre-recorded course lessons here, 3 of 16 questions saved hizps /Swww sl What is ve
- 53 77 The pas lIlflglusl‘rl.\tlemp!lqui?_slart fr : ame_auto d?l"ou:247388&isnrv:&drc: PO Quiz 1 ‘ime Limit: 1:30:00 0&0i=?76967&chl:O&dnb:O&'romOB:OAMWoéress=0 Time Left:1:23.09 Arul Yagappan: Attempt 1 2 X X Page 1: el . | | 1 M W Question 5 (6.25 points) Page 2 StackGuard isa memory protection mechanism based on canaries. i | > @True v () False Page 3: | 3 v If needed, you may view the pre-recorded course lessons here, | e - | 4 { v AL Submit Quiz 4 of 16 questions saved age 5: of o 5 J Page 6: 2 of we Page 7: | ¥ X 7 s of k Page 8:
| .Pl.'e\‘rious Page - Next Page Question 6 (6.25 points) If you.want to find a format string vulnerabili technique than static analysis. () True @7 False | » » { ty in a very big project, fuzzing i b e AN S If needed, you may view the pre-recorded course lessons here. Submit Quiz 5 of 16 questions saved e Question 7 (6.25 points) v Saved 16 bits can be used to represent values up to (O 2048 () 1024K () 256 @ 64K 'L“—aflx—& DSy I WL NS0 LW e B If needed, you may view the pre-recorded course lessons here. Previous Page 7 of 16 questions saved submit Quiz Screenshot
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
D R R R R I LA R A LR R N R wqns PIAES suonsanb 91 Jo8 zinD W9 a8ed PN a3ed snolAid ‘papaau '3191] SUOSS| 254N02 papJo:aJ-aJd ay} MaJA Aeul noA ‘papa3u 4| ‘suol3oniisul Ndd 404 pasn aq p|noys Alowaw )2oels @ san[eA ajqelieA [e30] 21035 UED Alowdw woeys () e7ep Wei301d 10} pasn g pNOYs AIOUIDUI XOEIS O -1983ngap e Suisn Alowaw XI€3s aujWEexa ued NOA Q ;AJowau ¥2e3s Jnoge anJj J0u si YdIYM (sjuiod 6Z'9) 6 UOlSAND a8ed snojaaig Jwqns panes suoysanb o1 40L zinD ¥ _a.id 9y} M3IA Aew noA ‘papaau il 243y su0ss9| 954N02 pSPJODQJ %06+ @ %09 O %05 O %sz O punose adejuadiad e aney |nom 281302 9p0I POO3 Y}IM 35e(apod ‘lesaua3d ul ‘83njosqe Jou si 98e19A02 3p0d 3|IYAM (sjuiod 6Z'9) g uonsand) /)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
. Page 1: S g Previous Page ‘Next Page 1 v Question 10 (6.25 points) Page 2: GitHub will by default decline any non-signed commit. 2 () True v @ False Page 3: 3 iow the pre-recorded course lessons here. 7 If needed, you may Vi Page 4: Previous Page 4 v ~ Submit Quiz 9 of 16 questions saved Page 5: F | v page 6: (6] &5 --bfl?HéIIJ Attempt 1 Previous Page m : Page 11 of 16 Question 11 (6.25 points) v Saved Which of the followi A owing tools measures th 2 of & pogram? S the statement, function, and branch coverage metrics () valgrind (®) Icov O sgec () GitHub Actions If needed, you may view the pre-recorded course lessons here. 11 of 16 Previous Page Page Submit Quiz 11 of 16 questions saved
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 12 (6.25 points) Which of the following commands would cause a seg int main(int argc, char **argv) { FILE *input_fd = fopen(argv([2],'r"); thisone = gift_card_reader(input_fd); if (argv[1][0] == '1") print_gift_card_info(thisone); else if (argv[1][0] == '2') gift_card_json(thisone); return O; } l () ./giftcardreader -1 examplegiftcard.c ; () ./giftcardreader 1 examplegiftcard.c ' | [i @ Jgiftcardreader examplegiftcard.c | l fi L (%) /glftcardreader 3 exampleglftcard C R L e .1;-‘..ug..x.wummai.fldmm
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Question 13 (6.25 points) Whi . hich blocks of code are not responsible for the infinite loop from assignment 17 @ case Ox06: regs[argl] += regs[arg2]; zf = Iregs[argl]; break; D case 0x09: pc += (char)argl; break; @ case 0x09: break; case 0x08: 2 goto done; y view the pre-recor Question 14 (6.25 points) If needed, you M3 GitHub Actions automatically determines how to run your tests True Q False : If needed, you may view the pre-recorded course lessons hers Submit Quiz 13 of 16 questions saved pc += (unsigned char)argl; ded course lessons here.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
T T W VW W TOREPMEE L FVAS T & alge = YLv4), switch (*pc) { } case 0x00: break; case Ox01: regs(argl)] = *mptr; break; case Ox02: *mptr = regsfargl); break; case 0x03: mptr += (charjargl; break; case Ox04: regsfarg2) = argl; break; case Ox05: regsfarg1] ~= regslarg2); z2f = ‘regslargll: break; case Ox06: regs{arg1)] += regsfarg2); zf = 'regslargl): break; case 0x07: puts(msg); break; case Ox08: goto done; case 0x09: pc += (unsigned charjargl: break; case Ox10: if (zf) pc += (charjarg1; break; pct=3; if {pc > program+256) break; infinite loop ") heap spray S ] Buffer overflow none of the above B
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Ques;ct-on '16 {6.25 points) W What is the cause of the segmentation Code; : | fault from assignment 1 on the lines of code showr? 1 while (!feof(input_fd)) | struct gift_card_data "gcd_ptr; /* JAC: Why aren't return types checked? */ fread(fret_val->num_bytes, 4,1, input_fd); J/ Make something the size of the rest and read it in ptr = malloc{ret_val-»num_bytes); fread(ptr, ret_val->num_bytes, 1, input_fd}; optr = pir-4; ~ malloc crashed because of an invalid argument & fread crashes because ptris null pptr is out of bounds ': .I » b -
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help