Git Product home page Git Product logo

Comments (3)

ddcc avatar ddcc commented on June 27, 2024

The factory reset functionality may be doing something weird; try adding touch /dev/gpio to fixImage.sh, delete the 1 subdirectory under scratch, and restart from makeImage.sh.

Otherwise, it seems like the network is coming up, so I'm not sure what's going on. Since the firmware spawns a shell on the default console, you should be able to poke around with iptables and ifconfig to see if there's something strange there. I made a change to enable the VNC server by default, so if you update the local git repository and restart from the inferNetwork.sh step, you should be able to access the console using step 10 from the README.

from firmadyne.

kkkpoh avatar kkkpoh commented on June 27, 2024

Just a quick update, adding 'touch dev/gpio' gave the same result.

I am poking through the console and hope to find something in there. Will update if I could identify the root cause.

[update]
I was poking the firmware using the run.mispel-debug.sh with added networking interface parameters from the original run.sh. The output of the ifconfig and route -n seems OK, as ip address and route were added correctly. However, when performing an arping from the host system, the reply was coming from eth2 instead of the br0:

$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
^C
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 1999ms


$ arping -I tap3_0 192.168.0.1
ARPING 192.168.0.1 from 192.168.0.2 tap3_0
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:02]  1.274ms
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:02]  1.112ms
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:02]  1.150ms
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:02]  1.068ms
^CSent 4 probes (1 broadcast(s))
Received 4 response(s)

Below is the output of the ifconfig from the firmware:

# ifconfig
br0       Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:01  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:77 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:24806 (24.2 KiB)

eth2      Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:02
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:135 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:4431 (4.3 KiB)  TX bytes:50234 (49.0 KiB)
          Interrupt:10 Base address:0x1060 

eth2.0    Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:01  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:25430 (24.8 KiB)

eth2.2    Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:24252 (23.6 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:224 (224.0 B)  TX bytes:224 (224.0 B)

I was not able to ping the firmware unless I configure the eth2 with a new IP address (within the same subnet) and reconfigure the routing table accordingly.

When I tested the firmware on the VM (attifyOS) that has a working copy of firmadyne, I was able to ping the firmware without any amendment and the output of the arping shows a reply from br0 instead of eth2:

$ ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_seq=1 ttl=64 time=14.1 ms
64 bytes from 192.168.0.1: icmp_seq=2 ttl=64 time=0.442 ms
64 bytes from 192.168.0.1: icmp_seq=3 ttl=64 time=0.963 ms
^C
--- 192.168.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.442/5.172/14.111/6.324 ms

$ arping -I tap333.0 192.168.0.1
ARPING 192.168.0.1 from 192.168.0.2 tap333.0
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:01]  1.128ms
Unicast reply from 192.168.0.1 [00:DE:FA:19:C0:01]  0.733ms
^CSent 2 probes (1 broadcast(s))
Received 2 response(s)

Below is the output of ifconfig from the firmware running in attifyOS:

# ifconfig
br0       Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:01  
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:315 (315.0 B)  TX bytes:12538 (12.2 KiB)

eth2      Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:671 (671.0 B)  TX bytes:15658 (15.2 KiB)
          Interrupt:10 Base address:0x1060 

eth2.0    Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:01  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:331 (331.0 B)  TX bytes:12916 (12.6 KiB)

eth2.2    Link encap:Ethernet  HWaddr 00:DE:FA:19:C0:02  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2274 (2.2 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

from firmadyne.

liyansong2018 avatar liyansong2018 commented on June 27, 2024

Bridge setting error. You should reset the bridge in the qemu virtual machine

For example

brctl addif br0 eth0

from firmadyne.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.