Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

Confused as to what my sources.list should be on older Nexus 7 #1272

Open
naturalstate opened this issue Mar 20, 2019 · 86 comments
Open

Confused as to what my sources.list should be on older Nexus 7 #1272

naturalstate opened this issue Mar 20, 2019 · 86 comments

Comments

@naturalstate
Copy link

Device: Nexus 7 2013 WIFI

OS version (KitKat/Lollipop/Marshmallow/Nougat):

Marshmallow 6.0.1

Built from repo (date and build command) or downloaded from website (links):

Downloaded Nexus 7 2013 zip from offensive nethunter download page

Output of cat /proc/version in adb shell or NetHunter Terminal:

Linux version 3.4.0-gcc51ee3-dirty (root@kali) (gcc version 4.7 (GCC)) #4 SMP PREEMPT Sat Dec 12 00:29:55 UTC 2015

Issue:

I'm having trouble updating with the sources.list file that comes with nethunter. I've tried my best to search around and see that other folks have similar issues but I still can't get it to work.

My sources.list has "sana" which I understand isn't supported anymore. So I modified the sources.list like the official sources are listed on kali's website. But I'm a bit confused since it's a nethunter if it is supposed to be like that or different. I saw some people say that nethunter shouldn't use the regular Kali sources as it will break the nethunter install. I'm so confused.

I also removed the nethunter app that came with the iso and installed the 2019.1.
When I try to add metapackages with this app it now says "The following packages have unmet dependencies"

  1. What should my sources.list file look like with the older phone that I am using?
  2. If I get the sources file fixed, will the app intall metapackages successfully?
  3. Or can If I want to install the Kali top 10, can I use the command : apt update && apt install kali-linux-top10 ?

I've installed nethunter over 10 times now. Can someone help please?
Thank you!

@0E800
Copy link

0E800 commented Mar 20, 2019

@naturalstate

You are doing too much.

You just need to manually install the Kali Archive Keyring

Type below commands in NH terminal.
Immediately after you install the chroot. Do not run apt get update until you do below first.

wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.1_all.deb

dpkg -i 'kali-archive-keyring_2018.1_all.deb`

apt update && apt upgrade

BTW - I am making a updated ROM and Kernel for N7 2013. Possibly I can use you as a tester?

@naturalstate
Copy link
Author

Thanks for the help.
I tired running these commands on my existing install, which may already be messed up.
The first one worked fine. But the second one (dpkg) has error. Is that last part correct? the .1all.deb ? I notice that is different than the first command.

I'm going to reinstall nethunter. And try these commands first. And based on your explanation, I won't modify the sources.list file.

Yes, I would be happy to test your ROM.

@naturalstate
Copy link
Author

So I just reinstalled nethunter.
I ran the wget successfully. And then the dpkg successfully.
But when I run apt update && apt upgrade I get 404 errors.
If I go to the nethunter app and try to add metapackages I get a "failed to fetch..." It does at first, list a bunch of packages, so I thought it was going to work at first, but then fails.

So I have a problem with my sources file, yes?

My source file is:
deb http://http.kali.org/kali sana main non-free contrib
#deb-src http://http.kali.org/kali sana main non-free contrib
deb-src http://security.kali.org/ sana/updates main contrib non-free
#deb-src http://security.kali.org/ sana/updates main contrib non-free

Sana doesn't work anymore right? So what do I need to do to fix my sources file?

Thank you so much for help, really butting my head against a wall here.

@0E800
Copy link

0E800 commented Mar 20, 2019

Doh! Sorry about that. In the future, try using the [Tab] key to autocomplete the file names.
That my bad though, you are correct, dpkg would not be able to install a package if the filename is typed incorrectly.

dpkg kali-[Tab] would have autocomplete the filename and saved you a few finger jabs.

I corrected the instruction.

Theres another command I am missing. It corrects the sources. Ill get you the source or the command.

One moment.

@0E800
Copy link

0E800 commented Mar 20, 2019

While I locate info, may you try apt dist-upgrade

Try replacing your sources.lst with this:

https://http.kali.org/kali kali-rolling main non-free contrib

@naturalstate
Copy link
Author

After changing my sources to the official kali sources listed on their site, running apt update && apt upgrade appears to be working! And I see it's referencing armhf. Not sure I saw that before, so that seems like the right track.

But right before I tried that, the nethunter app to download metapackages had 404, it wouldn't even list the packages that it did earlier before I change the sources.list.
So it seems only one or the other works (nethunter app metapackages download or apt get / upgrade)

It's on 18% now, and looks like it's going to take a while.
I wonder if the nethunter app will work after this.

@naturalstate
Copy link
Author

If the nethunter app to install metapackages doesn't work, I'm wondering if I can use something like this to install specific metapackages? I'm just a little unclear if that's going to install them like the nethunter app would.
apt update && apt install kali-linux-sdr

@0E800
Copy link

0E800 commented Mar 20, 2019

Your using and old build. You should replace the kalifs-full.xz with a more recent build.
You will need to also download newer builds of term-nh.apk and nethunter.apk

Check the issues, there are similar users with problems.. the apk files are pretty much universal, you just want the more current ones.

I am banging my head against the keyboard trying to build a Pie kernel for the Pixel XL and I am unable to get everything within the size of the boot partition and I am frustrated so I cant really do the leg work, but google and specific but few words you will find your way.

I need a beer.

Ill be back, just dont give up and record your errors and ill try to help. I may also have a working Oreo build you can use.

google: xda deb kernel rom

Look through the available roms ... you will probably chose Unlegacy as its still actively updated and mostly current with security updates.

Install the Rom, and then try installing one of the generic kernels or I have a few, not sure if I got HID working but I can add it.

3 parts you need. Well 4 if you count TWRP.

Rom
Kernel + SU (maybe Magisk works by now)
Apps

Dont try troubleshooting the debian environment until you have installed the more current nethunter and term-nh apps. You are focusing on the engine, but you should be checking the gasoline and oil.

@0E800
Copy link

0E800 commented Mar 20, 2019

Using the chroot nethunter app to install the meta packages is the same as apt install kali-wireless-meta [or however its named] from within Kali chroot environment that you access from term-nh.
True only when your nethunter and terminal are updated to match the kalifs

@naturalstate
Copy link
Author

Ok. You've given me a lot to research. Thanks

I didn't know that I could have Oreo and run nethunter on the Nexus 7. I mean, on the nethunter download page the only option available for Nexus 7 is Marshmallow & lolipop. So I just assumed that's what I would need.

My updates are still going. So I'm going to wait to see what happens first.

Really appreciate the help!

@0E800
Copy link

0E800 commented Mar 20, 2019

I broke out my N7, I got a few 2012 and a 2013 model. I really want to get the 2012 updated but its limited and the majority of my developemnt device are cracked screened and some even require mouse and keyboard hook ups in order to navigate.

Ultimately my personal aim is to jailbreak peoples dependency of requiring a display on a smart device.
Its like flying cars. Its possible, but we still stuck on 4 wheels.
Having no display on our smart devices forces us to interact with the device in a way that doesn't alter human evolution into having slouched neck-bent spinal cords.
Forces manufactures to realize we are no longer toddlers amused by buttons and the satisfaction of pressing them.
Provides forward development into AI and maybe Alexa and Hey Google will grow a pair since most of our interaction with the device/phone will be auditory, verbal, gesture, possibly the display becomes a pressure sensitive pad that responds to pressure / time to operate.

Apologies, the 40oz got me sided tracked with my crusade to return honor to the discarded devices that are not worthless.

tl:dr,

I am going to test my builds on my N7-213 wifi and upload a working build that hopefully will be well received.

@naturalstate
Copy link
Author

Well I can test something if you want.

Enjoy the 40! haha

So the updates finally finished. Although they cancelled at one point with:
E: Sub-process /usr/bin/dpkg returned an error code (1)
I ran apt-get update && apt-get upgrade, and they finished after that.

But when I tried to install metapackages via nethunter app, it found a bunch of packages, but then has a ton of "failed to fetch".

So what should I do? Upgrade to oreo? But then, what nethunter iso do I use? Because there aren't any listed for N7 2013 for oreo?

@0E800
Copy link

0E800 commented Mar 21, 2019

Don't erase yet. I. Uploading newer apps

Uninstall nethunter apk and term-nh all and vncviewer.

Then download and unzip apps zip and install in order.

Termnh
Vncviewer
Open termnh one time and give SuperSU perms and make sure you can get to Kali chroot.

Then install nethunter apk and see if any change .

@0E800
Copy link

0E800 commented Mar 21, 2019

https://drive.google.com/file/d/1u6Zye2CpVeUlf6OcqnORyIdNXykr6NBb/view?usp=drivesdk
Apps.zip from magisk nethunter mod 3.2019

Out doing laundry when I get home I'll upload some Oreo kernels

@naturalstate
Copy link
Author

Thanks, but the link isn't working. It says it violates google's TOS.

@0E800
Copy link

0E800 commented Mar 21, 2019

Okay I'll try again and put a password on it .

@0E800
Copy link

0E800 commented Mar 21, 2019

https://drive.google.com/file/d/1u6Zye2CpVeUlf6OcqnORyIdNXykr6NBb/view?usp=drivesdk

The password is KALI [except its all lowercase and the i is a one ]

@naturalstate
Copy link
Author

Thanks. I installed everything following your instructions. But I'm still having issues installing metapackages.
The termnh crashed the first time that I launched it, similar to what I experienced when I first installed. But the second time it worked. But when I go to Nethunter app and try to install a metapackage like wifi tools, it says what packages it will install, and then says what packages will be installed, removed and upgraded and then there a bunch of "failed to to fetch" and temporary failure of kali.org.
I then tried to ping google.com in that same terminal session and it also fails. Weird. That's gotta be part of the problem right?

If I open another terminal, I can successfully ping google and run apt-get update / upgrade.

Ideas? Should I just start over and try to get Oreo and a later nethunter version?

@naturalstate
Copy link
Author

I also just tried to install a metapackage using apt update && apt install kali-linux-wireless and it fails with "failure to resolve".

@0E800
Copy link

0E800 commented Mar 21, 2019 via email

@0E800
Copy link

0E800 commented Mar 21, 2019 via email

@naturalstate
Copy link
Author

No, maybe I'm not.
I'm just rebooting to TWRP recovery and reinstalling the nethunter image. That might make sense that I could have 2 source files.
I'm really new to android roms and flashing and all of that. I'll research how to restore to stock. I'm assuming that I should use the nexus root toolkit to do this?

@naturalstate
Copy link
Author

I did a bunch of these errors after installing the nethunter image in TWRP.
error opening: '/data/local/nhsystem/kali-armhf/dev/ram12 (not a directory)

Really appreciate your help on this

@0E800
Copy link

0E800 commented Mar 21, 2019

Yeah you need to use the wipe all data option , it's separate from the stock factory reset wipe.

Complely wipe and don't reboot .
First you need to go to advanced and mount the system folder.
Then after you full data wipe , go back a few times and click reboot to recovery and do a full data wipe again. The errors should be gone

@0E800
Copy link

0E800 commented Mar 21, 2019

Use NRT to flash back to stock 5.1.1 I think .

Then you can flash new ROM.

I'm getting the zips organised but feel free to flash a ROM from XDA if u want the practice . you will see in the rom install instructions that most ROMs follow the same instructions

@0E800
Copy link

0E800 commented Mar 21, 2019

@naturalstate

Here you go man (no offense if you're not man), rough draft but you should be able to muster through it.

https://github.com/0E800/Nexus-7-2013-Flo-Experimental/releases/tag/Flo-AIO-KaliPWN

One big ol' file that handles everything.
If its not stable enough for you, I can try upload the Nougat version.

@naturalstate
Copy link
Author

Thanks so much, this looks perfect!
I'm working on it now.

@naturalstate
Copy link
Author

So after rebooting to recovery in TWRP, I wiped by going to format and typing in "yes". I did this 3 times and rebooted back to recovery each time.
I realized that I need to boot into OS to turn MTP on and USB debugging so I can copy the KaliPWN_OREO.zip to the device to flash it. And I see that I don't have root anymore. I was wondering if I was going to be unrooted.
So I need to root with Nexus Root Toolkit again right?
After that do I need to install busybox again?

@naturalstate
Copy link
Author

Well shit, tried to root device again and went through all the steps that I did the first time. But now I'm getting message in Nexus Root Toolkit that my ADB device is found but it's unauthorized. It says to renable MTP & USB debugging, restarting device, and plugging into a different USB port, but I'm not getting the prompt to accept the RSA key. It won't let me flash to stock without this being taken care of either. Any ideas?

@0E800
Copy link

0E800 commented Mar 21, 2019

Try this.

Boot into TWRP
Mount System
Goto Wipe -> type Yes wipe.
If not errors then reboot back to recovery
Do the normal factory swipe wipe
Put in USB drive with KaliPWN on it.
Mount it so you can see files on USB
Goto Advanced -> File Manager
Copy KaliPWN to the device directly.
Then take out usb.
Install / Flash KaliPWN

Might not need to mess with NRT

@naturalstate
Copy link
Author

If you're curious, one thing that I've encountered is trying to run an nmap scan started either in nethunter app or kali CLI crashes and reboots device.

@0E800
Copy link

0E800 commented Mar 22, 2019

There is a known issue of the device rebooting when network devices like external usb wifi is disconnected from the device.

For example. I plug in my atheros usb injection supported external wifi into the Nexus.
I unplug it... I plug it back in.. no effect on the N7
I plug it in, I run airmon-ng start wlan1
If I unplug the external wifi, or dont take into account how lose the OTG cable fits the N7, as soon as the device thinks the external wifi is not longer physically plugged in, the device is going to reboot.

The issue threads have multiple issues like this. There are some work arounds, like using alternative commands that accomplish what airmon-ng does that wont crash the system.

Can you record the steps I can take to replicate the crash? See if I can isolate the reason?

I found some more of my builds, try to find you the best Oreo and Nougat of them, they may play nicer.

@emprise1976
Copy link

I have also tried the build and can confirm the reboot of the device after using nmap or zanti.

Thank you for your engament.

@naturalstate
Copy link
Author

I launch a kali shell and run "nmap -v 192.168.1.131" and it immediately locks up and then a few seconds later reboots. I don't have any wifi cards plugged in. My device is connected over wifi. And my device can successfully ping that device.
Really hope I can get nmap working, that's a pretty basic feature that I need to work.

@0E800
Copy link

0E800 commented Mar 22, 2019

I agree. Wireshark being of equal importance.

I will see what I can do. Thank you for continuing to help QA.

@0E800
Copy link

0E800 commented Mar 22, 2019

@naturalstate

If you don't mind, may you review:
https://security.stackexchange.com/questions/69180/nmap-crashing-embedded-system-in-strange-way

Please attempt a few of the examples to verify if any nmap command causes the reboot or if its certain nmap options being used.

Its a heavy ticket Friday for me so I have to appease to the mob of clients before I can do what I want, I appreciate your patience .

@naturalstate
Copy link
Author

I ran tshark, and it seemed to work.
Ok, I'll check it out. Thanks

@0E800
Copy link

0E800 commented Mar 22, 2019

@naturalstate

If you are using nmap -v this may also be the reason why it crashes:

nmap/nmap#1112

@naturalstate
Copy link
Author

It seems that any nmap command crashes. I've ran just a nmap 192.168.1.131 and it crashes. I made a post on the stackexchange post.

@0E800
Copy link

0E800 commented Mar 22, 2019

Thank you. Ill try a few things.

Also am testing the various Google Play and Services APKs so you can use the store

@0E800
Copy link

0E800 commented Mar 22, 2019

Verified Nmap reboot issue.
I used the Nethunter option Nmap Scan.

I think I also have a proper Google Services APK if you want to be able to use the Store and other Google services.

I am attempting to build a Android 9 (Pie) build for N7-2013 to see if it can be Nethunter enabled.

@0E800
Copy link

0E800 commented Mar 22, 2019

@naturalstate

Check this out:
https://forums.kali.org/showthread.php?43300-Nethunter-on-OnePlus-One-several-odd-things-I-cannot-find-answers-to-on-forum-or-in-Google

I replied to the tread so hopefully it will get resolved. At-least its not unique to my build.

@0E800
Copy link

0E800 commented Mar 22, 2019

If I run nmap -sL 192.168.1.1/24 it doesnt reboot.

Will try to reduce the options to see what is causing it.

@naturalstate
Copy link
Author

Ran -sL and it also didn't reboot. Started going down the list and ran -sn and it crashed. -sL only lists targets right? It's not doing any scanning.

@0E800
Copy link

0E800 commented Mar 23, 2019

I think its the rate or speed it's trying to scan . but i don't know exactly what ~v does. It probably a combo of commands

@naturalstate
Copy link
Author

-v is for verbose mode, it's suppose to show you what nmap is doing. If you do -vv it shows more. And finally you can do -vvv for the most verbose.

@0E800
Copy link

0E800 commented Mar 23, 2019

Yeah, sorry what I meant to say was the default scan settings when no options are used.

Like at what rate does is sent out pings etc.

Good news is I was able to build Android Pie for the Nexus 2013, now I just need to patch the kernel to support HID Keyboard and wifi injection. I was impressed that the OS seemed pretty responsive.

As for nmap, I am fairly certain that nmap/nmap#1112 is the answer.
I havent been able to verify if the nmap version on kalifs includes that patch.
I will try to compile nmap with that patch and test, if it resolves the issue then ill include that version.

@emprise1976
Copy link

I suspect that this is a general problem with the kernel and / or the Wifi drivers. The APP zAnti is also affected.
https://www.zimperium.com/zanti-mobile-penetration-testing

@0E800
Copy link

0E800 commented Mar 26, 2019

If anyone wants to beta test:

Android Pie Nethunter for Nexus 2013 Wifi (Flo) (have not tested Deb)

https://github.com/0E800/Nexus-7-2013-Flo-Experimental/releases/tag/RR_PIE_Flo_Kali

@emprise1976
Copy link

nmap is also not working with Android Pie Nethunter for Nexus 2013
Installation was without any problems

@0E800
Copy link

0E800 commented Mar 26, 2019

@emprise1976

Yeah I noticed that. Haven't tried building nmap yet.

Apologies there is a issue with changing wallpapers. I believe its a permission issue and am testing .I'll upload a new build once I have identified solution .

@emprise1976
Copy link

emprise1976 commented Mar 26, 2019

@0E800
Also zAnti is not working

@0E800
Copy link

0E800 commented Mar 26, 2019 via email

@emprise1976
Copy link

emprise1976 commented Mar 26, 2019

I assume that nmap is used here, unfortunately it is not visible in the APP, but files are loaded the first time they are executed. You can download the APP for free
.

@emprise1976
Copy link

zAnti uses namp 7.31

@0E800
Copy link

0E800 commented Mar 26, 2019 via email

@emprise1976
Copy link

@0E800 Any News on the NMAP Problem? Is there anything I can help with?

@0E800
Copy link

0E800 commented Mar 29, 2019

@emprise1976
The new build (r19) doesnt crash the device, but still gives a Segmentation fault error.

It would be helpful if you could try testing a separate nmap build.

I found: https://github.com/kost/nmap-android/releases/download/v7.31/nmap-7.31-binaries-armeabi.zip
Opened the archive and replaced nmap in:
/System(Root)/data/local/nhsystem/kali-armhf/bin/

But when I try to run nmap, it give me a permssion denied as though root wasnt good enough.

So yeah, if you could find another build, shoot, even try nmap from an older release just to rule out if its the application or kernel.

@naturalstate
Copy link
Author

Any updates on this?

@0E800
Copy link

0E800 commented Apr 5, 2019

@naturalstate @emprise1976

I was able to get nmap working using an older nmap for android app call anmap.apk

https://code.google.com/archive/p/anmap/downloads

I will keep testing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants