2 scans same config one nmap taking ages

I have 2 scans setup with same scan config. Both have been setup with same scan config.
I use same port list and alive test on both icmp+tcp-ack.
I start both scans the same time. Enough resources free. The nmap of 1 task takes ages. Why can 2 similar task produce such a different performance result?

When I try to stop the task it does not seem to stop it either.

The same scan config can take dramatically longer depending on the target. Do these scans have the same target? For example, the service detection will determine which tests are run against the target.

That being said, there may be something wrong. What is the scan config you are using? What type is it? You mention nmap, are you referring to a System Discovery scan? I don’t know if Greenbone’s NVTs can be classified as nmap exactly since I don’t know whether they actually use nmap or not.

They dont have the same target and it is nmap that takes a huge time. I run 22.04 and have read that in newer releases scan performance was improved. Will try and install the newer versions and see how that goes.

Oh, perhaps Notus scanner was not included in that earlier version.

It’s purpose is to increase the scan speed. From the Notus GitHub page:

Notus Scanner detects vulnerable products in a system environment. The scanning method is to evaluate internal system information. It does this very fast and even detects currently inactive products because it does not need to interact with each of the products.

If nmap takes ages depending on the target there might be networking / firewall / environmental factors playing a role independent from the Greenbone software stack / Notus scanner.

For example a network device in between delaying / slowing down port probes and similar. It will be quite difficult for any community member to exactly pinpoint the relevant component on the environment in question so additional debugging from your side (e.g. using nmap directly on the command line, checking with Wireshark for differences in the responses, …).

The firewall is configured to totally allow without any logging the traffic from the scanner. The nmap command is taking a lot of time. I will run it manually and see if that makes any difference.

In the temp file of the nmap command i see this

nmap -n -Pn -oG /tmp/nmap-10.231.243.13-343297696 -sT -sU -p T:1-3,5,7,9,11,13,17-25,27,29,31,33,35,37-39,41-46,48-50,52-59,62-80,82-99,101-113,115-224,242-248,256-257,259-269,271,280-284,286-287,308-324,333,344-584,586-658,660-702,704-707,709-715,729-731,741-742,744,747-754,758-765,767,769-777,780,800-802,810,828-833,847-848,853-854,860-862,873,886-888,900-903,910-913,953,989-993,995-1001,1010,1021-1022,1025-1026,1029,1033-1108,1110-1275,1277-1300,1303-1490,1492-1527,1529-1782,1784-2193,2197-2199,2201-2258,2260-2368,2370-2377,2379-2681,2683-2692,2694-2793,2795-2824,2826-2872,2874-2924,2926-3091,3093-3096,3098-3125,3127-3300,3302-3321,3326-3366,3372-3402,3405-3545,3547-3693,3695-3993,3995-4047,4049-4076,4078-4083,4085,4087-4143,4145-4172,4174-4190,4192-4193,4197,4199,4300-4314,4316,4320-4323,4325-4336,4340,4343-4360,4368-4379,4389-4393,4395-4396,4400-4411,4413-4417,4419-4423,4425-4433,4442-4458,4484-4488,4500,4535-4538,4545-4556,4559,4563,4566-4570,4573,4590-4591,4593-4605,4646,4658-4692,4700-4704,4711,4725,4727-4728,4730-4731,4733,4737-4745,4749-4753,4756,4774,4784,4786-4788,4800-4803,4827,4837-4851,4867-4871,4876-4877,4879-4880,4883-4885,4888-4889,4894,4899-4902,4912-4915,4940-4942,4949-4953,4969-4971,4984-4991,4999-5013,5015,5020-5030,5032-5034,5042-5045,5048-5057,5059-5075,5080-5087,5093-5094,5099-5103,5106-5107,5111-5112,5114-5115,5117,5120,5133-5135,5137,5145-5146,5150-5152,5154-5157,5161-5168,5172,5190-5197,5200-5203,5209,5215,5221-5237,5245,5248-5254,5264-5265,5269-5272,5280-5282,5298-5310,5312-5318,5320-5321,5343-5344,5349,5352-5363,5397-5435,5443,5445,5450,5453-5456,5461-5465,5470-5473,5475,5500-5507,5550,5553-5557,5565-5569,5573-5575,5579-5586,5597-5605,5618,5627-5639,5646,5666,5670-5681,5683-5684,5688-5689,5693,5696,5700,5705,5713-5730,5741-5748,5750,5755,5757,5766-5771,5777,5780-5783,5785,5793,5813-5814,5841-5842,5859,5863,5868,5883,5900,5910-5913,5963,5968-5969,5984-5993,5999,6064-6066,6068-6077,6084-6088,6099-6117,6121-6124,6130,6133,6140-6149,6159-6163,6200,6209,6222,6241-6244,6251-6253,6267-6269,6300-6301,6306,6315-6317,6320-6322,6324-6326,6343-6344,6346-6347,6350,6355,6360,6370,6379,6382,6389-6390,6417-6421,6432,6440,6442-6446,6455-6456,6464,6471,6480-6489,6500-6503,6505-6510,6513-6515,6543-6544,6547-6551,6558,6566,6568,6579-6583,6600-6602,6619-6629,6632,6640,6653,6655-6656,6670-6673,6678-6679,6687-6690,6697,6701-6703,6714-6716,6767-6771,6777-6778,6785-6791,6801,6817,6831,6841-6842,6850,6868,6888,6900-6901,6924,6935-6936,6946,6951,6961-6966,6969-6970,6997-7026,7030-7031,7070-7073,7080,7099-7101,7117,7121,7128-7129,7161-7174,7200-7202,7215-7216,7227-7229,7236-7237,7244,7262,7272-7283,7365,7391-7395,7397,7400-7402,7410-7411,7421,7426-7431,7437,7443,7471,7473-7474,7478,7491,7500-7501,7508-7511,7542-7549,7551,7560,7563,7566,7569-7570,7574,7588,7606,7624,7626-7631,7633,7648,7663,7672-7677,7680,7683,7687,7689,7697,7700,7707-7708,7720,7724-7728,7734,7738,7741-7744,7747,7775,7777-7779,7781,7786-7787,7789,7794,7797-7801,7810,7845-7847,7869-7871,7878,7880,7887,7900-7903,7913,7932-7933,7962,7967,7979-7982,7997,7999-8009,8015-8016,8019-8023,8025-8026,8032-8034,8040-8044,8051-8059,8066-8067,8070,8074,8077,8080-8084,8086-8088,8090-8091,8097,8100-8102,8115-8118,8121-8122,8128-8132,8140,8148,8153,8160-8162,8181-8184,8190-8192,8194-8195,8199-8201,8204-8208,8230,8243,8270,8276,8280,8282,8292-8294,8300-8301,8313,8320-8322,8351,8376-8380,8383,8400-8405,8415-8417,8423,8442-8445,8450,8457,8470-8474,8500-8502,8554-8555,8567,8600,8610-8615,8665-8666,8675,8686,8688,8699,8710-8711,8733,8750,8763-8770,8778,8786-8787,8793,8800,8804,8873,8880-8881,8883,8888-8894,8899-8901,8910-8913,8937,8953-8954,8980,8989-8991,8997-9002,9005,9008-9010,9020-9026,9050-9051,9060,9080,9083-9093,9100-9107,9111,9119,9122-9123,9131,9160-9164,9191,9200-9217,9222,9255,9278-9285,9287,9292-9295,9300,9306,9310,9312,9318,9321,9339,9343-9346,9374,9380,9387-9390,9396-9397,9400-9402,9418,9443-9445,9450,9500,9535-9536,9555,9592-9600,9612,9614,9616-9618,9628-9631,9640,9666-9668,9694-9695,9700,9747,9750,9753,9762,9800-9802,9875-9877,9888-9889,9898,9900,9909,9911,9925,9950-9955,9966,9978-9979,9981,9987-9988,9990-10010,10020,10050-10051,10055,10080-10081,10100-10104,10107,10110,10113-10117,10125,10128-10129,10160-10162,10200-10201,10252,10260-10261,10288,10321,10443,10540-10544,10548,10631,10800,10805,10809,10860,10880,10933,10990,11000-11001,11095,11103-11106,11109-11112,11161-11165,11172-11175,11201-11202,11208,11211,11319-11321,11367,11371,11489,11600,11623,11720,11723,11751,11796,11876,11967,11971,12000-12008,12010,12012-12013,12109,12121,12168,12172,12300,12302,12321-12322,12345,12753,12865,13160,13216-13218,13223-13224,13400,13720-13722,13724,13782-13783,13785-13786,13818-13823,13894,13929-13930,14000-14001,14033-14034,14141-14143,14145,14149-14150,14154,14250,14414,14500,14936-14937,15000,15002,15345,15363,15555,15660,15740,15999-16002,16020-16021,16161-16162,16309-16311,16360-16361,16367-16368,16384-16385,16619,16665,16789,16900,16950,16991-16995,17007,17184-17185,17219-17221,17223,17225,17234-17235,17500,17555,17729,17754-17756,17777,18000,18104,18136,18181-18187,18241-18243,18262,18463,18634-18635,18668,18769,18881,18888,19000,19007,19020,19191,19194,19220,19283,19315,19398,19410-19412,19539-19541,19998-20003,20005,20013-20014,20034,20046,20048-20049,20057,20167,20202,20222,20480,20670,20999-21000,21010,21212-21213,21221,21553-21554,21590,21800,21845-21849,22000-22005,22125,22128,22222,22273,22305,22335,22343,22347,22350-22351,22537,22555,22763,22800,22951,23000-23005,23053,23294,23333,23400-23402,23456-23457,23546,24000-24006,24242,24249,24321,24323,24386,24465,24554,24577,24666,24676-24678,24680,24754,24922,25000-25009,25576,25604,25793,25900-25903,26000,26133,26208,26257,26260-26263,26486-26487,26489,27010,27017,27345,27442,27504,27782,27876,27999-28001,28010,28200,28240,28589,29167,29999-30003,30100,30260,30400,30999,31016,31020,31400,31416,31457,31620,31685,31765,31948-31949,32034,32249,32400,32483,32635-32636,32767-32777,32801,32811,32896,33000,33060,33123,33331,33333-33334,33434,33656,34249,34378-34379,34567,34962-34964,34980,35000-35006,35100,35354-35357,36001,36524,36602,36700,36865,37475,37483,37601,37654,38000-38002,38201-38203,38800,38865,39681,40000,40404,40841-40843,41111,41121,41230,41794-41797,42508-42510,43000,43188-43191,43210,43439-43441,44123,44321-44323,44444-44445,44553,44818,44900,45000-45002,45045,45054,45514,45678,45824-45825,45966,46336,46998-47001,47557,47624,47806,47808,48000-48005,48048-48050,48128-48129,48556,48619,48653,49000-49001,49150,U:1-3,5,7,9,11,13,17-25,27,29,31,33,35,37-39,41-46,48-50,52-59,62-80,82-99,101-113,115-224,242-248,256-257,259-270,280-284,286-287,308-322,333,344-584,586-658,660-702,704-707,709-716,729-731,741-742,744,747-754,758-765,767,769-777,780,800-802,810,828-833,847-848,853-854,860-862,873,886-888,900-903,910-913,989-993,995-1000,1008,1010,1021-1022,1025-1027,1029,1033-1108,1110-1275,1277-1300,1303-1406,1408-1490,1492-1752,1754-1774,1776-1782,1784-2187,2190-2193,2197-2199,2201-2224,2226-2258,2260-2368,2370,2372,2381-2407,2409-2681,2683-2692,2694-2793,2795-2824,2826-2854,2856-2872,2874-2924,2926-3000,3002-3070,3072-3091,3093-3096,3098-3120,3122-3125,3127-3299,3302-3321,3326-3366,3372-3402,3405-3545,3547-3564,3567-3692,3695-3736,3738-3765,3767-3840,3842-3863,3865-3867,3869-3993,3995-4047,4049-4077,4079-4084,4086,4089-4119,4121-4143,4145-4169,4172-4174,4177-4185,4188,4191-4192,4197,4199,4300-4310,4320-4323,4325-4328,4333,4340-4359,4361-4362,4366,4368-4373,4375-4379,4389-4390,4394-4395,4400-4406,4412-4413,4416,4418,4420,4425-4426,4430,4432,4441-4458,4484,4486,4488,4500,4534-4538,4545-4552,4554-4559,4566-4569,4591-4601,4621,4646,4658-4692,4700-4702,4711,4725-4730,4732,4737-4747,4749-4755,4784-4785,4789-4791,4800-4804,4827,4837-4851,4867-4871,4876-4878,4881-4882,4884-4885,4894,4899-4900,4914,4936-4937,4940-4942,4949-4952,4969-4970,4980,4986-4991,4999-5014,5020-5027,5029-5031,5042-5044,5046-5047,5049-5053,5055-5062,5064-5067,5069-5074,5078-5085,5092-5094,5099-5102,5104-5105,5111-5112,5116,5120,5133,5136-5137,5145,5150-5152,5154-5155,5164-5168,5190-5193,5200-5203,5223-5227,5234-5237,5245-5252,5264-5265,5270-5272,5282,5298-5310,5312-5315,5343-5344,5349-5364,5397-5437,5443,5450,5453-5456,5461-5465,5474,5500-5506,5553-5556,5567-5569,5573,5580-5585,5597-5605,5627-5634,5670-5684,5687-5689,5713-5724,5728-5730,5741-5748,5750,5755,5757,5766-5771,5777,5781-5787,5793-5794,5813-5814,5859,5863,5900,5910-5913,5963,5968-5969,5984-5992,5999,6064-6066,6069-6074,6080-6083,6085-6088,6100-6112,6118,6122-6124,6133,6140-6149,6160-6163,6200-6201,6209,6222,6241-6244,6251-6253,6268-6269,6300-6301,6306,6315-6317,6320-6322,6324,6343,6346-6347,6350,6355,6360,6363,6370,6382,6389-6390,6417,6419-6421,6443-6446,6455-6456,6464,6471,6480-6489,6500-6503,6505-6511,6514-6515,6543-6544,6547-6551,6558,6566,6568,6579-6583,6619-6623,6626-6629,6633-6636,6653,6657,6670-6673,6678-6679,6689,6696,6701-6703,6714-6715,6767-6771,6784-6788,6790-6791,6801,6831,6841-6842,6850,6868,6888,6924,6935-6936,6946,6951,6961-6966,6969,6997-7017,7019-7025,7030,7040,7070-7072,7080,7088,7095,7099-7101,7107,7121,7128-7129,7161-7166,7169-7171,7174,7181,7200-7201,7227,7235,7244,7262,7272-7282,7365,7391-7395,7397,7400-7402,7410-7411,7420-7421,7426-7431,7437,7443,7473,7491,7500-7501,7510-7511,7542-7550,7560,7566,7570,7574,7588,7606,7624,7626-7629,7633,7648,7663,7674-7677,7680,7689,7697,7707-7708,7720,7724-7728,7734,7738,7741,7743-7744,7747,7777-7779,7781,7784,7786-7787,7789,7794,7797-7802,7810,7845-7846,7872,7880,7887,7900-7903,7913,7932-7933,7962,7967,7979-7980,7982,7998-8003,8005-8008,8019-8023,8025-8026,8032-8034,8040-8041,8052-8060,8074,8080-8083,8086-8088,8097,8100,8111,8115-8116,8118,8121-8122,8128-8132,8148-8149,8160-8161,8182,8184,8192,8194-8195,8199-8202,8204-8208,8211,8230-8232,8243,8266,8276,8280,8282,8292,8294,8300-8301,8320-8322,8351,8376-8380,8383-8384,8400-8403,8416-8417,8442-8445,8450,8472-8474,8500-8501,8503,8554-8555,8567,8600,8609-8614,8675,8686,8732-8733,8763-8766,8770,8786-8787,8793,8800,8804-8805,8807-8809,8873,8880,8883,8888-8894,8899-8901,8910-8913,8954,8980-8981,8989-8991,8999-9002,9007,9009,9011,9020-9026,9060,9080-9081,9084-9092,9100-9106,9111,9119,9131,9160-9164,9191,9200-9217,9222,9255,9277-9287,9292-9295,9300,9318,9321,9343-9344,9346,9374,9380,9396-9397,9400-9402,9418,9443-9444,9450,9500,9522,9535-9536,9555,9592-9600,9612,9618,9628-9629,9632,9667-9668,9694-9695,9700,9747,9750,9753,9762,9800-9802,9875,9878,9888-9889,9898-9901,9903,9909,9911,9950-9953,9955-9956,9966,9987,9990-10003,10007-10009,10023,10050-10051,10080-10081,10100-10104,10107,10110-10111,10113-10117,10128,10160-10162,10200-10201,10252-10253,10260,10288,10439,10500,10540-10544,10800,10805,10810,10860,10880,10990,11000-11001,11095,11106,11108,11111-11112,11161-11165,11171,11201,11208,11211,11319-11321,11367,11371,11430,11600,11720,11723,11751,11796,11876-11877,11967,12000-12009,12012-12013,12109,12121,12168,12172,12300,12321-12322,12345,12753,13160,13216-13218,13223-13224,13400,13720-13722,13724,13782-13783,13785-13786,13818-13822,13894,13929,14000-14002,14033-14034,14141-14142,14145,14149,14154,14250,14414,14936-14937,15000,15118,15345,15363,15555,15660,15740,15998,16003,16161,16309-16311,16360-16361,16367-16368,16384,16666,16900,16950,16991-16995,17007,17185,17219-17222,17224-17225,17234-17235,17500,17729,17754-17756,18000,18181-18187,18241,18262,18463,18634-18635,18668,18769,18881,18888,19000,19007,19191,19194,19220,19283,19315,19398,19410-19412,19539-19541,19788,19999-20003,20005,20012,20014,20034,20046,20048-20049,20167,20202,20222,20480,20670,20999-21000,21554,21590,21800,21845-21849,22000-22005,22273,22305,22335,22343,22347,22350,22555,22763,22800,22951,23000-23005,23272,23294,23333,23400-23402,24000-24006,24242,24249,24321-24322,24386,24465,24554,24577,24676-24678,24680,24850,24922,25000-25009,25793,25900-25903,25954-25955,26000,26133,26208,26260-26263,26486-26487,26489,27345,27442,27504,27782,27999-28000,28119,28200,28240,29167,30001-30004,30260,30832,30999,31016,31029,31416,31457,31620,31765,31948-31949,32034,32249,32483,32635-32636,32767-32777,32801,32896,33123,33331,33334,33434-33435,33656,34249,34378-34379,34567,34962-34964,34980,35001,35004,35100,3535

The timing is set -T4.

If I scan manually to same target it takes 87 sec instead of 15-30 min with openvas. I also use -p- for the scan so all 65k ports.

I have one nmap that takes 1 hour and 10 min now. I found this Optimal timeout setting for OpenVAS - #2 by cfi and deciced to change unscanned_closed_udp and set it to no.

I also changed the IANA rule to nmap all tcp and top 100 udp. Saving lots of udp ports.

I would look on target side instead as there is very unlikely a difference between running nmap via openvas and on command line.

What i can see is that the pasted command above is truncated but includes -sU which is only added if UDP port scanning is requested. If the relevant ports haven’t been added to the manual scan a difference between 87 secs and 15-30 minutes is expected.

Overall UDP port scanning is known to be very slow and the scan speed also depends on the target itself / how it reacts on such UDP port scanning probes.

More info on UDP port scanning can be found here for example: