Skip to content
Advertisement

Understanding ELF64 text/data segment layout/padding

I’m trying to brush up on UNIX viruses and one text I’m reading mentions that parasitic code can be inserted in the padding between the text and the data segment, supposedly up to 2MB in size on x86-64 systems. But when I compile a simple hello world program with gcc -no-pie… …and inspect its segment headers with readelf -W -l

How to protect an eBPF firewall in traffic filter (tc-bpf)

I’m going to implement a firewall on the traffic control classifier(man 8 tc-bpf). The firewall is to filter outgoing traffic. But, there is one point which makes the task really hard. My userspace agent must know, is that filter(classifier) loaded and passing all outgoing traffic through itself or not. Please tell me: How to protect loaded filter from unloading(tc filter

Current path is not showing in terminal for new CentOS user [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question

How to extract the directory from full file path

I have the following script which prints various file stats, which was kindly supplied by another user (choroba) (link). Is there a way that this can be amended to report just the directory name of each file and not the full file path with the file name? I have tried changing filepath with dirname and I get a series of

Wrapper script that write logs of arguments, stdin and stdout

I want to create a wrapper script which writes logs of arguments, stdin and stdout. I have written the following script wrapper.sh, which works almost fine. I expect that ./wrapper.sh arg1 arg2 gives the same result as /path/to/command arg1 arg2 with logs in /tmp/stdio-log/. But it gives a slightly different result in Example 2 below. Example 1: a command that

How to include comments from Nmap script in the output file

There might be a better way to do this, but what I have is an input file called “list.txt” of IP addresses for my Nmap scan like so: Then I scan with Nmap using and output to a file using: Additionally I have used sed to make the “output.txt” look like this: I would like to include the comments from

CLPPLUS login failing

I am trying to login to remote DB2 using clpplus but can’t login as password contains @. clpplus -nw user/p@sswd@145.xx.xx.212:60000/Dbname but it fails saying: Is there any work around of it? Answer With the bash shell, enclose the password with ‘ and additionally escape the @ with @ (and the same for any special character inside the password, i.e. escape

Advertisement