Code Monkey home page Code Monkey logo

Comments (5)

matricali avatar matricali commented on June 12, 2024 3

Other Linux-standard possible solutions:

  • pthread_setname_np(pthread_self(), "newName"); is probably the better method, it comes from glibc and might be portable to other non-Linux systems

  • prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

from cbrutekrag.

metadone666 avatar metadone666 commented on June 12, 2024 3

prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

First, thank you for the quick response.
Second, where should i place this line ?
"prctl(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);"

_<

from cbrutekrag.

matricali avatar matricali commented on June 12, 2024 2

Hello !
A Fake Process will be awesome.
This is an example of a fake process command line :

trcpy(argv[0],FAKE); // fake the proccess name.
while(fgets(buff,sizeof(buff),fp))
{
c=strchr(buff,'n');
if(c!=NULL) *c='.';
if (!(fork()))
{
where=0;
// printf("--> attacking %s",buff);
for (i=0; i<count; i=i+2){
// printf("--> Trying %s:%s %sn",a[i],a[i+1],buff);
checkauth(a[i],a[i+1],buff); // try to auth
}
exit(0);

this is taken from
https://github.com/MrMugiwara/against-cracker/blob/master/against.py
Of course, this is py, but i guess this can also be done in C.
Thank you, Brother !

Your code is ANSI C, not Python 😆
But yes, the way to change the process name on UNIX systems are writing on memory where argv[0] is allocated. 👍

I guess that your code has a missing "s", should be:
strcpy(argv[0], FAKE); <--- Basically it's copying memory from FAKE to address where argv[0] is allocated.
This single line covers your request :D

from cbrutekrag.

metadone666 avatar metadone666 commented on June 12, 2024

Other Linux-standard possible solutions:

* [`pthread_setname_np`](https://linux.die.net/man/3/pthread_setname_np)(pthread_self(), "newName"); is probably the better method, it comes from `glibc` and might be portable to other non-Linux systems

* [`prctl`](https://linux.die.net/man/2/prctl)(PR_SET_NAME, (unsigned long)"newName", 0, 0, 0);

Hello again, Brother!
As above, I'm asking you about those lines :D
where should i place them ?
cbrutekrag.c ?
is there anything else to insert ?
can you give me an example ?
Thank you so much brother !
Note: my coding skills are horrible :))))

from cbrutekrag.

metadone666 avatar metadone666 commented on June 12, 2024

I also got plenty of errors when i tried to add prctl or pthread_setname_np

from cbrutekrag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.