Coder Social home page Coder Social logo

Comments (4)

swatbelal avatar swatbelal commented on May 23, 2024

Anyone?

from unshc.

yanncam avatar yanncam commented on May 23, 2024

Hello,

Sorry for the late response.
I haven't any good solution for this case where the -r option was missing initialy.
UnSHc doesn't seem to be able to recover this kind of encrypted file not-relaxed.

Unfortunately I do not have time right now to dig into this problem.

But I encourage you to try to reverse manually your binary, to understand precisly "what do SHc without the -r parameter ?".

Recently I've written an article in a french-cybersecurity oriented magazine about UnSHc, with all the detailled process to do it manually. You can try this way :

Sincerely,

from unshc.

swatbelal avatar swatbelal commented on May 23, 2024

from unshc.

intika avatar intika commented on May 23, 2024

SHC relax feature (variable rlax on the sources) does use as an encryption/decryption the attributes of the file (/usr/bin/sh or /usr/bin/bash or else is your system use a different shell), by attributes i mean file size, date etc.

	memset(control, 0, sizeof(control));
	control->st_ino = statf->st_ino;
	control->st_dev = statf->st_dev;
	control->st_rdev = statf->st_rdev;
	control->st_uid = statf->st_uid;
	control->st_gid = statf->st_gid;
	control->st_size = statf->st_size;
	control->st_mtime = statf->st_mtime;
	control->st_ctime = statf->st_ctime;

Control variable is then used to generate the key... so if you enable the the -r option that key won't be used otherwise your shell executable need to be the exact same while you built your sh script (even ctime, not just the file version)

In short in order for you to recover your file you need to restore /usr/bin/bash or /usr/bin/sh with the exact same attributes as the time you built your sh script on.

Additional note.

from unshc.

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.