Ask Your Question
0

Can't do make to build decryption tools from WireGuard

asked 2021-11-29 03:44:54 +0000

Ryden7 gravatar image

updated 2021-12-01 17:44:11 +0000

Jaap gravatar image

Hello Wireshark community,

I'm trying to decrypt some network traffic specifically in regards to WireGuard and I'm running across this error when I try to 'make' the 'extract-handshakes.sh'

"no rule to make target offset-finder.o"

There seems to be very limited information on this and according to the documentation, this should build. According to other resources, users got older versions to build but I was still not able to.

Can anybody help in getting the extract-handshakes to run? I'm pretty sure it's the final step in decrypting the packets.

ref https://git.zx2c4.com/wireguard-tools...

edit retag flag offensive close merge delete

Comments

What's $(KERNELRELEASE) in your shell? Have a look in the makefile. It differentiates between standalone build and kernel module build based on that.

Jaap gravatar imageJaap ( 2021-11-29 07:53:45 +0000 )edit

5.11.0-40-generic (found using uname -r). I'm using a virtual machine if that makes any difference.

According to the documentation, it says Kbuild variables are set by the top level make file and I am not able to modify them. From what I understand, it does 2 different passes over that file, one with the make cmd and the other with the kbuild. I'm not super linux savvy so I'm trying to understand as I go.

Ryden7 gravatar imageRyden7 ( 2021-11-30 05:12:59 +0000 )edit

I was responding to the fact that it complains about 'no rule to make target offset-finder.o'. If $(KERNELRELEASE) was not empty that would be obvious. Now that seems unlikely.

Jaap gravatar imageJaap ( 2021-12-01 18:03:09 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-06-06 14:25:53 +0000

starry gravatar image

updated 2022-06-07 12:26:27 +0000

Jaap gravatar image

It works for me when I Fix the second line of CFLAGS. It compiles but for me I cannot run the extract-handshake because of the line 46 of the bash file as it says there's no such file or directory to write.

ifeq ($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
CFLAGS ?= -O3 -march=native
CFLAGS += -Wall -pedantic -std=gnu11 -static -c

offsets.include: offset-finder ./$^ > $@

offset-finder: offset-finder.c offset-finder.o $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^

offset-finder.o: offset-finder.c $(MAKE) -C $(KERNELDIR) M=$(PWD) $@ objcopy -j '.rodata*' $@ $@

clean: rm -f offset-finder offsets.include $(MAKE) -C $(KERNELDIR) M=$(PWD) clean

.PHONY: clean else offset-finder-m := offset-finder.o oldsrc := $(src) src := $(src)/../../../src include $(src)/compat/Kbuild.include include $(src)/crypto/Kbuild.include src := $(oldsrc) endif

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2021-11-29 03:44:54 +0000

Seen: 505 times

Last updated: Jun 07 '22