GithubHelp home page GithubHelp logo

Error with unicode about nimplant HOT 6 CLOSED

sl4cky avatar sl4cky commented on May 16, 2024
Error with unicode

from nimplant.

Comments (6)

chvancooten avatar chvancooten commented on May 16, 2024

Hi @sl4cky, thanks for the report! That is indeed an edge case that I didn't test :)
Unfortunately, I'm not able to work on NimPlant for the foreseeable future, so any help on this is welcome. In troubleshooting this I would trace the steps of the whoami command (and corresponding information collection after check-in) and how that information is transferred from client to server. It likely isn't an extensive fix once the issue is found!

from nimplant.

sl4cky avatar sl4cky commented on May 16, 2024

Did some testing. The issue is with the winUtils.nim file and the getIntIp function, don't know exactly what the issue is with that function but I know the issue is there. whoami does not present the unicode but it doesn't make the agent fail to connect back. the issue makes the agent fail to connect back after the register request

from nimplant.

chvancooten avatar chvancooten commented on May 16, 2024

Hi @sl4cky! Thanks for looking into it. I found some time to troubleshoot the issue. It looks like there was in issue in the whoami() function not using a proper unicode API/buffer, and on the server side the log file was not opened in unicode mode causing a crash. Both issues should be resolved in the latest commit in the dev branch (cc4d6b6). Could you please pull this version and test if it works for you?
image

from nimplant.

sl4cky avatar sl4cky commented on May 16, 2024

Hi, yes will do it and let you know. Thanks 🙏

from nimplant.

sl4cky avatar sl4cky commented on May 16, 2024

Hi So I checked this, the whoami is okay but there is still an issue if the computername is with unicode, for this a change need to be done in the function proc getHost*() : string = of winutils. the winapi GetComputerNameW can be used for this I guess.

from nimplant.

chvancooten avatar chvancooten commented on May 16, 2024

Hi @sl4cky, thanks again for reporting this and sorry for the delay. I have updated the getHost() function to use the windows API to get the computer name as wide characters, which should fix the issue (02e9296). I unfortunately don't have a machine with a cyrillic name at hand to test, could you please verify if this fix (pushed to dev branch) works on your instance?

from nimplant.

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.