Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Kali Linux Live on MicroSD

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
krats
Posts: 5
Joined: 2017-10-15 20:30

Kali Linux Live on MicroSD

#1 Post by krats »

Hello everyone,

I have mounted Kali Linux (Debian based) on a MicroSD to use it in Live mode without persistence.
Computer model: MacBook Pro with OS X Yosemite 10.10.5
Kali Linux Version: kali-linux-2017.1-amd64

Problem: Kali does not recognize any ethernet/wifi connection.
I have also asked in Kali Linux forums, but it's taking a lot of time for my post to be approved, so I'd like to ask here as well, since it could be a problem not strictly related to Kali.
I have uploaded on imgur the outputs of many useful commands to better understand the system status, such as: iwconfig, uname, route, cat etc/network/interfaces, lspci, lsusb, airmon-zc, rfkill and more. Link here: https://imgur.com/a/3k9D4

And here is ifconfig output:

Code: Select all

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop yxqueuelen 1 (Local loopback)
RX packets 28 bytes 1904 (1.8 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28 bytes 1904 (1.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
What am I missing?

Thank you in advance


User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Kali Linux Live on MicroSD

#3 Post by GarryRicketson »

It probably is a Kali issue , and not Debian, I doubt they will approve your question, because it is to obvious you simply have not done any reasearch;
See this: https://docs.kali.org/introduction/shou ... kali-linux
2.
Network services disabled by default: Kali Linux contains systemd hooks that disable network services by default. These hooks allow us to install various services on Kali Linux, while ensuring that our distribution remains secure by default, no matter what packages are installed. Additional services such as Bluetooth are also blacklisted by default.
On the other hand since it is a kali issue , they might help you get it working.

krats
Posts: 5
Joined: 2017-10-15 20:30

Re: Kali Linux Live on MicroSD

#4 Post by krats »

arochester wrote:
What am I missing?
The Kali Linux Forums? https://forums.kali.org/forumdisplay.ph ... nux-Forums
krats wrote:I have also asked in Kali Linux forums, but it's taking a lot of time for my post to be approved
To be more precise, it's been 1 month. I asked 2 times (first time there were no enough details, they said me to provide iwconfig, rfkill, route, uname, airmon-zc... I did that: now they are not answering and moderators don't reply back)
GarryRicketson wrote: Network services disabled by default: Kali Linux contains systemd hooks that disable network services by default. These hooks allow us to install various services on Kali Linux, while ensuring that our distribution remains secure by default, no matter what packages are installed. Additional services such as Bluetooth are also blacklisted by default.
Kali developers suggest to use their distro in Live Mode for penetration testing. So it must be possible to use network services.
I believe not approving my question would be a mistake, since I am only asking how to setup network connections for a Live Mode Kali via MicroSD. Whether it's a bug or it's normal that you have to enable network connections, it should not be a problem to help me out.
Usually, someone could go to network interfaces and manually insert specifications for eth0 and wifi connections. Although, since Kali Live Mode means that the system does not have memory persistence, I could try that but any system modification would be reset after rebooting, so I'm stuck with no internet connections and don't know what to do.
In the meantime, thank you for answering and if you have any ideas, or if you could suggest me how to contact Kali Linux developers or experts via other channels, I would really appreciate it.
Thank you very much

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Kali Linux Live on MicroSD

#5 Post by Bulkley »

As you noted, "Kali developers suggest to use their distro in Live Mode for penetration testing." It really is a specialty distribution. Most of us here don't use Kali and aren't much help for problems with it. I know a couple of professional techs who use Kali on Live media and they would never consider using it for anything other than penetration testing. Sorry, but my suggestion is to choose another distro. If you have to ask you probably shouldn't be using Kali.

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Kali Linux Live on MicroSD

#6 Post by GarryRicketson »

y krats »Kali developers suggest to use their distro in Live Mode for penetration testing. So it must be possible to use network services.
Yes there is, but I do not remember what it was I read, I am pretty sure I saw
a topic and thread discussing this on their forum. That might be another reason you are not getting the question approved, on that I don't know and you would need to take it up with them,
There are several factors involved here, I do not have any experience with
Kali, nor a "MicroSD", there might be some one here willing to try to help, and since it is in off topic, no problem there.
There have been many Debian users with problems getting a ethernet/wifi connection working as well, so it is not unique to Kali. But I think first it would
be to your advantage to search their forum very carefully, I am 90% sure that
is where I saw the topic about enabling the network services.
Since I do not use Kali, nor have any interest, I never bothered to save a link to the post/thread, honestly if I had it handy I would share it.
Sorry I am not of more help, but maybe some body here will be able and willing.
Buckley posted while I was writing, he is right in what he says. One thought
I have is that maybe you should try installing Debian to the MicroSD, if it is possible, then if you still have network connection problems there will be more people here that can help. Since Kali is based on Debian, once you learn how to establish the network connection on a "pure" Debian system, you might have a better idea of what is going on, and will be able to enable it on a kali system as well.

Segfault
Posts: 993
Joined: 2005-09-24 12:24
Has thanked: 5 times
Been thanked: 17 times

Re: Kali Linux Live on MicroSD

#7 Post by Segfault »

Getting wired connection going is a trivial task, in any Linux system. Making it stick requires distro specific approach.
First, plain ifconfig prints only active interfaces. But an experienced Linux admin should know that.
So, ifconfig -a prints all interfaces present in the system.
To check if driver is loaded - use lspci -k.
Then use the same ifconfig to assign a valid IP address to your interface.
Next use route command to create a valid route.
That's it, network is up. To go to the internet add DNS.
It will be gone with next reboot indeed.
Trivial task, as I said. Kali users will not ask questions like this. Wannabe hackers do.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kali Linux Live on MicroSD

#8 Post by stevepusser »

I'll take a shot...though it would be simpler to direct the output into a text file and then into code tags here instead of screenshots. I don't see any wired NIC at all in your output, and the Broadcom 4360 it lists for the wi-fi is a well-known problem that might only work with the hybrid "wl" driver built by broadcom-sta-dkms. You should search the web to see how users are faring with other distros on the same MAC, or at least the same wi-fi device, to get leads.

If you need to build the -sta driver, and you don't have the packages installed necessary to build it, doing that without a connection is quite tedious. Get a USB wi-fi adapter that has a driver in the kernel and at most needs a non-free firmware package...if you get one that supports packet injection with a Kali driver you kill two birds with one stone.
MX Linux packager and developer

User avatar
GarryRicketson
Posts: 5644
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Kali Linux Live on MicroSD

#9 Post by GarryRicketson »

Thanks Steve, I was going to suggest the same,
simpler to direct the output into a text file and then into code tags here instead of screenshots.
Now I don't need to. I think it would help the OP get a answer on the Kali forum,
if they at least make the effort to learn how to use code boxes and post the output and code as text, instead of screen shots.

I see your post got approved, just yesterday,
If you "Wanna be a cracker hacker", you really need to learn how to search
and look through tons of data, to find the back yards, and back doors.
I did a quick search on the kali forum for you:
Found: https://forums.kali.org/showthread.php? ... ork-Access
And
https://forums.kali.org/showthread.php? ... onnections
---------------------------
https://docs.kali.org/installation/trou ... ver-issues

After trying all the things in the tutorial, if you still can not make a connection,
you should ask again, but in the appropriate topic/thread.
The OP needs to learn a lot, and how to do these things on their own. Hopefully this helps them get started.
======== edited =========
Problem: Kali does not recognize any ethernet/wifi connection.
I have also asked in Kali Linux forums, but it's taking a lot of time for my post to be approved, so I'd like to ask here as well, since it could be a problem not strictly related to Kali.
Again, it is very much related to Kali, you need to read their documentation,
they do have plenty on how to solve this.
The solution is there, but I all ready have done way to much for the OP :
https://docs.kali.org/category/general-use
In keeping with the Kali Linux Network Services Policy, there are no network services, including database services, running on boot so there are a couple of steps that need to be taken in order to get Metasploit up and running with database support.
Follow the "read more" link, and then there is more,they go into great detail on this, and it is clear, easy to follow documentation.
=====================================
https://docs.kali.org/policy/kali-linux ... e-policies
Kali Linux is a penetration testing toolkit, and may potentially be used in “hostile” environments. Accordingly, Kali Linux deals with network services in a very different way than typical Linux distributions. Specifically, Kali does not enable any externally-listening services by default with the goal of minimizing exposure when in a default state.

krats
Posts: 5
Joined: 2017-10-15 20:30

Re: Kali Linux Live on MicroSD

#10 Post by krats »

Thank you for all your answers and your hints.
I am following your suggestions, while reading Kali documentation more thoroughly.

krats
Posts: 5
Joined: 2017-10-15 20:30

Re: Kali Linux Live on MicroSD

#11 Post by krats »

I have discovered that my Broadcom 4360 can be used if driver wl is installed.
https://unix.stackexchange.com/question ... acbook-pro

However, I'm stuck at the end of the process. When I do "modprobe wl", I get "FATAL: Module wl not found in directory /lib/modules/4.9.0-kali3-amd64".

I've read that a possible workaround is to manually download the kali kbuild and headers, but I am not able to find those files for version 4.9.0, which is my kali version.

In another Kali forums post, the author suggest to download the header files for 4.3.0, but I can't find them either (the post was old, 4.3 headers are not available anymore in kali repos main pool). I have found only 4.11, 4.12 & 4.13 headers.
Therefore, I am trying to update Kali to the latest version by doing apt-get update && apt-get upgrade && apt-get dist-upgrade and then reboot, but after reboot Kali is always 4.9.0. I thought it was a good idea to upgrade to 4.13 and then download the header files for 4.13. Of course, I could remount Kali new version on the SD and reinstall it again, but I think it would be better to understand why it doesn't update with the commands.

The first problem with Broadcom 4360 "should" be Debian-generic, though: what do you think about it?

Thanks in advance for every further help.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kali Linux Live on MicroSD

#12 Post by stevepusser »

The standard procedure for the hybrid "wl" driver in Debian is to:

1. Set up a kernel build environment for your particular kernel by installing module-assistant and running

Code: Select all

m-a prepare
as sysadmin to install the correct headers and compilers.

2. Enable the Debian non-free repository and install the broadcom-sta-dkms package. This builds and installs the "wl" dirver if you have the correct build setup, but watch the output to make sure that's true. Note that if you jump up to a newer kernel, there is no guarantee that this package will rebuild on the new kernel--the version in the stretch-backports repository has been patched to build on the 4.12 kernel, and that one also builds on the 4.13 kernel. But the stock Stretch version should build correctly on a 4.9 kernel.
MX Linux packager and developer

krats
Posts: 5
Joined: 2017-10-15 20:30

Re: Kali Linux Live on MicroSD

#13 Post by krats »

Hello. Thank you for your reply.

This is the output of m-a prepare:

Code: Select all

Getting source for kernel version: 4.9.0-kali3-amd64
apt-get install linux-headers-4.9.0-kali3-amd64 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-headers-4.9.0-kali3-amd64
E: Couldn't find any package by glob 'linux-headers-4.9.0-kali3-amd64'
E: Couldn't find any package by regex 'linux-headers-4.9.0-kali3-amd64'
Creating symlink...
apt-get install build-essential 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4).
build-essential set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
It seems that there is already something wrong from the beginning. But, just to give more details as possible:
this is the output of apt-get install broadcom-sta-dkms:

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
broadcom-sta-dkms is already the newest version (6.30.223.271-7).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I have enabled non-free debian repo this way:

Code: Select all

deb http://http.us.debian.org/debian stable main contrib non-free

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Kali Linux Live on MicroSD

#14 Post by stevepusser »

Perhaps that kernel is no longer available in their repo. I would guess that's what's going on. But it's almost impossible to upgrade the kernel and headers on a Live USB--MX Linux is the only distro I know of that has a tool for doing that.
MX Linux packager and developer

Post Reply