Comments (10)
You're saying you need to be in a particular set of groups to allow any network access?
Hmm, yes that does sound like it calls for a flag to not drop privileges. Unless: is there a well-known group or user that can be changed to (65534 is "nobody") that still has network access?
from arping.
Yes, after calling setuid
, group 3003(inet)
is required to open sockets, while group 3004(net_raw)
is required to open raw sockets. I've tested this on Marshmallow, maybe this isn't universal.
from arping.
OK, that's what you meant.
Could you confirm that if you change https://github.com/ThomasHabets/arping/blob/arping-2.x/src/arping.c#L330 to day drop_uid(uid, 3003)
that it works?
In that case can add a flag that allows setting group by name.
from arping.
Yes, drop_uid(uid, 3003)
works in my case (setgid
to 3004
works too)
from arping.
Could you try building current state and running with -g inet
?
Actually, maybe arping
should detect that it's running in Android and do this automatically, since extra arg every command would be annoying.
from arping.
This works for me, but keep in mind that I am building this in a chrooted Debian environment, where there's no group named inet
by default (one has to add it manually, for instance by installing the android-permissions
package).
from arping.
I know very little of Android development. Do you mean android-permissions
needs to be installed on the Android phone, or in the development environment?
Do you think arping -g
should accept numeric group as well?
And do you know of a way to find out that the system is an Android one, or would it even be possible at compile time? (I don't know the dev environment either)
from arping.
I'm not an expert here either :) But let's make one thing clear - by Android here I mean the kernel, not the OS.
android-permissions
is a Debian package which simply adds groups with proper ids to the /etc/group
file so we can refer to them by name. So in that case, we'd need it installed in the OS. It's Debian specific, but we can always use groupadd
or simply edit the file.
If arping -g
accepted numeric groups, it could make those things easier.
from arping.
As for detecting Android kernels, presence of a /dev/binder
file seems Android specific, but maybe there's a better way.
from arping.
Filed separate feature request for detecting android: #25
from arping.
Related Issues (20)
- configure: error: libnet 1.1.x not found HOT 9
- -bash: ./configure: No such file or directory ? HOT 1
- Getting Timeout on mac and FreeBsd HOT 3
- No ./configure. Bootstrap looks for autoreconf which is not provided :/ HOT 2
- False positives when the pinging machine receives ARP requests at the same time HOT 2
- Cross compiling Arping causes multiple definitions error HOT 3
- Retrieve unknown IP if Mac is known HOT 3
- libnet_get_hwaddr(): socket: Permission denied HOT 4
- arping: libnet_init(LIBNET_LINK, <null>): <no error message> HOT 38
- RFE: support the -f option for iputils arping compatibility HOT 3
- Fail to ping device by MAC address HOT 3
- arping_test compile failure HOT 8
- unsupport libnet 1.2 and libnet 1.1.2.1 HOT 1
- unicast HOT 1
- arping on macOS 10.11.6 not working HOT 4
- -t not changing Target MAC Address HOT 8
- Compilation error HOT 1
- How security vulnerabilities for this package is tracked in NIST/NVD? HOT 4
- Build error under Termux (Android) HOT 23
- No replies received using vlan option with older libpcap HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arping.