Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird files created when I try to initialize IPFS. #4527

Closed
al-sabr opened this issue Dec 28, 2017 · 20 comments · Fixed by #4872
Closed

Weird files created when I try to initialize IPFS. #4527

al-sabr opened this issue Dec 28, 2017 · 20 comments · Fixed by #4872
Labels
P0 Critical: Tackled by core team ASAP

Comments

@al-sabr
Copy link

al-sabr commented Dec 28, 2017

Version information: 0.4.13

Type: Weird behavior

Severity:

Description:

This is 4 files which are created by IPFS each time I run it.

image

What kind of virus is this ?

@djdv
Copy link
Contributor

djdv commented Dec 28, 2017

Can you give some more details on this? What ipfs command are you running, and when are they created?
It looks like some file operation is being passed garbage for a filename.

@al-sabr
Copy link
Author

al-sabr commented Dec 28, 2017

Basic ipfs daemon --init. I will joint the weird files in this comment.

weird_files.zip

@al-sabr
Copy link
Author

al-sabr commented Dec 29, 2017

I just tried the 0.4.14-dev

Now there is tons of those files !!!!! WTF is going on !

image

@Stebalien
Copy link
Member

Stebalien commented Dec 29, 2017

Something really weird. I'd stop running ipfs for now while we investigate this.

Could you post your ipfs config (it's in the repo)?

@al-sabr
Copy link
Author

al-sabr commented Dec 30, 2017

Here is a snapshot of the files in my g:\ipfs folder:

ipfs_root_folder_files.zip

Here is a zip file of all the weird files:

ipfs_weird_files.zip

I will now try to rerun ipfs with Procmon to see when ipfs is creating those files.

@leerspace
Copy link
Contributor

@gdeverlant did you end up getting any procmon? If so I'd be interested in what it shows (or looking at the file).

It also seems weird that if IPFS is creating those files, it's creating them in the same directory as the IPFS executable -- unless maybe the IPFS_PATH is set to the same directory as where the executable lives.

@al-sabr
Copy link
Author

al-sabr commented Jan 4, 2018

It's not happening anymore because I'm not going to use IPFS. This project is just fluff and there is zero security at the core of the design.

When weird chinese file are appearing it means that this is a huge trojan horse.

@leerspace
Copy link
Contributor

Given that you seem to be the first (only?) person to encounter this issue, I'm guessing it's something specific to your environment -- which will make it difficult to troubleshoot without input.

@Stebalien
Copy link
Member

That's not "weird Chinese", it's random data decoded as text (the same junk that your printer will spit out if improperly configured). This is a really weird (and bad) bug, but it doesn't make IPFS a trojan (nit: an actual trojan would be undetectable, that's kind of the point).

As @leerspace says, we can't reproduce this issue so it's a bit hard to debug without your help.

@al-sabr
Copy link
Author

al-sabr commented Jan 4, 2018

I will try to rerun the program to see if it happens still. Right now I'm kinda busy but I will keep you updated.

@Stebalien If this is not weird Chinese what is it ?

image

image

@Stebalien
Copy link
Member

If this is not weird Chinese what is it ?

It's what you get when you try to decode random binary as text (I assume windows is trying to decode this as Unicode). It often decodes as Chinese because there are a lot of Chinese characters in the Unicode spec. That is, if you pick a random printable character out of the Unicode spec, it's probably a Chinese. However, you'll notice that it's not all Chinese: There are boxes, crosses, per-mill (percent percent) symbols, dots, arrows, etc.

@Stebalien Stebalien added the P0 Critical: Tackled by core team ASAP label Jan 9, 2018
@whyrusleeping
Copy link
Member

@gdeverlant A few questions that will help us:

  • Are you building ipfs from source?
  • If so, what commands are you running to do so?
  • How did you install go?
  • What (exact) version of go are you running?
  • How are you running ipfs?
  • What shell are you using?
  • What is the environment variable "IPFS_PATH" set to?
  • What version of windows are you running?

@al-sabr
Copy link
Author

al-sabr commented Jan 10, 2018

  • Yes from source
  • via go get
  • from the binaries on https://dl.google.com/go/go1.9.2.windows-amd64.msi
  • go version go1.9.2 windows/amd64
  • via the command line DOS prompt/via NativeProcess API inside the software I'm writing
  • CMD.exe/ git Bash / Powershell
  • IPFS_PATH=G:\ipfs
  • Windows 10 Host OS/ Windows 7 inside virtualbox (dev environment)

@whyrusleeping
Copy link
Member

via go get

are you sure? IPFS is not installable via go get.

@leerspace
Copy link
Contributor

For what it's worth... I just updated go to 1.9.2, changed my IPFS_PATH to G:\ipfs (conveniently that's the drive where I store my ipfs repo on my Windows box), built IPFS from source using the manual steps in these instructions (like @whyrusleeping said go get doesn't install it), then ran ipfs init using my new binary from go\bin and didn't experience the reported behavior.

The main difference is that my machine is a physical Windows 10.0.16299.192 install.

@whyrusleeping
Copy link
Member

Yeah, I tried installing from source, on a windows 10 vm on a mac OS host, using go1.9.2, and could not reproduce the described behaviour, either via windows CMD, or git bash.

@al-sabr
Copy link
Author

al-sabr commented Jan 10, 2018

Sorry guys I used the same manual method : https://github.com/ipfs/go-ipfs/blob/master/docs/windows.md

@leerspace
Copy link
Contributor

@gdeverlant it seems to me we can reasonably narrow it down to being your binary, Windows 7, or something else with (or running in) your environment.

If you want to share your binary I can test it in a fresh Windows 7 VM. Or if you have some procmon showing these files being written by IPFS I'd be interested in having a look at it.

@al-sabr
Copy link
Author

al-sabr commented Jan 10, 2018

I used the binary from @Stebalien

@al-sabr
Copy link
Author

al-sabr commented Jan 16, 2018

Ok I will close this ticket because I found why it was happening.

I was executing IPFS from the bin-debug folder because I was running my app in debug mode.
Since I moved the ipfs.exe one folder higher the logs are :

initializing IPFS node at G:ipfs

===============================================================================================================================================================
===============================================================================================================================================================
generating 2048-bit RSA keypair...done
peer identity: QmTmPTSuAg6kLH4V27WvXKCRUxtc3SN84snwfCGJ9HYhVk

===============================================================================================================================================================
===============================================================================================================================================================
to get started, enter:

	ipfs cat /ipfs/QmS4ustL54uo8F.../readme


===============================================================================================================================================================
===============================================================================================================================================================
Process exited with  0
Process exited with  0
Process exited with  0
Process exited with  0
Initializing daemon...
Swarm listening on /ip4/10.0.2.15/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit/ipfs/Qm.........
Swarm announcing /ip4/10.0.2.15/tcp/4001
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

===============================================================================================================================================================
===============================================================================================================================================================
ERROR - �[0;37m04:06:45.873 �[31mERROR �[0;34m       dht: �[0mloggableKey could not cast key: 2f706b2f122050a0b561cb754dd1924621b86a5ae3d43a583df963a7b39c2ffdfca201aa4bbb invalid cid version number: 47 �[0;37mlookup.go:35�[0m
put record to routing error: failed to find any peer in table
�[0;37m04:06:45.873 �[31mERROR �[0;34mipns-repub: �[0mRepublisher failed to republish: failed to find any peer in table �[0;37mrepub.go:78�[0m

ERROR - �[0;37m04:06:45.876 �[31mERROR �[0;34m       dht: �[0mloggableKey could not cast key: 2f69706e732f122050a0b561cb754dd1924621b86a5ae3d43a583df963a7b39c2ffdfca201aa4bbb invalid cid version number: 47 �[0;37mlookup.go:35�[0m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 Critical: Tackled by core team ASAP
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants