Call a hidden function, is it possible ?



Hi ,i would like to give u a piece of code and discuss if it is
possible to call the hidden_function without modify code to call it .
I have read on internet about buffer overflows and i can overwrite
overwrite instruction pointer to point to start of the
hidden_function . But i see that on my ubuntu with my

gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4) i get a

../test AAAAAAAAAAAAA
*** stack smashing detected ***: ./test terminated

i think this protection blocks me ,right ? Is there any other
technique i can call that hidden fuction ? And lets say we got a linux
binary ,that we dont know his source code ,is there any way to
determine hidden fuctions that may that binary have ? As an owner i
can maybe disable those protections from gcc but if i dont have the
source and only the binary ??? I would like to hear your opinions on
that :) , thanx in advance

#include <stdio.h>
#include <string.h>

void hidden_function()
{
printf("you find me :) \n");
}


main(int argc, char *argv[])
{
char buffer[10];
if (argc < 2) {
fprintf(stderr, "usage: %s string \n", argv[0]);
return 1;
}
strcpy(buffer, argv[1]);
return 0;
}

.



Relevant Pages

  • Re: 13 year old C source code
    ... old ASM and C source code for the purpose of compiling a ... The source code was last modified in November of 1998 and was compiled ... Change to "static signed char ..." ... for suggested search phrases. ...
    (comp.lang.c)
  • Re: dh, the daemon helper
    ... You can download the C source code, ... line 52 I think most C programmers prefer const char over char ... open_max a long instead of an int though. ...
    (comp.unix.programmer)
  • 13 year old C source code
    ... old ASM and C source code for the purpose of compiling a ... The source code was last modified in November of 1998 and was compiled ... One of the things I'm completely stuck on is the difference in char. ... for suggested search phrases. ...
    (comp.lang.c)
  • Re: 13 year old C source code
    ... old ASM and C source code for the purpose of compiling a ... The source code was last modified in November of 1998 and was compiled ... from just giving an error message and giving up on further analysis. ... One of the things I'm completely stuck on is the difference in char. ...
    (comp.lang.c)
  • Re: the first programming language: C
    ... point to one char past the end of array ... if s point to enougth long space of memory ... The dont do it like above. ... pointed from pointer s ...
    (comp.lang.c)