This shows you the differences between two versions of the page.
cns:labs:lab-04 [2021/11/02 17:31] razvan.deaconescu [1. write] |
cns:labs:lab-04 [2022/10/31 17:22] (current) mihai.dumitru2201 [Tasks] |
||
---|---|---|---|
Line 350: | Line 350: | ||
All content necessary for the CNS laboratory tasks can be found in [[cns:resources:repo|the CNS public repository]]. | All content necessary for the CNS laboratory tasks can be found in [[cns:resources:repo|the CNS public repository]]. | ||
- | |||
- | Submit your flags to [[https://cns-lab-ctf21.cyberedu.ro/|the CNS CyberEDU Platform]]. | ||
Line 391: | Line 389: | ||
<code C> | <code C> | ||
- | execve('/bin/sh', ['/bin/sh'], 0); | + | execve("/bin/sh", ["/bin/sh", NULL], NULL); |
</code> | </code> | ||
- | Where //['/bin/sh']// denotes the **address** of the string '/bin/sh'. | + | Where ''["/bin/sh", NULL]'' denotes the **address** of the array of two strings address: the address of the ''"/bin/sh"'' string and the ''NULL'' address. |
<note tip> | <note tip> | ||
- | You need to get the string '/bin/sh' on the stack. You can do this using the hack from the write challenge. | + | You need to get the address of the string ''"/bin/sh"'' on the stack. |
+ | You can do this using the hack from the write challenge. | ||
</note> | </note> | ||
<note tip> | <note tip> | ||
- | You can browse around shellstorm for examples; however, keep in mind that they may not work due to some registers not being set properly. | + | You can browse around shellstorm for examples; |
+ | however, keep in mind that they may not work due to some registers not being set properly. | ||
</note> | </note> | ||
==== 3. execve with no zeros ==== | ==== 3. execve with no zeros ==== |