- Dec 2020
-
www.nsf.gov www.nsf.gov
-
SCC: UNITE: Smart, Connected, and Coordinated Maternal Care for Underserved Communities
Tags
Annotators
URL
-
-
www.nsf.gov www.nsf.gov
-
community asset mapping (CAM) technology
In this proposal it is for patients with dementia. But the concept is broader:
Community cartographers seek to identify the resources that are present in the community, and focus on the problem-solving abilities of the neighborhood’s residents.
https://www.courtinnovation.org/sites/default/files/documents/asset_mapping.pdf
Tags
Annotators
URL
-
- Sep 2020
-
104.131.54.192:8080 104.131.54.192:8080
-
Linked List
Implementaciones en C++!
-
-
104.131.54.192:8080 104.131.54.192:8080
-
Insert
cambiar a C++
-
-
104.131.54.192:8080 104.131.54.192:8080
-
referred
que significa default en funciones pure virtual?
-
ADT
quitar static a función
-
- Dec 2018
-
-
int i; int *a[1]; for( i = 0 ; i < 20; i++) printf("%p\n", a[i]);
Imagine that you insert this code in a certain function. What is the meaning of the values printed? Hint: Notice the size of array
a
and the number of iterations of thefor
loop. -
5. Extra: FixME [3p]
The first 6 bytes of
main.bad
are damaged. Fix them manually using bless to look like those of a 64-bit ELF.Then find out what is the address of
_start
and change the starting address of the binary to that address. -
chmod +x ./mycode.bin && ./mycode.bin
Just because the mycode.bin file contains assembly instructions does not mean that the loader will run. The loader needs the file in the ELF file format.
-
./shellcode generate > mycode.bin
Running the shellcode with a CMA will output the binary of the byte array. You can inspect the
mycode.bin
it will contain the same bytes as the SC string. -
Inspect the source code of shellcode.c
Whenever the code is invoked with no command line arguments (argc==1) it tries to run the SC bytes as code.
ret = (int(*)())SC; (int)(*ret)();
-
the loader only knows about segments
The sections are for the compiler. The segments are for the loader.
-
section
The symbol table lists the address that is assigned to SC. You can find which section corresponds to that address in the Section Table (use the -S flag fro readelf).
-
readelf -s ./shellcode | grep SC
SC is a array of characters. SC and all other symbols are listed in the symbol table of the ELF. The symtab list information such as: name, scope (LOCAL, GLOBAL), size, type (FUN, OBJECT, SECTION).
-
SIGSEGV
A SIGSEGV is an error(signal) caused by an invalid memory reference or a segmentation fault. You are probably trying to access an array element out of bounds or trying to use too much memory.
-
- Mar 2018
-
ccom.uprrp.edu ccom.uprrp.edu
-
.fini
This section holds executable instructions that contribute to the process termination code. That is, when a program exits normally, the system arranges to execute the code in this section
-
init
This section holds executable instructions that contribute to the process initialization code. That is, when a program starts to run the system arranges to execute the code in this section before the main program entry point (called main in C programs)
From: http://l4u-00.jinr.ru/usoft/WWW/www_debian.org/Documentation/elf/node3.html
-
.plt
(from StackOverflow) PLT stands for Procedure Linkage Table which is, put simply, used to call external procedures/functions whose address isn't known in the time of linking, and is left to be resolved by the dynamic linker at run time.
It is jump table to functions that are in the dynamically linked libraries (printf, scanf,...).
Further reading: https://www.technovelty.org/linux/plt-and-got-the-key-to-code-sharing-and-dynamic-libraries.html
-
EXEC (Executable file)
Executable!
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
00000055
The instruction at offset 0x55 references printf. The linker better solve this reference.
-
0000003f
The instruction at offset 0x3f references foo. The linker uses this information.
-
UND
All the symbols with UNDefined must be resolved by the linker.
-
.rodata
Read Only Data: Here you would find string literals such as the "result is %d"
-
.rel.text
For programs compiled with -c option, this section provides information to the link editor ld where and how to "patch" executable code in .text section
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
comment
Comments about the compiler. You may read the raw content of any of these sections using:
objdump -s -j .comment
-
data
The .data section contains data :-)
-
.text
The .text section contains the machine language instructions of the program.
-
Section Headers:
ELF files are subdivided into sections.
A section is an area in the object file that contains information which is useful for linking: program's code, program's data (variables, array, string), relocation information and other. So, in each area, several information is grouped and it has a distinct meaning: code section only hold code, data section only holds initialized or non-initialized data, etc
-
0x0
The first function in this file is at address 0x0.
-
ELF32
32-bit ELF
-
7f 45 4c 46
The magic sequence that starts an ELF file is 0x7f 0x45 0x4c 0x46, i.e. .ELF.
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
.cfi_startproc
You can read about the cfi assembler directives in https://sourceware.org/binutils/docs/as/CFI-directives.html#CFI-directives.
They are merely instructions for the assembler, similar to the preprocessor directives that you include in your C programs.
-
leave
When you compile using the gcc -fno-stack-protector, there is no validation of the stack at the end of the function.
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
movl -4(%ebp), %eax
The return value is returned through %eax.
-
movl 8(%ebp), %eax
This was compiled for 32 bits, notice that the parameter to foo is being received through the stack.
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
movl %edi, -20(%rbp)
This program was compiled for 64 bits and the parameter to the foo function is passed through register %edi.
-
movl -4(%rbp), %eax
The return value is passed through register %eax.
Tags
Annotators
URL
-
-
ccom.uprrp.edu ccom.uprrp.edu
-
movl %eax, %edi call foo
Setting the parameter and invoking foo.
-
"GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609"
Information about the compiler.
-
call __stack_chk_fail
By default, the gcc compiler includes instructions to detect stack smashing.
-
movl $.LC1, %edi movl $0, %eax call printf
Setting the parameters and calling the printf function.
-
movl $.LC0, %edi movl $0, %eax call __isoc99_scanf
Setting the parameters and calling the scanf function.
-
.text
The .text section contains the actual assembly language instructions.
-
.LC1:
LC1 is the label by which we shall refer to "result is %d\n" in the program,
-
.section .rodata
"Here comes the read-only data segment"
You can see the literal strings "%d" and "result is %d\n" that are parameters to the scanf and printf functions.
-
.comm buffer,1048576,32
This is saying "In this program there is a global variable called buffer of 1048576 bytes and 32-bit alignment.
.comm name, size,alignment
The '.comm' directive allocates storage in the data section.
Tags
Annotators
URL
-
- Jun 2017
-
github.com github.com
-
The Automated R Instructor
Tags
Annotators
URL
-