Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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  ====
cns/labs/lab-04.1635867066.txt.gz · Last modified: 2021/11/02 17:31 by razvan.deaconescu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0